Template::Plugin::Abuse - A plugin for accessing abuse complaints
[% USE sample = Abuse ( path = dir ); %] ... fun with the abuse report ...
This plugin provides access to abuse reports processed and stored by Mail::Abuse's Mail::Abuse::Processor::Store. This plugin supports on the fly uncompressing using PerlIO::gzip of the stored abuse report if it has been compressed with gzip and its name ends in ".gz".
At time of
USE, the attribute
path must be used to tell the plugin where to look for abuse reports. This path will be used to compose the full filename to load the abuse report from.
Note that all the modules used in the processing of an abuse report must be loaded prior to fetching abuse reports. Currently, there is no easy way to do so automatically, so you need to do that yourself, probably either in the Template::Toolkit driver or in your Apache setup, if using this module for generating web content.
The following methods are supported:
Fetches the abuse report from stable storage and returns either an object with the same accessors/values for Template::Toolkit use or a scalar with the body of the abuse report, depending on the mode requested. id identifies the abuse report to fetch. mode is the mode used by Mail::Abuse::Processor::Store when storing the abuse report.
Many of the elements stored into a Mail::Abuse::Report object are references. To help with this, the plugin exports the deref() method, that will dereference references to scalars automatically.
Exceptions are thrown to indicate unusual errors or situations. The possible exceptions are:
Thrown when no
path attribute is specified to
Thrown when the given
fetch contains unusual or potentially unsafe characters.
This exception is thrown when the identified abuse report cannot be found.
A problem opening the stored abuse report has been detected.
None by default.
Original version; created by h2xs 1.23 with options
-A -C -X -c -n Template::Plugin::Authenticator -v 1.00 --skip-autoloader
Luis E. Muñoz <firstname.lastname@example.org>
Copyright (C) 2005 by Luis E. Muñoz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.