summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-04-17 20:05:03 +0000
committerSteve Peters <steve@fisharerojo.org>2006-04-17 20:05:03 +0000
commit31baf5297e0129098b9ab335f013764fbb793d21 (patch)
tree66c88df1b2a1ff972fd788635a38baaaf66b27d0 /lib/Pod
parentf482118e05fe207cb1fb55b3e6a8c3303301de40 (diff)
downloadperl-31baf5297e0129098b9ab335f013764fbb793d21.tar.gz
Patch to fix RT #31227: perldoc -f, -q ignores extra arguments with no notice.
Never made it to the mailing list though, so, was never found. Patch previously provided to the Pod-Perldoc CPAN RT queue. p4raw-id: //depot/perl@27878
Diffstat (limited to 'lib/Pod')
-rw-r--r--lib/Pod/Perldoc.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Pod/Perldoc.pm b/lib/Pod/Perldoc.pm
index 6105e1d885..f64e243114 100644
--- a/lib/Pod/Perldoc.pm
+++ b/lib/Pod/Perldoc.pm
@@ -676,6 +676,16 @@ sub options_sanity {
# Any sanity-checking need doing here?
+ # But does not make sense to set either -f or -q in $ENV{"PERLDOC"}
+ if( $self->opt_f or $self->opt_q ) {
+ $self->usage("Only one of -f -or -q") if $self->opt_f and $self->opt_q;
+ warn
+ "Perldoc is only really meant for reading one word at a time.\n",
+ "So these parameters are being ignored: ",
+ join(' ', @{$self->{'args'}}),
+ "\n"
+ if @{$self->{'args'}}
+ }
return;
}
@@ -929,7 +939,7 @@ sub render_findings {
die "Nothing found?!";
# should have been caught before here
} elsif(@$found_things > 1) {
- warn join '',
+ warn
"Perldoc is only really meant for reading one document at a time.\n",
"So these parameters are being ignored: ",
join(' ', @$found_things[1 .. $#$found_things] ),