Fix Perl warnings

Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771004
This commit is contained in:
Justin B Rye
2014-11-29 12:16:15 +09:00
committed by Tatsuya Kinoshita
parent a9e13f000a
commit 12a1830a85

View File

@@ -34,7 +34,6 @@ Content-Type: text/html
EOF EOF
$keyword =~ s:([^-\w\200-\377.,])::g; $keyword =~ s:([^-\w\200-\377.,])::g;
open(F, "$MAN -k $keyword 2> /dev/null |"); open(F, "$MAN -k $keyword 2> /dev/null |");
@line = ();
while(<F>) { while(<F>) {
chop; chop;
$_ = &html_quote($_); $_ = &html_quote($_);
@@ -158,7 +157,7 @@ EOF
} }
s@(http|ftp)://[\w.\-/~]+[\w/]@<a href="$&">$&</a>@g; s@(http|ftp)://[\w.\-/~]+[\w/]@<a href="$&">$&</a>@g;
s@(\W)(mailto:)?(\w[\w.\-]*\@\w[\w.\-]*\.[\w.\-]*\w)@$1<a href="mailto:$3">$2$3</a>@g; s@\b(mailto:|)(\w[\w.\-]*\@\w[\w.\-]*\.[\w.\-]*\w)@<a href="mailto:$2">$1$2</a>@g;
s@(\W)(\~?/[\w.][\w.\-/~]*)@$1 . &file_ref($2)@ge; s@(\W)(\~?/[\w.][\w.\-/~]*)@$1 . &file_ref($2)@ge;
s@(include(<\/?[bu]\>|\s)*\&lt;)([\w.\-/]+)@$1 . &include_ref($3)@ge; s@(include(<\/?[bu]\>|\s)*\&lt;)([\w.\-/]+)@$1 . &include_ref($3)@ge;
if ($prev && m@^\s*(\<[bu]\>)*(\w[\w.\-]*)(\</[bu]\>)*(\([\dm]\w*\))@) { if ($prev && m@^\s*(\<[bu]\>)*(\w[\w.\-]*)(\</[bu]\>)*(\([\dm]\w*\))@) {
@@ -222,7 +221,7 @@ sub is_command {
local($p); local($p);
(! -d && -x) || return 0; (! -d && -x) || return 0;
if (! defined(%PATH)) { if (! %PATH) {
for $p (split(":", $ENV{'PATH'})) { for $p (split(":", $ENV{'PATH'})) {
$p =~ s@/+$@@; $p =~ s@/+$@@;
$PATH{$p} = 1; $PATH{$p} = 1;