git: 689b33b101 - main - ports.cgi: less 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=689b33b10128b53ffdc1ed16815d5ce9e08f8b7a

commit 689b33b10128b53ffdc1ed16815d5ce9e08f8b7a
Author:     Wolfram Schneider <[email protected]>
AuthorDate: 2026-01-20 20:47:31 +0000
Commit:     Wolfram Schneider <[email protected]>
CommitDate: 2026-01-20 20:47:31 +0000

    ports.cgi: less perl warnings
---
 website/content/en/cgi/ports.cgi | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi
index 28ac84bca2..5c1084cc90 100755
--- a/website/content/en/cgi/ports.cgi
+++ b/website/content/en/cgi/ports.cgi
@@ -556,22 +556,20 @@ EOF
 
 &init_variables;
 $query_string = &env('QUERY_STRING');
-$path_info    = &env('PATH_INFO');
+$path_info    = &env('PATH_INFO') // "";
 &decode_form( $query_string, *form );
 
 $section     = $form{'sektion'};
 $section     = 'all' if ( !$section );
-$query       = $form{'query'};
-$stype       = $form{'stype'};
+$query       = $form{'query'}    // "";
+$stype       = $form{'stype'}    // "";
 $sourceid    = $form{'sourceid'} // "";
 $script_name = &env('SCRIPT_NAME');
 $max         = $form{'max'} // $max_hits_default;
 
 if ( $path_info eq "/source" ) {
-
-    # XXX
     print "Content-type: text/plain\n\n";
-    open( R, $0 ) || do { print "ick!\n"; &exit; };
+    open( R, $0 ) || do { warn "open $0: $!!\n"; &exit; };
     while (<R>) { print }
     close R;
     &exit;
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.