Bug 197416

Summary: looping example fails when incrementing loop variable
Product: [Fedora] Fedora Reporter: Kazuyuki Maejima <kmaejima>
Component: perl-Net-IPAssignee: Robin Norwood <robin.norwood>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: perl-devel
Target Milestone: ---   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: 1.25-1.fc5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-22 18:04:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kazuyuki Maejima 2006-07-01 05:31:05 UTC
Description of problem:
Looping example found in Net::IP man page stops before the second iteration
because the ++ operator turns the loop variable undef.

Version-Release number of selected component (if applicable):
1.24-2.2

How reproducible:
Always.

Steps to Reproduce:
1. Create a perl script named looping.pl:
use Net::IP;
my $ip = new Net::IP ('195.45.6.7 - 195.45.6.19') || die;
# Loop
do {
    print $ip->ip(), "\n";
} while (++$ip);

2. Run it.
$ perl looping.pl

Actual results:
195.45.6.7

Expected results:
195.45.6.7
195.45.6.8
195.45.6.9
195.45.6.10
195.45.6.11
195.45.6.12
195.45.6.13
195.45.6.14
195.45.6.15
195.45.6.16
195.45.6.17
195.45.6.18
195.45.6.19

Additional info:
Net::IP 1.25 seems to fix this.
The example works with perl-Net-IP-1.25-1.fc6 of FC6test1.

Comment 1 Jason Vas Dias 2006-07-05 20:16:57 UTC
Now fixed with perl-Net-IP-1.25-1.fc5, being released to FC-5 Updates/Testing.


Comment 2 Fedora Update System 2006-07-07 03:44:11 UTC
perl-Net-IP-1.25-1.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 3 Fedora Update System 2006-07-17 23:16:36 UTC
perl-Net-IP-1.25-1.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 4 Robin Norwood 2006-11-22 18:04:49 UTC
Seems to be fixed.