| Previous | Next
Filter::Util::CallProvides 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:
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.
filter() Performs the main processing for the filter. Used with closure filters; that is, a closure filter handles the lexical variables that are maintained by the closure. The finished source, as processed by
filter_add(ref) Installs the filter.
filter_del() Disables the current filter. It doesn't destroy any filters, just tells Perl to stop using them.
filter_read(n) Obtains a line or block from the next filter in the chain. If there are no other filters, then the actual source file is obtained. For example: $status = filter_read(); # Requests a line $status = filter_read($size); # Requests a block of $size
filter_read_exact() Obtains a line or block from the next filter in the chain. If there are no other filters, then the actual source file is obtained.
import() Creates an instance of the filter. Perl calls So, if you do this: use Milter qw(pinta nina santa-maria); You get in @_[0] => "Milter" @_[1] => "pinta" @_[2] => "nina" @_[3] => "santa-maria"
|