Change 23658 by [EMAIL PROTECTED] on 2004/12/16 15:58:06
Two pod2html patches from Dave Sparks :
Fix anchors for some function names
Subject: pod2html fragment fix [PATCH]
From: Gisle Aas <[EMAIL PROTECTED]>
Date: 11 Nov 2004 14:36:46 +0100
Message-ID: <[EMAIL PROTECTED]>
Subject: Make 'pod2html --quiet' be quiet [PATCH]
From: Gisle Aas <[EMAIL PROTECTED]>
Date: 11 Nov 2004 15:19:58 +0100
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/lib/Pod/Html.pm#69 edit
Differences ...
==== //depot/perl/lib/Pod/Html.pm#69 (text) ====
Index: perl/lib/Pod/Html.pm
--- perl/lib/Pod/Html.pm#68~21884~ Fri Dec 12 16:09:01 2003
+++ perl/lib/Pod/Html.pm Thu Dec 16 07:58:06 2004
@@ -530,7 +530,7 @@
} else {
/^=(\S*)\s*/;
warn "$0: $Podfile: unknown pod directive '$1' in "
- . "paragraph $Paragraph. ignoring.\n";
+ . "paragraph $Paragraph. ignoring.\n" unless $Quiet;
}
}
$Top = 0;
@@ -889,7 +889,7 @@
scan_items( \%Items, "$pod", @poddata);
} else {
- warn "$0: shouldn't be here (line ".__LINE__."\n";
+ warn "$0: shouldn't be here (line ".__LINE__."\n" unless $Quiet;
}
}
@poddata = (); # clean-up a bit
@@ -1065,7 +1065,7 @@
my $level = $1;
if( $Listlevel ){
- warn "$0: $Podfile: unterminated list at =head in paragraph $Paragraph.
ignoring.\n";
+ warn "$0: $Podfile: unterminated list at =head in paragraph $Paragraph.
ignoring.\n" unless $Quiet;
while( $Listlevel ){
process_back();
}
@@ -1133,7 +1133,7 @@
# bad! but, the proper thing to do seems to be to just assume
# they did do an =over. so warn them once and then continue.
if( $Listlevel == 0 ){
- warn "$0: $Podfile: unexpected =item directive in paragraph $Paragraph.
ignoring.\n";
+ warn "$0: $Podfile: unexpected =item directive in paragraph $Paragraph.
ignoring.\n" unless $Quiet;
process_over();
}
@@ -1192,7 +1192,7 @@
#
sub process_back {
if( $Listlevel == 0 ){
- warn "$0: $Podfile: unexpected =back directive in paragraph $Paragraph.
ignoring.\n";
+ warn "$0: $Podfile: unexpected =back directive in paragraph $Paragraph.
ignoring.\n" unless $Quiet;
return;
}
@@ -1621,7 +1621,7 @@
# warning; show some text.
$linktext = $opar unless defined $linktext;
- warn "$0: $Podfile: cannot resolve L<$opar> in paragraph
$Paragraph.\n";
+ warn "$0: $Podfile: cannot resolve L<$opar> in paragraph
$Paragraph.\n" unless $Quiet;
}
# now we have a URL or just plain code
@@ -1644,7 +1644,7 @@
} elsif( $func eq 'Z' ){
# Z<> - empty
warn "$0: $Podfile: invalid X<> in paragraph $Paragraph.\n"
- unless $$rstr =~ s/^>//;
+ unless $$rstr =~ s/^>// or $Quiet;
} else {
my $term = pattern $closing;
@@ -1662,7 +1662,7 @@
if( $lev == 1 ){
$res .= pure_text( $$rstr );
} else {
- warn "$0: $Podfile: undelimited $func<> in paragraph $Paragraph.\n";
+ warn "$0: $Podfile: undelimited $func<> in paragraph $Paragraph.\n"
unless $Quiet;
}
}
return $res;
@@ -1686,7 +1686,7 @@
}
$res .= $2;
}
- warn "$0: $Podfile: undelimited $func<> in paragraph $Paragraph.\n";
+ warn "$0: $Podfile: undelimited $func<> in paragraph $Paragraph.\n" unless
$Quiet;
return $res;
}
@@ -2069,7 +2069,7 @@
# honour the perlfunc manpage: func [PAR[,[ ]PAR]...]
# and some funnies with ... Module ...
- return $1 if $text =~ m{^([a-z\d]+)(\s+[A-Z\d,/& ]+)?$};
+ return $1 if $text =~ m{^([a-z\d_]+)(\s+[A-Z\d,/& ]+)?$};
return $1 if $text =~ m{^([a-z\d]+)\s+Module(\s+[A-Z\d,/& ]+)?$};
# text? normalize!
End of Patch.