From: Steve Peters Date: Mon, 23 Jan 2006 15:56:34 +0000 (+0000) Subject: Upgrade to Pod-Simple-3.04 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9ea6f39eafd431bd5584f346d6c0d04a820f6210;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Pod-Simple-3.04 p4raw-id: //depot/perl@26929 --- diff --git a/lib/Pod/Simple.pm b/lib/Pod/Simple.pm index 965243e..fa85488 100644 --- a/lib/Pod/Simple.pm +++ b/lib/Pod/Simple.pm @@ -18,7 +18,7 @@ use vars qw( ); @ISA = ('Pod::Simple::BlackBox'); -$VERSION = '3.03'; +$VERSION = '3.04'; @Known_formatting_codes = qw(I B C L E F S X Z); %Known_formatting_codes = map(($_=>1), @Known_formatting_codes); diff --git a/lib/Pod/Simple/BlackBox.pm b/lib/Pod/Simple/BlackBox.pm index 90f5d6c..6d7fdba 100644 --- a/lib/Pod/Simple/BlackBox.pm +++ b/lib/Pod/Simple/BlackBox.pm @@ -1901,5 +1901,23 @@ sub pretty { # adopted from Class::Classless } #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + +# A rather unsubtle method of blowing away all the state information +# from a parser object so it can be reused. Provided as a utility for +# backward compatibilty in Pod::Man, etc. but not recommended for +# general use. + +sub reinit { + my $self = shift; + foreach (qw(source_dead source_filename doc_has_started +start_of_pod_block content_seen last_was_blank paras curr_open +line_count pod_para_count in_pod ~tried_gen_errata errata errors_seen +Title)) { + + delete $self->{$_}; + } +} + +#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1; diff --git a/lib/Pod/Simple/Search.pm b/lib/Pod/Simple/Search.pm index 2fcd5da..7c652b8 100644 --- a/lib/Pod/Simple/Search.pm +++ b/lib/Pod/Simple/Search.pm @@ -4,7 +4,7 @@ package Pod::Simple::Search; use strict; use vars qw($VERSION $MAX_VERSION_WITHIN $SLEEPY); -$VERSION = 2.03_01; ## Current version of this package +$VERSION = 3.04; ## Current version of this package BEGIN { *DEBUG = sub () {0} unless defined &DEBUG; } # set DEBUG level use Carp (); @@ -254,22 +254,26 @@ sub _path2modname { my $name = join '::', @m, $shortname; $self->_simplify_base($name); - if ($name eq lc($name) || $name eq uc($name)) { + # On VMS, case-preserved document names can't be constructed from + # filenames, so try to extract them from the "=head1 NAME" tag in the + # file instead. + if ($^O eq 'VMS' && ($name eq lc($name) || $name eq uc($name))) { open PODFILE, "<$file" or die "_path2modname: Can't open $file: $!"; my $in_pod = 0; my $in_name = 0; - while () { - chomp; - $in_pod = 1 if m/^=\w/; - $in_pod = 0 if m/^=cut/; + my $line; + while ($line = ) { + chomp $line; + $in_pod = 1 if ($line =~ m/^=\w/); + $in_pod = 0 if ($line =~ m/^=cut/); next unless $in_pod; # skip non-pod text - next if m/^\s*\z/; # and blank lines - next if ($in_pod && m/^X