Subject: | undef not returned it findNetblock |
Description:
findNetblock should return undef if the given IP is not found in any stored blocks (conforming to online documentation). It doesn't.
Solution:
My guess is that adding a line like
return undef();
at the end of the function should work. I did so and seems ok.
Additional data:
using: Net-Netmask-1.9011 (installed from cpan)
perl: v5.8.5 built for i386-linux-thread-multi
os: Fedora Core 3
proof of concept:
$block = new2 Net::Netmask("10.1.2.0/24");
$block->storeNetblock();
if(defined(findNetblock("192.168.1.1"))) {
print "address found\n";
} else {
print "address not found\n";
}