From: Gurusamy Sarathy Date: Fri, 15 Oct 1999 09:45:51 +0000 (+0000) Subject: lvalue subs patch (change#4081) breaks C<\(Foo->Bar())>; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f5daac4a641c782ba897f4a064c1a6f1035697b0;p=p5sagit%2Fp5-mst-13.2.git lvalue subs patch (change#4081) breaks C<\(Foo->Bar())>; avoid tickling it in Pod::Man for now; other nits in Pod::* p4raw-link: @4081 on //depot/perl: cd06dffe59d60ee6a2fdd7c81f8cef42c7026b36 p4raw-id: //depot/perl@4390 --- diff --git a/lib/Pod/Man.pm b/lib/Pod/Man.pm index a85fba5..0ed16b6 100644 --- a/lib/Pod/Man.pm +++ b/lib/Pod/Man.pm @@ -518,7 +518,9 @@ sub sequence { my $command = $seq->cmd_name; # Zero-width characters. - if ($command eq 'Z') { return bless \ '\&', 'Pod::Man::String' } + if ($command eq 'Z') { + my $v = '\&'; return bless \ $v, 'Pod::Man::String'; + } # C<>, L<>, X<>, and E<> don't apply guesswork to their contents. local $_ = $self->collapse ($seq->parse_tree, $command =~ /^[CELX]$/); @@ -554,7 +556,10 @@ sub sequence { # Handle links. if ($command eq 'L') { - return bless \ ($self->buildlink ($_)), 'Pod::Man::String'; + # XXX bug in lvalue subroutines prevents this from working + #return bless \ ($self->buildlink ($_)), 'Pod::Man::String'; + my $v = $self->buildlink($_); + return bless \$v, 'Pod::Man::String'; } # Whitespace protection replaces whitespace with "\ ". diff --git a/lib/Pod/Parser.pm b/lib/Pod/Parser.pm index c96f86b..ab6787d 100644 --- a/lib/Pod/Parser.pm +++ b/lib/Pod/Parser.pm @@ -815,7 +815,7 @@ sub parse_text { pop @seq_stack; my $errmsg = "** Unterminated $cmd<...> at $file line $line\n"; (ref $errorsub) and &{$errorsub}($errmsg) - or (defined $errmsg) and $self->$errorsub($errmsg) + or (defined $errorsub) and $self->$errorsub($errmsg) or warn($errmsg); $seq_stack[-1]->append($expand_seq ? &$xseq_sub($self,$seq) : $seq); $seq = $seq_stack[-1]; diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 6fb3807..c203960 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -790,7 +790,7 @@ behavior, END blocks are not executed anymore when the C<-c> switch is used. Note that something resembling the previous behavior can still be -obtained by putting C at the very end of the top level source file. =head2 Potential to leak DATA filehandles diff --git a/pod/perlopentut.pod b/pod/perlopentut.pod index ae622a6..dbb3a0b 100644 --- a/pod/perlopentut.pod +++ b/pod/perlopentut.pod @@ -84,7 +84,7 @@ C function. But in the shell, you just use a different redirection character. That's also the case for Perl. The C call remains the same--just its argument differs. -If the leading character is a pipe symbol, C starts up a new command and open a write-only filehandle leading into that command. This lets you write into that handle and have what you write show up on that command's standard input. For example: