On Śr 17 Wrz 2008, 09:58:58, OVID wrote:
Show quoted text> When I run "perldoc prove", I get old documentation because there's an
> older version of Test::Harness installed. There is, however, a newer
> version of Test::Harness (and thus, prove) which we run locally. Here's
> the problem:
>
> $ perldoc -l prove
> /opt/csw/bin/prove
> $ which prove
> /home/ovid/current/bin/prove
>
> Something like a '-p' switch to search the path would be handy. Better
> yet, for executables, it should default to PATH.
>
> Cheers,
> Ovid
this particular problem seems to be coming from nonstandard or
inconsistent perl installation. If one knew what he was doing when
maintaining his perl environment, should also know how to not get lost
there.
I see the age of this RT and I am not sure if it makes sense to discuss
it in terms of enhancing the module itself, anymore. I feel I waste my
time here.
Anyway. As a workaround, or even "implementation method" of the feature
requested - if one wants to display pod of a perl executable he runs
through his $PATH, and the executable really contains the pod he wants
to see, he may execute:
$ which prove | xargs perldoc
However this is not always the case, because pod itself might be
contained in a separate .pod file and perldoc is designed just to first
look for corresponding *.pod files. Look at this:
$ which perldoc
/usr/local/bin/perldoc
$ which perldoc | xargs perldoc
No documentation found for "/usr/local/bin/perldoc".
$ perldoc -l perldoc
/usr/local/lib/perl5/5.12.0/pod/perldoc.pod