diff options
Diffstat (limited to 'dev-perl/Shell-EnvImporter/files/Shell-EnvImporter-1.70.0-perl520.patch')
-rw-r--r-- | dev-perl/Shell-EnvImporter/files/Shell-EnvImporter-1.70.0-perl520.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-perl/Shell-EnvImporter/files/Shell-EnvImporter-1.70.0-perl520.patch b/dev-perl/Shell-EnvImporter/files/Shell-EnvImporter-1.70.0-perl520.patch new file mode 100644 index 000000000000..4ccf44166f39 --- /dev/null +++ b/dev-perl/Shell-EnvImporter/files/Shell-EnvImporter-1.70.0-perl520.patch @@ -0,0 +1,48 @@ +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(); |