# New Ticket Created by (Jari Aalto+mail.perl) # Please include the string: [perl #23766] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23766 > 2003-09-09 Tue Jari Aalto <message@MailAndNews.com> * perldoc (sub containspod): Cygwin indicates binary files with extension .exe, so `open' on binary files makes no sense. Now 'perldoc perl' works in Cygwin. --- perldoc.orig 2003-09-08 15:22:43.000000000 +0300 +++ perldoc 2003-09-08 15:30:02.000000000 +0300 @@ -205,7 +205,28 @@ my($file, $readit) = @_; return 1 if !$readit && $file =~ /\.pod\z/i; local($_); + + # Under cygwin the /usr/bin/perl is legal executable, but + # you cannot open a file with that name. It must be spelled + # out as "/usr/bin/perl.exe". + # + # The following if-case under cygwin prevents error + # + # $ perldoc perl + # Cannot open /usr/bin/perl: no such file or directory + # + # This would work though + # + # $ perldoc perl.pod + + if ( $Is_Cygwin and -x $file and -f "$file.exe" ) + { + warn "Cygwin $file.exe search skipped\n" if $opt_v; + return; + } + open(TEST,"<", $file) or die "Can't open $file: $!"; + while (<TEST>) { if (/^=head/) { close(TEST) or die "Can't close $file: $!";