diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-05 07:29:43 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-05 07:29:43 +0000 |
commit | e9fdc7d2ad34e80787f760dcc04e2f23a1599092 (patch) | |
tree | de10b8959034f0ef55fa27897fcf6ede1fb6d2e4 /lib | |
parent | 8d74ce1c73a4b1bd298f3cad65bbf1a36ccf0e4e (diff) | |
download | perl-e9fdc7d2ad34e80787f760dcc04e2f23a1599092.tar.gz |
upgrade Pod::Parser to v1.081 from CPAN
p4raw-id: //depot/perl@3304
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Pod/Checker.pm | 2 | ||||
-rw-r--r-- | lib/Pod/InputObjects.pm | 12 | ||||
-rw-r--r-- | lib/Pod/Parser.pm | 9 | ||||
-rw-r--r-- | lib/Pod/PlainText.pm | 4 | ||||
-rw-r--r-- | lib/Pod/Select.pm | 2 | ||||
-rw-r--r-- | lib/Pod/Usage.pm | 10 |
6 files changed, 20 insertions, 19 deletions
diff --git a/lib/Pod/Checker.pm b/lib/Pod/Checker.pm index 1eaab71a8d..6607ad9375 100644 --- a/lib/Pod/Checker.pm +++ b/lib/Pod/Checker.pm @@ -13,7 +13,7 @@ package Pod::Checker; use vars qw($VERSION); -$VERSION = 1.08; ## Current version of this package +$VERSION = 1.081; ## Current version of this package require 5.004; ## requires this Perl version or later =head1 NAME diff --git a/lib/Pod/InputObjects.pm b/lib/Pod/InputObjects.pm index 9bbc6cf7ac..007fd74ebc 100644 --- a/lib/Pod/InputObjects.pm +++ b/lib/Pod/InputObjects.pm @@ -11,7 +11,7 @@ package Pod::InputObjects; use vars qw($VERSION); -$VERSION = 1.08; ## Current version of this package +$VERSION = 1.081; ## Current version of this package require 5.004; ## requires this Perl version or later ############################################################################# @@ -496,7 +496,7 @@ sub _set_child2parent_links { my ($self, @children) = @_; ## Make sure any sequences know who their parent is for (@children) { - next unless ref $_; + next unless ref; if ($_->isa('Pod::InteriorSequence') or $_->can('nested')) { $_->nested($self); } @@ -510,7 +510,7 @@ sub _unset_child2parent_links { $self->{'-parent_sequence'} = undef; my $ptree = $self->{'-ptree'}; for (@$ptree) { - next unless ($_ and ref $_ and $_->isa('Pod::InteriorSequence')); + next unless (length and ref and $_->isa('Pod::InteriorSequence')); $_->_unset_child2parent_links(); } } @@ -801,7 +801,7 @@ sub prepend { my $self = shift; local *ptree = $self; for (@_) { - next unless $_; + next unless length; if (@ptree and !(ref $ptree[0]) and !(ref $_)) { $ptree[0] = $_ . $ptree[0]; } @@ -827,7 +827,7 @@ sub append { my $self = shift; local *ptree = $self; for (@_) { - next unless $_; + next unless length; if (@ptree and !(ref $ptree[-1]) and !(ref $_)) { $ptree[-1] .= $_; } @@ -863,7 +863,7 @@ sub _unset_child2parent_links { my $self = shift; local *ptree = $self; for (@ptree) { - next unless ($_ and ref $_ and $_->isa('Pod::InteriorSequence')); + next unless (length and ref and $_->isa('Pod::InteriorSequence')); $_->_unset_child2parent_links(); } } diff --git a/lib/Pod/Parser.pm b/lib/Pod/Parser.pm index b81b080cdb..9bc771db53 100644 --- a/lib/Pod/Parser.pm +++ b/lib/Pod/Parser.pm @@ -13,7 +13,7 @@ package Pod::Parser; use vars qw($VERSION); -$VERSION = 1.08; ## Current version of this package +$VERSION = 1.081; ## Current version of this package require 5.004; ## requires this Perl version or later ############################################################################# @@ -654,6 +654,7 @@ is a reference to the parse-tree object. ## an interior sequence looks like '-' or '=', but not '--' or '==' use vars qw( $ARROW_RE ); $ARROW_RE = join('', qw{ (?: [^=]+= | [^-]+- )$ }); +#$ARROW_RE = qr/(?:[^=]+=|[^-]+-)$/; ## 5.005+ only! sub parse_text { my $self = shift; @@ -672,7 +673,7 @@ sub parse_text { ## Convert method calls into closures, for our convenience my $xseq_sub = $expand_seq; my $xptree_sub = $expand_ptree; - if ($expand_seq eq 'interior_sequence') { + if (defined $expand_seq and $expand_seq eq 'interior_sequence') { ## If 'interior_sequence' is the method to use, we have to pass ## more than just the sequence object, we also need to pass the ## sequence name and text. @@ -705,7 +706,7 @@ sub parse_text { ++$line if ($_ eq "\n"); ## Look for the beginning of a sequence if ( /^([A-Z])(<)$/ ) { - ## Push a new sequence onto the stack on of those "in-progress" + ## Push a new sequence onto the stack of those "in-progress" $seq = Pod::InteriorSequence->new( -name => ($cmd = $1), -ldelim => $2, -rdelim => '', @@ -729,7 +730,7 @@ sub parse_text { } else { ## In the middle of a sequence, append this text to it - $seq->append($_) if $_; + $seq->append($_) if length; } ## Remember the "current" sequence and the previously seen token ($seq, $prev) = ( $seq_stack[-1], $_ ); diff --git a/lib/Pod/PlainText.pm b/lib/Pod/PlainText.pm index e629fc81c3..3816badb7f 100644 --- a/lib/Pod/PlainText.pm +++ b/lib/Pod/PlainText.pm @@ -13,7 +13,7 @@ package Pod::PlainText; use vars qw($VERSION); -$VERSION = 1.08; ## Current version of this package +$VERSION = 1.081; ## Current version of this package require 5.004; ## requires this Perl version or later =head1 NAME @@ -279,7 +279,7 @@ sub fill { $line .= $_; } } - $par .= "$line\n" if $line; + $par .= "$line\n" if length $line; $par .= "\n"; return $par; } diff --git a/lib/Pod/Select.pm b/lib/Pod/Select.pm index 96377d4002..26cbe021ed 100644 --- a/lib/Pod/Select.pm +++ b/lib/Pod/Select.pm @@ -13,7 +13,7 @@ package Pod::Select; use vars qw($VERSION); -$VERSION = 1.08; ## Current version of this package +$VERSION = 1.081; ## Current version of this package require 5.004; ## requires this Perl version or later ############################################################################# diff --git a/lib/Pod/Usage.pm b/lib/Pod/Usage.pm index 855dbf0624..9cb71e0afa 100644 --- a/lib/Pod/Usage.pm +++ b/lib/Pod/Usage.pm @@ -13,7 +13,7 @@ package Pod::Usage; use vars qw($VERSION); -$VERSION = 1.08; ## Current version of this package +$VERSION = 1.081; ## Current version of this package require 5.004; ## requires this Perl version or later =head1 NAME @@ -389,7 +389,7 @@ sub pod2usage { ## User passed a ref to a hash %opts = %{$_} if (ref($_) eq 'HASH'); } - elsif (/^[-+]?\d+$/o) { + elsif (/^[-+]?\d+$/) { ## User passed in the exit value to use $opts{"-exitval"} = $_; } @@ -488,13 +488,13 @@ sub preprocess_paragraph { local $_ = shift; my $line = shift; ## See if this is a heading and we arent printing the entire manpage. - if (($self->{USAGE_OPTIONS}->{-verbose} < 2) && /^=head/o) { + if (($self->{USAGE_OPTIONS}->{-verbose} < 2) && /^=head/) { ## Change the title of the SYNOPSIS section to USAGE - s/^=head1\s+SYNOPSIS\s*$/=head1 USAGE/o; + s/^=head1\s+SYNOPSIS\s*$/=head1 USAGE/; ## Try to do some lowercasing instead of all-caps in headings s{([A-Z])([A-Z]+)}{((length($2) > 2) ? $1 : lc($1)) . lc($2)}ge; ## Use a colon to end all headings - s/\s*$/:/o unless (/:\s*$/o); + s/\s*$/:/ unless (/:\s*$/); $_ .= "\n"; } return $self->SUPER::preprocess_paragraph($_); |