delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/27/20:10:34

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 27 Dec 2002 20:10:05 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Gerrit P. Haase" <gp AT familiehaase DOT de>
cc: cygwin AT cygwin DOT com
Subject: Re: perl 5.8.1: perldoc perl fails
In-Reply-To: <431223822683.20021228004901@familiehaase.de>
Message-ID: <Pine.GSO.4.44.0212271957310.8991-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

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 AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019