Michael G Schwern 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.
What happens when you do "perldoc CPAN.pm" ?
Perhaps perldoc should have a new option to disambiguate scripts vs
modules ?