|load() - Load one or more Net::ACL objects from a configuration string.||
$list_hr = load Net::ACL::File($config);
This special constructor parses a Cisco-like router configuration.
The constructor takes one argument which should either be a string or a Cisco::Reconfig object.
It returns a hash reference. The hash is indexed on list-types. Currently supporting the following:
Each list-type hash value contains a new hash reference indexed on list names or numbers.
add_listtype() The add_listtype() class method registers a new class of access-lists.
The first argument is the type-string of the new class. The second argument is the class to be registered. The class should be a sub-class of Net::BGP::File::Standard. Normally this should be __PACKAGE__.
The third argument is used to match the lines in the configuration file using Cisco::Reconfigs get() method. If match argument is not defined, the type string will be used.
The forth argument is used to load the class with a use statement. This should only be needed if the class is located in a different package. Default is the class name from the second argument.
asconfig() This function tries to generate a configuration matching the one the load constructer got. It can read from any access-list. The resulting configuration is returned as a string.
All ACLs which rules support the asconfig method may be used. To do so, use:
$conf = Net::ACL::File->asconfig($acl);
Martin Lorensen <email@example.com>
|perl v5.20.3||NET::ACL::FILE (3)||2003-06-06|