Net::ACL::Match::Prefix - Class matching IP network prefixes.
use Net::ACL::Match::Prefix; # Constructor $match = new Net::ACL::Match::Prefix('10.0.0.0/8'); # Accessor Methods $rc = $match->match('10.0.0.0/16'); # ACL_NOMATCH $rc = $match->match('127.0.0.0/8'); # ACL_NOMATCH $rc = $match->match('10.0.0.0/8'); # ACL_MATCH
This module is just a wrapper of the Net::Netmask module to allow it to operate automaticly with Net::ACL::Rule.
new() - create a new Net::ACL::Match::Prefix object
$match = new Net::ACL::Match::Prefix('10.0.0.0/8');
This is the constructor for Net::ACL::Match::Prefix objects. It returns a reference to the newly created object. Any arguments is parsed directly to the constructor of Net::Netmask.
match()
The method uses Net::Netmask to verify that the base address and the size of the prefixes are the same.
Net::Netmask, Net::ACL, Net::ACL::Rule, Net::ACL::Match::IP, Net::ACL::Match
Martin Lorensen <bgp@martin.lorensen.dk>
To install Net::ACL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::ACL
CPAN shell
perl -MCPAN -e shell install Net::ACL
For more information on module installation, please visit the detailed CPAN module installation guide.