Net::Bind::Utils - various routines common across Net::Bind packages. |
Net::Bind::Utils - various routines common across Net::Bind packages.
use Net::Bind::Utils qw(valid_domain valid_ip);
A catch-all place for various routines that are useful across most,
if not all, of the Net::Bind
interfaces.
This module is not designed to be subclassable.
valid_domain($domain)
Returns 1
if the given $domain
string is defined
and is a domain that bind is capable of resolving,
otherwise returns 0
.
valid_domain_rfc1035($domain)
Returns 1
if the given $domain
string is defined and is a valid
rfc1035 domain name, otherwise returns 0
.
valid_ip($ip)
Returns 1
if the given $ip
string is defined and is an ip
address, otherwise returns 0
.
The check for a valid ip address is currently very simple minded. It merely checks for a dotted-quad with all non-negative numbers with no number larger than 254.
valid_netmask($netmask)
Returns 1
if the given $netmask
string is defined and is a
netmask, otherwise return 0
.
The check for a valid netmask is currently very simple minded. It merely checks for a dotted-quad with all non-negative numbers with no number larger than 255.
Kevin Johnson <kjj@pobox.com> Rob Brown <rob@roobik.com>
Copyright (c) 1997 Kevin Johnson <kjj@pobox.com>. Copyright (c) 2001 Rob Brown <rob@roobik.com>.
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Net::Bind::Utils - various routines common across Net::Bind packages. |