Net::IMP::Filter - simple data filter using Net::IMP analyzers
package myFilter; use base 'Net::IMP::Filter'; sub out { my ($self,$dir,$data) = @_; print "[$dir] $data\n"; } package main; use Net::IMP::Pattern; my $factory = Net::IMP::Pattern->new_factory...; my $f = myFilter->new( $factory->new_analyzer ); .. $f->in(0,$data0); $f->in(1,$data1); ..
Net::IMP::Filter is a class which can be used for simple filters (e.g. data in, data out) using Net::IMP analyzers, thus hiding the complexity but also useful features of the Net::IMP interface for simple use cases. To create such a filter subclass from Net::IMP::Filter and implement any of the following methods (which by default do nothing)
Net::IMP::Filter
this gets called for output of data
this gets called on IMP_DENY
this gets called on IMP_LOG
this gets called on IMP_ACCTFIELD
Steffen Ullrich <sullr@cpan.org>
Copyright by Steffen Ullrich.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::IMP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::IMP
CPAN shell
perl -MCPAN -e shell install Net::IMP
For more information on module installation, please visit the detailed CPAN module installation guide.