The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Milter::Limit::Plugin - Milter Limit driver plugin base class

VERSION

version 0.53

SYNOPSIS

 # 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;
 }

DESCRIPTION

This module is the base class for App::Milter::Limit backend plugins.

Required Methods

All plugins must implement at least the following methods:

  • init

  • query

METHODS

config_get ($section, $name)

Get a configuration value from the given section with the given name. If $section is global then the global config section is used.

config_defaults ($section, %defaults)

set default values for the given configuration section.

See: "set_defaults" in App::Milter::Limit::Config

init

initialize the driver. Called when the driver class is first constructed.

query ($sender)

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.

SOURCE

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

BUGS

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

AUTHOR

Michael Schout <mschout@cpan.org>

COPYRIGHT AND LICENSE

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.