From: Graham Knop Date: Wed, 20 Nov 2013 15:23:17 +0000 (-0500) Subject: fix precedence in csh extra vars output X-Git-Tag: v2.000_000~25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=65d67789387eed86a17ca399ae07e6bf098881a7;p=p5sagit%2Flocal-lib.git fix precedence in csh extra vars output --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 47d9bef..248e8c5 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -349,9 +349,9 @@ sub build_csh_env_declaration { my ($class, $name, $args) = @_; my ($value, @vars) = $class->_interpolate($args, undef, undef, '"', qq{"\\"}); (join '', map qq{if ! \$?$_ setenv $_ "";\n}, @vars) - . defined $value + . (defined $value ? qq{setenv $name "$value";\n} - : qq{unsetenv $name;\n}; + : qq{unsetenv $name;\n}); } sub build_cmd_env_declaration { my ($class, $name, $args) = @_;