On 11/2/10 7:35 PM, Mark Martinec wrote:
One suggestion: currently it is not possible to store 0 and 1 as a data item associated with each net, because a 0 is treated the same as undef and replaced by the key. And the AF_NET6 argument to new() needs to be documented in a POD. Thanks for your efforts! Mark
Try the following patch. If it works for you, I'll rerelease as 1.19: --- Patricia.pm.orig 2010-10-23 17:26:03.000000000 -0600 +++ Patricia.pm 2010-11-07 21:36:30.000000000 -0700 @@ -216,7 +216,7 @@ sub add { my ($self, $ip, $bits, $data) = @_; - $data ||= $bits ? "$ip/$bits" : $ip; + $data ||= defined $bits ? "$ip/$bits" : $ip; my $packed = inet_pton(AF_INET6, $ip) || croak("invalid key"); $self->SUPER::_add(AF_INET6,$packed,(defined $bits ? $bits : 128), $data); }