From: Daniel Kahn Gillmor Date: Tue, 12 Oct 2010 07:44:43 +0000 (-0400) Subject: simple env variable cleanup (treating empty environment variables as unset) X-Git-Tag: msva-perl_debian/0.5-1~1^2~3 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=f47f8ad67c6a9567d964d44981dcfbba7803901c;p=monkeysphere-validation-agent.git simple env variable cleanup (treating empty environment variables as unset) --- diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index 8ae6b9b..72c7167 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -115,7 +115,8 @@ my $class = shift; my $port = 0; - if (exists $ENV{MSVA_PORT}) { + if (exists $ENV{MSVA_PORT} and $ENV{MSVA_PORT} ne '') { + msvalog('debug', "MSVA_PORT set to %s\n", $ENV{MSVA_PORT}); $port = $ENV{MSVA_PORT} + 0; die sprintf("not a reasonable port %d", $port) if (($port >= 65536) || $port <= 0); }