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;
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 ) {
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;
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
}
## 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"});
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 {