package Mail::Abuse::Incident; require 5.005_62; use Carp; use strict; use warnings; use overload '""' => "serialize"; use overload 'eq' => sub { "$_[0]" eq "$_[1]" }; # The code below should be in a single line our $VERSION = do { my @r = (q$Revision: 1.11 $ =~ /\d+/g); sprintf " %d."."%03d" x $#r, @r }; =pod =head1 NAME Mail::Abuse::Incident - Parses a Mail::Abuse::Report to extract incidents =head1 SYNOPSIS package Mail::Abuse::Incident::MyIncident; use Mail::Abuse::Incident; use base 'Mail::Abuse::Incident'; sub ip { ... }; sub time { ... }; sub type { ... }; sub data { ... }; sub parse { ... } package main; use Mail::Abuse::Report; my $i = new Mail::Abuse::Incident::MyIncident; my $report = new Mail::Abuse::Report (incidents => [$i] ); =head1 DESCRIPTION This class implements the reception of an abuse report and its conversion to a C object. An object must respond to all the methods in the synopsis, returning the required information about the incident (after it has been parsed). The following items of information have been defined: =over =item B A C object encoding the origin of the particular incident. =item B