Bug 197416 - looping example fails when incrementing loop variable
looping example fails when incrementing loop variable
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: perl-Net-IP (Show other bugs)
5
noarch Linux
medium Severity medium
: ---
: ---
Assigned To: Robin Norwood
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-01 01:31 EDT by Kazuyuki Maejima
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.25-1.fc5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-22 13:04:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kazuyuki Maejima 2006-07-01 01:31:05 EDT
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 16:16:57 EDT
Now fixed with perl-Net-IP-1.25-1.fc5, being released to FC-5 Updates/Testing.
Comment 2 Fedora Update System 2006-07-06 23:44:11 EDT
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 19:16:36 EDT
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 13:04:49 EST
Seems to be fixed.

Note You need to log in before you can comment on or make changes to this bug.