From: Gurusamy Sarathy Date: Tue, 27 Jul 1999 08:04:19 +0000 (+0000) Subject: recognize more constructs such as C<$-> in pod (from Russ Allbery X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=22641bdfe0aea7146308596310ad0825c10626e7;p=p5sagit%2Fp5-mst-13.2.git recognize more constructs such as C<$-> in pod (from Russ Allbery and Brad Appleton) p4raw-id: //depot/perl@3792 --- diff --git a/lib/Pod/Parser.pm b/lib/Pod/Parser.pm index 9bc771d..cb1e3a6 100644 --- a/lib/Pod/Parser.pm +++ b/lib/Pod/Parser.pm @@ -651,9 +651,10 @@ is a reference to the parse-tree object. =cut ## This global regex is used to see if the text before a '>' inside -## an interior sequence looks like '-' or '=', but not '--' or '==' +## an interior sequence looks like '-' or '=', but not '--', '==', +## '$-', or '$=' use vars qw( $ARROW_RE ); -$ARROW_RE = join('', qw{ (?: [^=]+= | [^-]+- )$ }); +$ARROW_RE = join('', qw{ (?: [^-+*/=!&|%^x.<>$]= | [^$-]- )$ }); #$ARROW_RE = qr/(?:[^=]+=|[^-]+-)$/; ## 5.005+ only! sub parse_text { @@ -914,6 +915,7 @@ sub parse_from_filehandle { my $self = shift; my %opts = (ref $_[0] eq 'HASH') ? %{ shift() } : (); my ($in_fh, $out_fh) = @_; + $in_fh = \*STDIN unless ($in_fh); local $_; ## Put this stream at the top of the stack and do beginning-of-input