Skip Menu |

This queue is for tickets about the App-perlmv CPAN distribution.

Report information
The Basics
Id: 101288
Status: resolved
Priority: 0/
Queue: App-perlmv

People
Owner: Nobody in particular
Requestors: vlasenko [...] imath.kiev.ua
Cc:
AdminCc:

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



Subject: process_item goes into infinite loop
for perl 5.20.1 and App-perlmv CPAN release 0.46 build fails as test goes [...] Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App-perlmv-0.46/blib/lib/App/perlmv.pm line 450. Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App-perlmv-0.46/blib/lib/App/perlmv.pm line 450. Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App-perlmv-0.46/blib/lib/App/perlmv.pm line 450. [...] it is because Cwd::abs_path returns undef if file does not exist, so the loop goes forever. the patch below helped to bypass the loop, but still a lot of tests failed. --- lib/App/perlmv.pm 2015-01-04 19:44:56.568798006 +0000 +++ lib/App/perlmv.pm 2015-01-04 19:46:27.980795708 +0000 @@ -416,7 +416,7 @@ my $new = $_; my $anew = abs_path($new); #die "Invalid path $new" unless defined($anew); - $anew = "" if !defined($anew); + $anew = $new if !defined($anew); $self->{_exists}{$aold}++ if (-e $aold); return if $aold eq $anew; @@ -447,9 +447,11 @@ unless ($self->{'overwrite'}) { my $i = 1; while (1) { + #print STDERR "i=$i new=$new anew=$anew\n"; if ((-e $new) || exists $self->{_exists}{$anew}) { $new = "$orig_new.$i"; $anew = abs_path($new); + $anew = $new if !defined($anew); $i++; } else { last;
Subject: hsh.log

Message body is not shown because it is too large.

On Sun Jan 04 15:10:10 2015, VIY wrote: Show quoted text
> for perl 5.20.1 and App-perlmv CPAN release 0.46 build fails as test > goes > [...] > Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App- > perlmv-0.46/blib/lib/App/perlmv.pm line 450. > Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App- > perlmv-0.46/blib/lib/App/perlmv.pm line 450. > Use of uninitialized value $anew in exists at /usr/src/RPM/BUILD/App- > perlmv-0.46/blib/lib/App/perlmv.pm line 450. > [...] > > it is because Cwd::abs_path returns undef if file does not exist, so > the loop goes forever. > the patch below helped to bypass the loop, but still a lot of tests > failed. > > --- lib/App/perlmv.pm 2015-01-04 19:44:56.568798006 +0000 > +++ lib/App/perlmv.pm 2015-01-04 19:46:27.980795708 +0000 > @@ -416,7 +416,7 @@ > my $new = $_; > my $anew = abs_path($new); > #die "Invalid path $new" unless defined($anew); > - $anew = "" if !defined($anew); > + $anew = $new if !defined($anew); > > $self->{_exists}{$aold}++ if (-e $aold); > return if $aold eq $anew; > @@ -447,9 +447,11 @@ > unless ($self->{'overwrite'}) { > my $i = 1; > while (1) { > + #print STDERR "i=$i new=$new anew=$anew\n"; > if ((-e $new) || exists $self->{_exists}{$anew}) { > $new = "$orig_new.$i"; > $anew = abs_path($new); > + $anew = $new if !defined($anew); > $i++; > } else { > last;
I'm resolving this issue by using l_abs_path() instead of abs_path(). Could you test if the newly released 0.47 solves your issue?