blob: 4ccf44166f39bbcb0d79100ca10d5cf4feb73a45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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();
|