Re: perl 5.8.1: perldoc perl fails

2002-12-28 Thread Jörg Schaible
Hi Gerrit,

 perldoc perl.pod works well

Meanwhile I found out that too.

 Yes,  please fix it :-)

rm /bin/perl.exe
g

 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.

It seems to be related with the new perl IO functions and Cygwin's changes in handling 
executable files. I *assume* that perldoc is looking for an executable perl in the 
path (call perldoc with option -v) and finds - reported by Cygwin - perl.exe. Opening 
perl obviously fails then in function containspod of perldoc.

You can recreate the problem with any other perl.pod topic by creating a appropriate 
executable, e.g. just copy /bin/perldoc to /bin/perlintro.exe and call perldoc 
perlintro. As workaround call perl.pod with extension (as your recommendatiuon above) 
or delete /bin/perl.exe and create a link from /bin/perl5.8.0.exe to /bin/perl.

Regards,
Jörg

--
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/




Re: perl 5.8.1: perldoc perl fails

2002-12-27 Thread Gerrit P. Haase
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
-- 
=^..^=


--
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/




Re: perl 5.8.1: perldoc perl fails

2002-12-27 Thread Igor Pechtchanski
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/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,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/




Re: perl 5.8.1: perldoc perl fails

2002-12-27 Thread Gerrit P. Haase
Hallo Igor,

Am Samstag, 28. Dezember 2002 um 02:10 schriebst du:

 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: }

This should do it.

 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: }

This too.

 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.

It should find perl.pod in the @INC, but it doesn't, instead it looks
in /bin and finds the executable.

 Sorry if I'm restating the obvious.
 Igor

No problem, that was the same what I saw, I fiddled around at some
lines and tried to change this and that, but it became worse and I
decided to let it as it is until some nice guy comes up with a nice
bug report which helps us to track it down :-)


Gerrit
-- 
=^..^=


--
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/