From: Graham Knop Date: Thu, 28 Nov 2013 03:03:21 +0000 (-0500) Subject: cope better when deactivating param not passed X-Git-Tag: v2.000_000~59 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee0e18400d9160c091cc40480006c05c929d4d25;p=p5sagit%2Flocal-lib.git cope better when deactivating param not passed --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 5741fa1..8033d19 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -363,9 +363,9 @@ sub setup_env_hash_for { sub build_environment_vars_for { my ($class, $path, $deactivating, $interpolate) = @_; - if ($deactivating == DEACTIVATE_ONE) { + if ($deactivating && $deactivating == DEACTIVATE_ONE) { return $class->build_deactivate_environment_vars_for($path, $interpolate); - } elsif ($deactivating == DEACTIVATE_ALL) { + } elsif ($deactivating && $deactivating == DEACTIVATE_ALL) { return $class->build_deact_all_environment_vars_for($path, $interpolate); } else { return $class->build_activate_environment_vars_for($path, $interpolate);