This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: perl 5.8.1: perldoc perl fails


On Sat, 28 Dec 2002, Gerrit P. Haase wrote:

> Hallo Joerg,
>
> Am Freitag, 20. Dezember 2002 um 17:55 schriebst du:
>
> > Hi Perl maintainer,
>
> > using the new experimental Perl 5.8.1 release, the command
>
> > $ perldoc perl
> > Can't open /usr/bin/perl: No such file or directory at /bin/perldoc line
> > 206.
>
> perldoc perl.pod works well
>
> > fails to present the Perl manual overview. Calling the manual pages
> > directly, anything works well:
>
> > perldoc perlfun
>
> > It seems that perldoc does not find the /usr/lib/perl5/5.8.1/pods/perl.pod,
> > because it matches somehow /usr/bin/perl first.
>
> Yes,  please fix it :-)
>
> I just figured that calling: perldoc perl.pod works well.
> I tried to understand what happens in the perldoc script
> and I have no idea why it doesn't work.  And most
> interesting is that it works with perl 5.6.1.
>
> Gerrit

Gerrit,

I'm by no means a perl guru, but here are a few observations from
/usr/bin/perldoc:

266: sub searchfor {
267:     my($recurse,$s,@dirs) = @_;
276:     for ($i=0; $i<@dirs; $i++) {
277:         $dir = $dirs[$i];
279:         if (      ( $ret = check_file $dir,"$s.pod")
280:                or ( $ret = check_file $dir,"$s.pm")
281:                or ( $ret = check_file $dir,$s)
                 ... etc ...
312: }

400: foreach (@pages) {
413:     # We must look both in @INC for library modules and in $bindir
414:     # for executables, like h2xs or perldoc itself.
415:     my @searchdirs = (@INC, $bindir);
434:     my @files = searchfor(0,$_,@searchdirs);
462: }

In other words, it looks like the script searches @INC (which can vary
from version to version).  If you look at the changes in @INC between
5.6.1 and 5.8, you could probably track down this problem.

Sorry if I'm restating the obvious.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]