Name

import

Synopsis

import()

Creates an instance of the filter. Perl calls import indirectly when it encounters use Milter in your Perl program. import will always have one parameter passed by Perl, which corresponds to the name of your package—in this case, Milter.

So, if you do this:

use Milter qw(pinta nina santa-maria);

You get in @_:

@_[0] => "Milter"
@_[1] => "pinta"
@_[2] => "nina"
@_[3] => "santa-maria"

import then calls filter_add before finishing.

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.