Mail::Abuse::Processor::Store - Process a Mail::Abuse::Report
use Mail::Abuse::Processor::Store; use Mail::Abuse::Report; my $p = new Mail::Abuse::Processor::Store; my $report = new Mail::Abuse::Report (processors => [ $p ]); # ... other pieces of code that configure the report ...
This class stores a processed report in a file hierarchy that is composed using the smallest acceptable timestamp from the list of incidents in a report.
If no incidents are found within a report, a special name is built based on the report text.
The place where the files are created can be controlled with entries in the configuration file. Currently, the following directives are understood.
Points to the root of the tree where reports are to be stored. Defaults to the current directory.
The name of the leaf where reports with no incidents are stored. This is a subdir of store root path. It defaults to the very creative name, "empty".
The mode in which to store abuse reports. The following modes are supported.
This is the default, and uses Storable to serialize the in-memory Mail::Abuse::Report object and store it in a flat file.
Mail::Abuse::Report
Just like serialized, but the resulting file is compressed with the equivalent of gzip, using PerlIO::gzip.
Store only the report text, as a flat file.
Just like plain but the resulting file is compressed on the fly using PerlIO::gzip.
If set to a true value, causes this module to emit debugging information using warn().
warn()
The following functions are implemented.
process($report)
Takes a Mail::Abuse::Report object as an argument and performs the processing action required.
The processed $report will have the filename where the report was stored, added in store_file.
$report
store_file
None by default.
Original version; created by h2xs 1.2 with options
-ACOXcfkn Mail::Abuse -v 0.01
This code and all accompanying software comes with NO WARRANTY. You use it at your own risk.
This code and all accompanying software can be used freely under the same terms as Perl itself.
Luis E. Muñoz <luismunoz@cpan.org>
perl(1).
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Muñoz'. Assuming UTF-8
To install Mail::Abuse, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Abuse
CPAN shell
perl -MCPAN -e shell install Mail::Abuse
For more information on module installation, please visit the detailed CPAN module installation guide.