App::Netdisco::Util::Permission
Helper subroutines to support parts of the Netdisco application.
There are no default exports, however the :all tag will export all subroutines.
:all
Given an IP address, object instance, or hash, returns true if the configuration setting $setting_name matches, else returns false.
$setting_name
Usage of this function is strongly advised to be of the form:
QUIT/SKIP IF acl_matches
The function fails safe, so if the content of the setting or ACL is undefined or an empty string, then acl_matches also returns true.
acl_matches
If $setting_name is a valid setting, then it will be resolved to the access control list, else we assume you passed an ACL entry or ACL.
See the Netdisco wiki for details of what $acl may contain.
$acl
This is an alias for acl_matches.
QUIT/SKIP UNLESS acl_matches_only
The function fails safe, so if the content of the setting or ACL is undefined or an empty string, then acl_matches_only also returns false.
acl_matches_only
Further, if the setting or ACL resolves to a list but the list has no items, then acl_matches_only returns true (as if there is a successful match).
This is an alias for acl_matches_only.
Given an IP address, object instance, or hash, compares it to the items in \@acl then returns true or false. You can control whether any item must match or all must match, and items can be negated to invert the match logic.
\@acl
Also accepts an array reference of multiple IP addresses, object instances, and hashes, and will test against each in turn, for each ACL rule.
The slots alias, ip, switch, and addr are looked for in the instance or hash and used to compare a bare IP address (so it works with most Netdisco database classes, and the NetAddr::IP class). Any instance or hash slot can be used as an ACL named property.
alias
ip
switch
addr
There are several options for what \@acl may contain. See the Netdisco wiki for the details.
To install App::Netdisco, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Netdisco
CPAN shell
perl -MCPAN -e shell install App::Netdisco
For more information on module installation, please visit the detailed CPAN module installation guide.