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, returns true if any of the items in \@config matches that address, otherwise returns false.
\@config
Normally you use check_device_no and check_device_only, passing the name of the configuration setting to load. This helper instead requires not the name of the setting, but its value.
check_device_no
check_device_only
There are several options for what \@config can contain:
Hostname, IP address, IP prefix
IP address range, using a hyphen and no whitespace
Regular Expression in YAML format (no enforced anchors) which will match the device DNS name (using a fresh DNS lookup, so works on new discovery), e.g.:
- !!perl/regexp ^sep0.*$
"property:regex" - matched against a device property, such as model or vendor (with enforced begin/end regex anchors)
"property:regex"
model
vendor
To simply match all devices, use "any" or IP Prefix "0.0.0.0/0". Property regular expressions are anchored (that is, they must match the whole string). To match no devices we recommend an entry of "localhost" in the setting.
any
0.0.0.0/0
localhost
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.