Skip Menu |

This queue is for tickets about the Net-Netmask CPAN distribution.

Report information
The Basics
Id: 11599
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Net-Netmask

People
Owner: MUIR [...] cpan.org
Requestors: peter [...] timisoara.roedu.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



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"; }
[guest - Mon Feb 21 09:22:33 2005]: I have the same problem with ActivePerl v5.8.4 on a Windows machine. Show quoted text
> 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"; > }