From: Jarkko Hietaniemi Date: Fri, 4 Jul 2003 13:50:29 +0000 (+0000) Subject: Upgrade to PodParser 1.23; but do not update X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2dd58eb24be784426acf08480c44f9475004b8f2;p=p5sagit%2Fp5-mst-13.2.git Upgrade to PodParser 1.23; but do not update t/pod/find.t or t/pod/testp2pt.pl since the first one does not work at all under core, and the second change would drop MacOS Classic portability tweaks introduced by change #18669. p4raw-link: @18669 on //depot/perl: 53ecdda105bb4103d210aff4a70dce9565ed670e p4raw-id: //depot/perl@19990 --- diff --git a/lib/Pod/Find.pm b/lib/Pod/Find.pm index 111744b..45bea56 100644 --- a/lib/Pod/Find.pm +++ b/lib/Pod/Find.pm @@ -13,7 +13,7 @@ package Pod::Find; use vars qw($VERSION); -$VERSION = 0.22; ## Current version of this package +$VERSION = 0.23; ## Current version of this package require 5.005; ## requires this Perl version or later use Carp; @@ -416,6 +416,9 @@ sub pod_where { if -d $Config::Config{'scriptdir'}; } + warn "Search path is: ".join(' ', @search_dirs)."\n" + if $options{'-verbose'}; + # Loop over directories Dir: foreach my $dir ( @search_dirs ) { @@ -443,6 +446,16 @@ sub pod_where { if $options{'-verbose'}; next Dir; } + # for some strange reason the path on MacOS/darwin is + # 'pods' not 'pod' + # this could be the case also for other systems that + # have a case-tolerant file system, but File::Spec + # does not recognize 'darwin' yet + #if(File::Spec->case_tolerant && -d File::Spec->catdir($dir,'pods')) { + if($^O =~ /macos|darwin/i && -d File::Spec->catdir($dir,'pods')) { + $dir = File::Spec->catdir($dir,'pods'); + redo Dir; + } if(-d File::Spec->catdir($dir,'pod')) { $dir = File::Spec->catdir($dir,'pod'); redo Dir; diff --git a/lib/Pod/Usage.pm b/lib/Pod/Usage.pm index 771cff4..63c7007 100644 --- a/lib/Pod/Usage.pm +++ b/lib/Pod/Usage.pm @@ -10,7 +10,7 @@ package Pod::Usage; use vars qw($VERSION); -$VERSION = 1.14; ## Current version of this package +$VERSION = 1.16; ## Current version of this package require 5.005; ## requires this Perl version or later =head1 NAME @@ -469,7 +469,8 @@ sub pod2usage { } ## Default the output file - $opts{"-output"} = ($opts{"-exitval"} < 2) ? \*STDOUT : \*STDERR + $opts{"-output"} = (lc($opts{"-exitval"}) eq "noexit" || + $opts{"-exitval"} < 2) ? \*STDOUT : \*STDERR unless (defined $opts{"-output"}); ## Default the input file $opts{"-input"} = $0 unless (defined $opts{"-input"}); @@ -506,7 +507,7 @@ sub pod2usage { and $opts{"-output"} == \*STDOUT ) { ## spit out the entire PODs. Might as well invoke perldoc - my $progpath = File::Spec->catfile($Config{bin}, "perldoc"); + my $progpath = File::Spec->catfile($Config{scriptdir}, "perldoc"); system($progpath, $opts{"-input"}); } else {