diff --git a/IP.pm b/IP.pm index 8a845df..efa1d8d 100644 --- a/IP.pm +++ b/IP.pm @@ -8,6 +8,8 @@ use strict; use warnings; +our $VERSION = '3.09'; + ############################################# # These are the overload methods, placed here # for convenience. @@ -139,8 +141,6 @@ ############################################# -our $VERSION = '3.08'; - # Preloaded methods go here. # This is a variant to ->new() that @@ -262,7 +262,7 @@ for my $i ($1, $2, $3, $4) { return undef unless grep { $i == $_ } - (255, 254, 252, 248, 224, 192, 160, 128, 0); + (255, 254, 252, 248, 240, 224, 192, 128, 0); } return undef if ($1 < $2 or $2 < $3 or $3 < $4); @@ -1463,6 +1463,16 @@ =back +=item 3.09 + +=over + +=item * + +Fixed typo that invalidated otherwise correct masks. This bug appeared in 3.08. + +=back + =back =head1 AUTHOR diff --git a/t/v4-new.t b/t/v4-new.t index bb18a18..7e12587 100644 --- a/t/v4-new.t +++ b/t/v4-new.t @@ -20,6 +20,7 @@ [ 'default', '0.0.0.0' ], [ 32, '255.255.255.255' ], [ 0xffffff00, '255.255.255.0' ], + [ '255.255.255.240', '255.255.255.240' ], [ '255.255.128.0', '255.255.128.0' ], [ 0b11111111111111110000000000000000, '255.255.0.0' ], );