From: millert Date: Mon, 24 Apr 2000 01:20:36 +0000 (+0000) Subject: Fix in scalar vs. list dereference bug in InputObjects.pm. Keep X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=97d3716121280817cac05f235fb657a9934197a0;p=openbsd 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 --- 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 # @@ -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.