App::Milter::Limit::Plugin - Milter Limit driver plugin base class
version 0.53
# in your driver module: package App::Milter::Limit::Plugin::FooBar; use base 'App::Milter::Limit::Plugin'; sub init { my $self = shift; # initialize your driver } sub query { my ($self, $sender) = @_; # hand waving return $message_count; }
This module is the base class for App::Milter::Limit backend plugins.
App::Milter::Limit
All plugins must implement at least the following methods:
init
query
Get a configuration value from the given section with the given name. If $section is global then the global config section is used.
$section
global
set default values for the given configuration section.
See: "set_defaults" in App::Milter::Limit::Config
initialize the driver. Called when the driver class is first constructed.
lookup a sender, and update the counters for it. This is called when a message is seen for a sender. Returns the number of messages seen for the sender in the configured expire time period.
The development version is on github at https://github.com/mschout/milter-limit and may be cloned from git://github.com/mschout/milter-limit.git
Please report any bugs or feature requests to bug-app-milter-limit@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=App-Milter-Limit
Michael Schout <mschout@cpan.org>
This software is copyright (c) 2010 by Michael Schout.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::Milter::Limit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Milter::Limit
CPAN shell
perl -MCPAN -e shell install App::Milter::Limit
For more information on module installation, please visit the detailed CPAN module installation guide.