Subject: | address 0.0.0.0 does not return BigInt object |
Date: | Thu, 6 Oct 2011 14:53:27 -0500 |
To: | bug-Net-IP [...] rt.cpan.org |
From: | Matt Zagrabelny <mzagrabe [...] d.umn.edu> |
Hi,
I am trying to use the BigInt object returned from the intip method
for the IP address '0.0.0.0', the method returns an undef.
A code snippet is below.
#!/usr/bin/env perl
use strict;
use warnings;
use Net::IP;
my $ip = new Net::IP('0.0.0.0') or die "Unable to create IP object.";
my $int = $ip->intip;
if (defined $int) {
print "I am defined.\n";
} else {
print "I am not defined.\n";
}
$ip = new Net::IP('0.0.0.1') or die "Unable to create IP object.";
$int = $ip->intip;
if (defined $int) {
print "I am defined.\n";
} else {
print "I am not defined.\n";
}
Thanks!
-mz