From: Graham Knop Date: Wed, 20 Nov 2013 05:35:44 +0000 (-0500) Subject: fix conditional to skip unchanged vars X-Git-Tag: v2.000_000~30 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f39aa2f9253fa8a04a286d37bb55fa704c2e806c;p=p5sagit%2Flocal-lib.git fix conditional to skip unchanged vars --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 9a8e93f..f1a6dd6 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -321,8 +321,11 @@ sub environment_vars_string_for { && ${$value->[0]} eq $name) { next; } - if (!ref $value - && defined $value ? $value eq $ENV{$name} : !defined $ENV{$name} + if ( + !ref $value + and defined $value + ? (defined $ENV{$name} && $value eq $ENV{$name}) + : !defined $ENV{$name} ) { next; }