Skip Menu |

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

Report information
The Basics
Id: 7070
Status: resolved
Priority: 0/
Queue: NetAddr-IP

People
Owner: luismunoz [...] cpan.org
Requestors: gcbrowni [...] grnoc.iu.edu
Cc:
AdminCc:

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



Subject: NetAddr::IP "++" not working with IPv6
The "++" operation doesn't seem to work with IPv6 addresses. The code "$ip++;" doesn't seem to increment the address. It's not too big a deal; a normal increment (shown below) seems to work fine. This is a great library. use NetAddr::IP; $ip = new NetAddr::IP('2001:468:ff:fffe::2/64'); for ($i=0;$i<10;$i++) { print $ip->addr(),"\n"; $ip=$ip+1;; }
[guest - Fri Jul 23 09:07:32 2004]: Show quoted text
> The "++" operation doesn't seem to work with IPv6 addresses. The code > "$ip++;" doesn't seem to increment the address. It's not too big a > deal; a normal increment (shown below) seems to work fine.
Next release will fix this. Unfortunately, this being an anonymous report, I cannot credit you for discovering the flaw. Show quoted text
> This is a great library.
Thanks. Show quoted text
> use NetAddr::IP; > $ip = new NetAddr::IP('2001:468:ff:fffe::2/64'); > for ($i=0;$i<10;$i++) { > print $ip->addr(),"\n"; > $ip=$ip+1;; > }
A reg rest for this problem has been added to the distribution. Best regards. -lem