Prevent: Use of uninitialized value in numeric gt (>) | le (<=)
authorshort <>
Wed, 22 Oct 2003 19:41:06 +0000 (19:41 +0000)
committershort <>
Wed, 22 Oct 2003 19:41:06 +0000 (19:41 +0000)
Web.pm

diff --git a/Web.pm b/Web.pm
index 0d4625b..8073616 100644 (file)
--- 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 "</head><body";
        print ' bgcolor="black" text="white" link="aqua" vlink="teal"'
-                       if $W->{"browser"}->netscape() && $W->{"browser"}->major<=4;
+                       if $W->{"browser"}->netscape() && (!$W->{"browser"}->major() || $W->{"browser"}->major()<=4);
        print ">\n";
 
        if ($W->{"heading"}) {