June 2002
Beginner
759 pages
80h 42m
English
Provides a framework for implementing source filters in Perl code. While you may use Filter::Util::Call directly, we suggest you use Filter::Simple instead.
For example:
package Milter; # Could just as well be called 'OldJoke'
use Filter::Util::Call ;
sub import {
my($type) = @_ ;
filter_add(bless []) ;
}
sub filter {
my($self) = @_;
my($status);
s/Shut-Up/Trouble/g
if ($status = filter_read()) > 0;
$status ;
}
1;You’d use the above in your code like so:
#!/usr/local/bin/perl -w use Milter; print "Are you looking for Shut-Up?\n" ;
This prints:
Are you looking for Trouble?
Filter::Util::Call implements the following methods.