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


Net-ACL documentation  | view source Contained in the Net-ACL distribution.

Index


NAME

Top

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

SYNOPSIS

Top

    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

Top

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

Top

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

Top

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

Top

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

Top

Martin Lorensen <bgp@martin.lorensen.dk>


Net-ACL documentation  | view source Contained in the Net-ACL distribution.