Skip Menu |

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

Report information
The Basics
Id: 41438
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: NetAddr-IP

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

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



Subject: new6 does not take numeric (decimal) address?
Hola, If I'm reading the documentation well, this should work, yes? #!/usr/bin/perl -w use strict; use NetAddr::IP; use Math::BigInt; my $n = new Math::BigInt "42540577535367674011024906890208295963"; my $ip = NetAddr::IP->new6($n); print $ip->addr(); However, it prints "0:0:0:0:0:0:FFFF:FFFF". Thank you. cv
Subject: Re: [rt.cpan.org #41438] new6 does not take numeric (decimal) address?
Date: Fri, 05 Dec 2008 11:01:25 -0800
To: bug-NetAddr-IP [...] rt.cpan.org
From: michael [...] insulin-pumpers.org
Show quoted text
> Thu Dec 04 16:13:55 2008: Request 41438 was acted upon. > Transaction: Ticket created by CVICENTE > Queue: NetAddr-IP > Subject: new6 does not take numeric (decimal) address? > Broken in: 4.019 > Severity: (no value) > Owner: Nobody > Requestors: cvicente@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=41438 > > >
Yes, it should work. Currently working on a recently introduced bug. The underlying XS library was converted to be re-entrant and all has not gone as planned apparently. Still working one finding the bug. I suggest you downgrade to 4.017 Go to http://search.cpan.org/~miker/NetAddr-IP-4.019/ select the 4.017 release from "Other Releases" Michael Show quoted text
> Hola, > > If I'm reading the documentation well, this should work, yes? > > #!/usr/bin/perl -w > > use strict; > use NetAddr::IP; > use Math::BigInt; > > my $n = new Math::BigInt "42540577535367674011024906890208295963"; my > $ip = NetAddr::IP->new6($n); print $ip->addr(); > > However, it prints "0:0:0:0:0:0:FFFF:FFFF". > > Thank you. > > cv
Regexp to parse "numbers" was never included in the code for some reason. It is fixed in version 4.020 BTW my $n = '12345678901234567890'; and my $n = Math::BigInt->new('12345678901234567890'); are equivalent. Math::BigInt returns a string for the operation below. my $ip = NetAddr::IP->new($n); In addtion to extended ipV6 support, the purpose of release 4.xx was to remove dependence on Math::BigInt from NetAddr::IP Michael