summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-27 08:04:19 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-27 08:04:19 +0000
commit22641bdfe0aea7146308596310ad0825c10626e7 (patch)
tree804ec3bc30bb641ae0893265b8e6244b6ebc49a2 /lib
parent552e38a9d3a55c9ce97ef4e5e0729f050fead016 (diff)
downloadperl-22641bdfe0aea7146308596310ad0825c10626e7.tar.gz
recognize more constructs such as C<$-> in pod (from Russ Allbery
and Brad Appleton) p4raw-id: //depot/perl@3792
Diffstat (limited to 'lib')
-rw-r--r--lib/Pod/Parser.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Pod/Parser.pm b/lib/Pod/Parser.pm
index 9bc771db53..cb1e3a61c1 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