Filter::Util::Call

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?
" ;

This prints:

Are you looking for Trouble?

Filter::Util::Call implements the following methods.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.144.228