Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 387114 Details for
Bug 526188
dev-perl/Shell-EnvImporter-1.70.0-r1 on dev-lang/perl-5.20.1-r1 reports warnings in app-portage/g-cpan-0.16.5
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix warnings
gentoo526188a.patch (text/plain), 2.20 KB, created by
Martin von Gagern
on 2014-10-21 08:09:45 UTC
(
hide
)
Description:
Fix warnings
Filename:
MIME Type:
Creator:
Martin von Gagern
Created:
2014-10-21 08:09:45 UTC
Size:
2.20 KB
patch
obsolete
>Avoid warnings on perl 5.20. > >"Possible precedence issue with control flow operator > at Shell/EnvImporter/Result.pm line 88" > >This one is due to the fact that "return ..." binds more strongly than >"and", so the function would simply "return $self->shell_status == 0", >disregarding $self->command_status and $self->env_status. >Changing "and" to "&&" solves this issue. > >"Use of uninitialized value $_[1] in read at IO/Handle.pm" > >This is because we don't initialize the hash "%buf" into which we read. >Initializing the relevant keys with the empty string solves this issue. > >As a drive-by fix, we change the pipe handling so that the "last" >command breaks the "while" loop, not the inner "foreach" loop. > >References: >* https://rt.cpan.org/Public/Bug/Display.html?id=86171 >* https://github.com/gentoo-perl/g-cpan/issues/6 >* https://github.com/gentoo-perl/g-cpan/issues/6 > >2014-10-21 Martin von Gagern > >diff -ur Shell-EnvImporter-1.07/lib/Shell/EnvImporter/Result.pm Shell-EnvImporter/lib/Shell/EnvImporter/Result.pm >--- Shell-EnvImporter-1.07/lib/Shell/EnvImporter/Result.pm 2006-09-01 03:53:30.000000000 +0200 >+++ Shell-EnvImporter/lib/Shell/EnvImporter/Result.pm 2014-10-21 09:34:00.814867969 +0200 >@@ -84,8 +84,8 @@ > ############### > my $self = shift; > >- return $self->shell_status == 0 and >- $self->command_status == 0 and >+ return $self->shell_status == 0 && >+ $self->command_status == 0 && > $self->env_status == 0; > > } >diff -ur Shell-EnvImporter-1.07/lib/Shell/EnvImporter/Shell.pm Shell-EnvImporter/lib/Shell/EnvImporter/Shell.pm >--- Shell-EnvImporter-1.07/lib/Shell/EnvImporter/Shell.pm 2009-07-03 07:00:30.000000000 +0200 >+++ Shell-EnvImporter/lib/Shell/EnvImporter/Shell.pm 2014-10-21 09:35:08.010881726 +0200 >@@ -183,7 +183,7 @@ > my $s = IO::Select->new($fh{'STDOUT'}, $fh{'STDERR'}); > > my $t0 = time; >- my %buf; >+ my %buf = (STDOUT => '', STDERR => ''); > while (1) { > > my @ready = $s->can_read(); >@@ -193,11 +193,11 @@ > my $pipename = $h2p{"$ready"}; > if ($ready->eof) { > $s->remove($ready); >- last unless ($s->count); > } else { > $ready->read($buf{$pipename}, BLKSIZE, length($buf{$pipename})); > } > } >+ last unless ($s->count); > > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 526188
: 387114