dilfridge    14/12/20 17:26:35

  Added:                Shell-EnvImporter-1.70.0-perl520.patch
  Log:
  Fix warnings with Perl 5.20, bug 526188
  
  (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 
84AD142F)

Revision  Changes    Path
1.1                  
dev-perl/Shell-EnvImporter/files/Shell-EnvImporter-1.70.0-perl520.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-perl/Shell-EnvImporter/files/Shell-EnvImporter-1.70.0-perl520.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-perl/Shell-EnvImporter/files/Shell-EnvImporter-1.70.0-perl520.patch?rev=1.1&content-type=text/plain

Index: Shell-EnvImporter-1.70.0-perl520.patch
===================================================================
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.

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();




Reply via email to