From: short <> Date: Wed, 22 Oct 2003 19:41:06 +0000 (+0000) Subject: Prevent: Use of uninitialized value in numeric gt (>) | le (<=) X-Git-Tag: bp_apache2~8 X-Git-Url: http://git.jankratochvil.net/?p=MyWeb.git;a=commitdiff_plain;h=6d23b1099df83eca4de8735f75fd1f16a14c63e1 Prevent: Use of uninitialized value in numeric gt (>) | le (<=) --- diff --git a/Web.pm b/Web.pm index 0d4625b..8073616 100644 --- a/Web.pm +++ b/Web.pm @@ -158,7 +158,7 @@ my($class,%args)=@_; $W->{"browser"}=HTTP::BrowserDetect->new($W->{"user_agent"}); if (!defined $W->{"have_style"}) { - $W->{"have_style"}=(!$W->{"browser"}->netscape() || $W->{"browser"}->major>4 ? 1 : 0); + $W->{"have_style"}=(!$W->{"browser"}->netscape() || ($W->{"browser"}->major() && $W->{"browser"}->major()>4) ? 1 : 0); } $W->{"have_js"}=($W->{"args"}{"have_js"} ? 1 : 0); @@ -638,7 +638,7 @@ HERE } print "{"browser"}->netscape() && $W->{"browser"}->major<=4; + if $W->{"browser"}->netscape() && (!$W->{"browser"}->major() || $W->{"browser"}->major()<=4); print ">\n"; if ($W->{"heading"}) {