diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-24 01:20:37 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-24 01:20:37 +0000 |
commit | 829e4b0af2aeb438ad339a4d316dcd3c2b3d99e7 (patch) | |
tree | 40f8e557f9d6dce8075b864df3dad9525a22b563 /gnu/usr.bin/perl/lib | |
parent | e0a354a1902521e286bcbcb2359b22c3f3dc24de (diff) |
Fix in scalar vs. list dereference bug in InputObjects.pm. Keep
dashes in C<> blocks from getting \e prepended to them. They should
have a \ prepended to escape them which this does correctly do yet,
but at least it produces legible documentation; rra@stanford.edu
Diffstat (limited to 'gnu/usr.bin/perl/lib')
-rw-r--r-- | gnu/usr.bin/perl/lib/Pod/InputObjects.pm | 2 | ||||
-rw-r--r-- | gnu/usr.bin/perl/lib/Pod/Man.pm | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/gnu/usr.bin/perl/lib/Pod/InputObjects.pm b/gnu/usr.bin/perl/lib/Pod/InputObjects.pm index 849182bf371..3131821775c 100644 --- a/gnu/usr.bin/perl/lib/Pod/InputObjects.pm +++ b/gnu/usr.bin/perl/lib/Pod/InputObjects.pm @@ -807,7 +807,7 @@ children for the top node. sub children { my $self = shift; if (@_ > 0) { - @{ $self } = (@_ == 1 and ref $_[0]) ? ${ @_ } : @_; + @{ $self } = (@_ == 1 and ref $_[0]) ? @{ @_ } : @_; } return @{ $self }; } diff --git a/gnu/usr.bin/perl/lib/Pod/Man.pm b/gnu/usr.bin/perl/lib/Pod/Man.pm index 107734d5228..f561ebe7429 100644 --- a/gnu/usr.bin/perl/lib/Pod/Man.pm +++ b/gnu/usr.bin/perl/lib/Pod/Man.pm @@ -1,5 +1,5 @@ # Pod::Man -- Convert POD data to formatted *roff input. -# $Id: Man.pm,v 1.3 2000/04/09 05:40:02 millert Exp $ +# $Id: Man.pm,v 1.4 2000/04/24 01:20:36 millert Exp $ # # Copyright 1999, 2000 by Russ Allbery <rra@stanford.edu> # @@ -555,14 +555,16 @@ sub sequence { # mess up the results of guesswork on substrings. So we do this # somewhat roundabout way of handling it. if ($command eq 'C') { - my @children = $seq->parse_tree ()->children; - for (@children) { - unless (ref) { - s/-/\\-/g; - s/__/_\\|_/g; + my @children = map { + my $block = $_; + if (ref $block) { + $block; + } else { + $block =~ s/-/\\-/g; + $block =~ s/__/_\\|_/g; + bless \ "$block", 'Pod::Man::String'; } - } - $seq->parse_tree ()->children (@children); + } $seq->parse_tree ()->children; } # C<>, L<>, X<>, and E<> don't apply guesswork to their contents. |