shut up perl -T warnings and make this script run again.

Reported by: Iwan
This commit is contained in:
Wolfram Schneider 2007-03-19 18:26:27 +00:00
parent 5433818b11
commit bd2d4b809e
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=29844

View file

@ -33,7 +33,7 @@
# BSDI Id: bsdi-man,v 1.2 1995/01/11 02:30:01 polk Exp # BSDI Id: bsdi-man,v 1.2 1995/01/11 02:30:01 polk Exp
# Dual CGI/Plexus mode and new interface by sanders@bsdi.com 9/22/1995 # Dual CGI/Plexus mode and new interface by sanders@bsdi.com 9/22/1995
# #
# $Id: man.cgi,v 1.170 2007-02-23 21:09:54 ceri Exp $ # $Id: man.cgi,v 1.171 2007-03-19 18:26:27 wosch Exp $
############################################################################ ############################################################################
# !!! man.cgi is stale perl4 code !!! # !!! man.cgi is stale perl4 code !!!
@ -488,6 +488,8 @@ sub do_man {
if (!$apropos && $query =~ m/^(.*)\(([^\)]*)\)/) { if (!$apropos && $query =~ m/^(.*)\(([^\)]*)\)/) {
$name = $1; $section = $2; $name = $1; $section = $2;
} }
$name = $1 if $name =~ /^([\w\-]+)$/;
$section = $1 if $section =~ /^([\w\-]+)$/;
$apropos ? &apropos($query) : &man($name, $section); $apropos ? &apropos($query) : &man($name, $section);
} }
@ -714,7 +716,7 @@ sub man {
push(@manargs, '-t'); push(@manargs, '-t');
} }
# print "X $command{'man'} @manargs -- x $name x\n"; # warn "X $command{'man'} @manargs -- x $name x\n";
&proc(*MAN, $command{'man'}, @manargs, "--", $name) || &proc(*MAN, $command{'man'}, @manargs, "--", $name) ||
&mydie ("$0: open of $command{'man'} command failed: $!\n"); &mydie ("$0: open of $command{'man'} command failed: $!\n");
if (eof(MAN)) { if (eof(MAN)) {
@ -1081,7 +1083,7 @@ ETX
} }
sub copyright { sub copyright {
$id = '$Id: man.cgi,v 1.170 2007-02-23 21:09:54 ceri Exp $'; $id = '$Id: man.cgi,v 1.171 2007-03-19 18:26:27 wosch Exp $';
return qq{\ return qq{\
<PRE> <PRE>
@ -1133,7 +1135,7 @@ sub faq {
&encode_url($_) . "\n") if $manPathAliases{$_}; &encode_url($_) . "\n") if $manPathAliases{$_};
} }
local $id = '$Id: man.cgi,v 1.170 2007-02-23 21:09:54 ceri Exp $'; local $id = '$Id: man.cgi,v 1.171 2007-03-19 18:26:27 wosch Exp $';
return qq{\ return qq{\
<PRE> <PRE>
Copyright (c) 1996-2007 <a href="$mailtoURL">Wolfram Schneider</A> Copyright (c) 1996-2007 <a href="$mailtoURL">Wolfram Schneider</A>