From 6d23b1099df83eca4de8735f75fd1f16a14c63e1 Mon Sep 17 00:00:00 2001 From: short <> Date: Wed, 22 Oct 2003 19:41:06 +0000 Subject: [PATCH] Prevent: Use of uninitialized value in numeric gt (>) | le (<=) --- Web.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"}) { -- 1.8.3.1