Martin Lorensen > Net-ACL > Net::ACL::Match

Download:
Net-ACL-0.07.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.07   Source  

NAME ^

Net::ACL::Match - Abstract parent class of Match-classes

SYNOPSIS ^

    package Net::ACL::MatchMyPackage;

    use Net::ACL::Match;
    @ISA     = qw( Net::ACL::Match );

    sub new { ... };
    sub match { ... };


    package main;

    # Construction
    my $match = new Net::ACL::MatchMyPackage($args);

    # Accessor Methods
    $rc = $match->match(@data);
    $index = $match->index($index);

DESCRIPTION ^

This is an abstract parent class for all Net::ACL::Match* classes. It is used by the Net::ACL::Rule object.

It only has a constructor new() and two methods match() and index(). Both new and match should be replaced in any ancestor object.

CONSTRUCTOR ^

new() - create a new Net::ACL::Match::Scalar object
    my $match = new Net::ACL::MatchMyPackage($args);

This is the constructor for Net::ACL::Match* objects. It returns a reference to the newly created object. It takes one argument, which should describe what to match.

ACCESSOR METHODS ^

match()

This function should match the data given as arguments (one or more) with the data passed to the constructor and return either ACL_MATCH or ACL_NOMATCH as exported by the ":rc" exporter symbol of Net::ACL::Rule.

index()

This function returns the argument number that matched any sub-class. Called with an argument, the argument is used as the new value.

SEE ALSO ^

Net::ACL::Rule, Net::ACL, Net::ACL::Match::IP, Net::ACL::Match::Prefix, Net::ACL::Match::List, Net::ACL::Match::Scalar, Net::ACL::Match::Regexp, Net::ACL::Match::Member

AUTHOR ^

Martin Lorensen <bgp@martin.lorensen.dk>

syntax highlighting: