Skip Menu |

This queue is for tickets about the Pod-Parser CPAN distribution.

Report information
The Basics
Id: 70824
Status: resolved
Priority: 0/
Queue: Pod-Parser

People
Owner: Nobody in particular
Requestors: steve [...] fisharerojo.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Pod::Usage fails with prefix='~/something'
From the Perl core bug queue... RT#96516 'perlbrew --help' displays the perlbrew source on my system. Reason: The following lines in Pod/Usage.pm: my $progpath = File::Spec->catfile($Config{scriptdir}, 'perldoc'); print { $opts{'-output'} } ($opts{'-message'}, "\n") if($opts{'-message'}); if(defined $opts{-input} && $opts{-input} =~ /^\s*(\S.*?)\s*$/) { # the perldocs back to 5.005 should all have -F # without -F there are warnings in -T scripts system($progpath, '-F', $1); The important bits: my $progpath = File::Spec->catfile($Config{scriptdir}, 'perldoc'); system($progpath, '-F', $1); This fails because $Config{scriptdir} eq '~/usr/local/script' here, and the list form of system doesn't call the shell that would expand ~. (It then proceeds to fall back to system($pager, $1), which is why I get raw perl source in my face in response to --help.) Looking at Config_heavy.pl it seems the correct variable to use is $Config{scriptdirexp}, which contains an expanded path.
This is a duplicate of #57954: Pod::Usage does not find perldoc when perl is relocatable Changed to $Config{scriptdirexp} instead of scriptdir, to be released soon with Pod-Parser-1.50