On Thu, Jul 31, 2003 at 08:57:23AM +0200, Rafael Garcia-Suarez wrote:
> > This surprising result is because perldoc, before checking @INC, checks 
> > $Config{scriptdirexp}.  A feature I'd never realized it had, but it seems
> > to have been doing this for a while.  Coupled with my case-insensitive 
> > filesystem it caused it to pick up /usr/bin/cpan before the CPAN.pm module.
> > 
> > I'd argue that perldoc should err on the side of modules over scripts.
> 
> On the other hand, man(1) searches in chapter 1 before chapters 2 and 3,
> so the current behavior of perldoc is at least consistent with it.

With man this makes sense, you tend to look up man pages for programs much
more often than for libraries.  With perldoc I'd argue one is looking for
module docs much more often than program docs.


> What happens when you do "perldoc CPAN.pm" ?

That will find CPAN.pm as expected.  Its worthwhile to note that with the
current implementation I can use "perldoc CPAN.pm" to disambiguate but
with my patch I can't figure any way to get the cpan program docs.


> Perhaps perldoc should have a new option to disambiguate scripts vs
> modules ?

perldoc --programs CPAN  would be kludgy but servicable for those odd
cases where the module and program names conflict.


-- 
Cuius rei demonstrationem mirabilem sane detexi hanc subscriptis 
exiguitas non caperet.

Reply via email to