Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-Validate-IP CPAN distribution.

Report information
The Basics
Id: 81700
Status: resolved
Priority: 0/
Queue: Data-Validate-IP

People
Owner: Nobody in particular
Requestors: DROLSKY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in:
  • 0.15-TRIAL
  • 0.16-TRIAL
  • 0.17
  • 0.18



Subject: is_ipv6('::') returns false
I've attached a patch that fixes this. BTW, if you're looking for a new (co-)maintainer I'd be happy to help. We use this module at $WORK so I have some tuits to spend on it. -dave
Subject: Data-Validate-IP.patch
Only in Data-Validate-IP-0.14.new/lib/Data/Validate: .#IP.pm Only in Data-Validate-IP-0.14.new/lib/Data/Validate: #IP.pm# diff -ru Data-Validate-IP-0.14/lib/Data/Validate/IP.pm Data-Validate-IP-0.14.new/lib/Data/Validate/IP.pm --- Data-Validate-IP-0.14/lib/Data/Validate/IP.pm 2011-01-06 08:29:26.000000000 -0600 +++ Data-Validate-IP-0.14.new/lib/Data/Validate/IP.pm 2012-12-04 10:31:25.606582591 -0600 @@ -233,6 +233,7 @@ return unless defined($value); + return $value if $value eq '::'; # if there is a :: then there must be only one :: # and the length can be variable # without it, the length must be 8 groups diff -ru Data-Validate-IP-0.14/t/Data-Validate-IP.t Data-Validate-IP-0.14.new/t/Data-Validate-IP.t --- Data-Validate-IP-0.14/t/Data-Validate-IP.t 2011-01-06 08:42:15.000000000 -0600 +++ Data-Validate-IP-0.14.new/t/Data-Validate-IP.t 2012-12-04 10:30:48.189855230 -0600 @@ -66,6 +66,12 @@ is (is_ipv6('::ffff:12.34.56.78'), '::ffff:12.34.56.78', 'is_ipv6 ::ffff:12.34.56.78'); is (is_ipv6('0:0:0:0:0:ffff:12.34.56.78'), '0:0:0:0:0:ffff:12.34.56.78', 'is_ipv6 0:0:0:0:0:ffff:12.34.56.78'); +is (is_ipv6('::'), '::', 'is_ipv6 ::'); +is (is_ipv6('::0'), '::0', 'is_ipv6 ::0'); +is (is_ipv6('::00'), '::00', 'is_ipv6 ::00'); +is (is_ipv6('::000'), '::000', 'is_ipv6 ::000'); +is (is_ipv6('::0000'), '::0000', 'is_ipv6 ::0000'); + is (is_ipv6('2067::'), '2067::', 'is_ipv6 2607::'); is (is_ipv6('2067:::'), undef, 'is_ipv6 2607:::'); is (is_ipv6('2067:::1'), undef, 'is_ipv6 2607:::1');