From: W. Trevor King Date: Thu, 26 May 2011 11:33:52 +0000 (-0400) Subject: Give default value for $loglevel. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=25e6dddb9feee416ce7c4201a58109b53e74876e;p=monkeysphere-validation-agent.git Give default value for $loglevel. This fixes the following warning: Use of uninitialized value $loglevel in lc at Crypt/Monkeysphere/Logger.pm line 91. --- diff --git a/Crypt/Monkeysphere/Logger.pm b/Crypt/Monkeysphere/Logger.pm index 4dc0874..2891597 100644 --- a/Crypt/Monkeysphere/Logger.pm +++ b/Crypt/Monkeysphere/Logger.pm @@ -88,6 +88,9 @@ my $class = shift; my $loglevel = shift; + $loglevel = 1 + if (!defined $loglevel); + my $self = {loglevel => $loglevels{lc($loglevel)}}; $self->{loglevel} = $loglevels{error} if (!defined $self->{loglevel});