git: a38a04e231 - main - ports.cgi: no perl warnings

Wolfram Schneider <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by wosch:

URL: https://cgit.FreeBSD.org/doc/commit/?id=a38a04e231c65ccd9cec2e11f7b4d73a420f64d7

commit a38a04e231c65ccd9cec2e11f7b4d73a420f64d7
Author:     Wolfram Schneider <[email protected]>
AuthorDate: 2026-01-19 09:49:57 +0000
Commit:     Wolfram Schneider <[email protected]>
CommitDate: 2026-01-19 09:49:57 +0000

    ports.cgi: no perl warnings
---
 website/content/en/cgi/ports.cgi | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index c842df6e5d..4260a89b37 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -30,8 +30,10 @@
 use POSIX qw(strftime);
 use Time::Local;
 
+our $hsty_base;
 require "./cgi-style.pl";
-$t_style = qq`
+
+our $t_style = qq`
 <style type="text/css">
 h3 { font-size: 1.2em; border-bottom: thin solid black; }
 span.footer_links { font-size: small; }
@@ -173,7 +175,6 @@ s/([\000-\032\;\/\?\:\@\&\=\%\'\"\`\<\>\177-\377 ])/sprintf('%%%02x',ord($1))/eg
     $_;
 }
 
-sub warn { print "$_[0]" }
 sub env  { defined( $ENV{ $_[0] } ) ? $ENV{ $_[0] } : undef; }
 sub exit { exit 0 }
 
@@ -256,7 +257,7 @@ sub readcoll {
 # basic function for HTML output
 sub out {
     local ($line) = @_;
-    local (
+    my (
         $version, $path,     $local,    $comment,  $descfile,
         $email,   $sections, $bdepends, $rdepends, @rest
     ) = split( /\|/, $line );
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.