"David Christensen" (via RT)
2006-07-09 23:34:01 UTC
# New Ticket Created by "David Christensen"
# Please include the string: [perl #39775]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39775 >
Cygwin & Perl:
This issue is still present.
Reini's PERLIO suggestion functions as a work-around on Cygwin.
Who decides if/when to use Reini's suggested patch? If that decision
has already been made in the negative, why and what is the next step?
If that decision has already be made in the positive, when will we see
the correction in Cygwin?
David
-----Original Message-----
From: cygwin-***@cygwin.com [mailto:cygwin-***@cygwin.com] On Behalf
Of Reini Urban
Sent: Tuesday, January 18, 2005 2:03 AM
To: pod-***@perl.org
Cc: David Christensen; ***@perl.org; cygwin
Subject: Re: FW: Cygwin Perl bug -- pod2usage(-verbose => 0) &
pod2usage(-verbose => 1)
configuration.
Having the scripts on textmounts and on binmounts.
Just if the scripts are on textmounts and the files with CRLF, test0 and
test1 will fail. PERLIO not set.
However:
PERLIO=crlf ./test1
and
PERLIO=crlf ./test0
works ok, with those textmount cases.
Debugging through Pod::Usage, reveils that reading from the tied
FileHandle will keep \r\n. Looks ok.
Pod::Parser::parse_from_filehandle ...
DB<1> x $in_fh
0 GLOB(0x8f2534)
-> *Symbol::GEN0
FileHandle({*Symbol::GEN0}) => fileno(6)
DB<2> c Pod::Select::is_selected
Pod::Select::is_selected(/usr/lib/perl5/5.8/Pod/Select.pm:508):
$_ = "=head1 SYNOPSIS\cM\cJ\cM\cJ";
if (/^=((?:sub)*)(?:head(?:ing)?|sec(?:tion)?)(\d*)\s+(.*)\s*$/) {
my ($level, $heading) = ($2, $3);
}
DB<2> x $heading
0 "SYNOPSIS\cM"
Which should be "SYNOPSIS".
So my recommended fix would be this patch:
$ diff -bu Select.pm~ Select.pm
--- Select.pm~ 2005-01-10 00:30:15.001000000 +0100
+++ Select.pm 2005-01-18 11:02:32.920797700 +0100
@@ -505,7 +505,7 @@
## Keep track of current sections levels and headings
$_ = $paragraph;
- if (/^=((?:sub)*)(?:head(?:ing)?|sec(?:tion)?)(\d*)\s+(.*)\s*$/) {
+ if (/^=((?:sub)*)(?:head(?:ing)?|sec(?:tion)?)(\d*)\s+(.*?)\s*$/) {
## This is a section heading command
my ($level, $heading) = ($2, $3);
$level = 1 + (length($1) / 3) if ((! length $level) ||
(length $1));
# Please include the string: [perl #39775]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39775 >
Cygwin & Perl:
This issue is still present.
Reini's PERLIO suggestion functions as a work-around on Cygwin.
Who decides if/when to use Reini's suggested patch? If that decision
has already been made in the negative, why and what is the next step?
If that decision has already be made in the positive, when will we see
the correction in Cygwin?
David
-----Original Message-----
From: cygwin-***@cygwin.com [mailto:cygwin-***@cygwin.com] On Behalf
Of Reini Urban
Sent: Tuesday, January 18, 2005 2:03 AM
To: pod-***@perl.org
Cc: David Christensen; ***@perl.org; cygwin
Subject: Re: FW: Cygwin Perl bug -- pod2usage(-verbose => 0) &
pod2usage(-verbose => 1)
I made the subject posting on the Cygwin mailing list. Gerrit P.
Haaseconfirmed the bug in pod2usage(), and requested that I forward the
posting topod-people and perlbug. The referenced script attachments follow.
All three cases work fine for me on cygwin & perl 5.8.6 with defaultconfiguration.
Having the scripts on textmounts and on binmounts.
Just if the scripts are on textmounts and the files with CRLF, test0 and
test1 will fail. PERLIO not set.
However:
PERLIO=crlf ./test1
and
PERLIO=crlf ./test0
works ok, with those textmount cases.
Debugging through Pod::Usage, reveils that reading from the tied
FileHandle will keep \r\n. Looks ok.
Pod::Parser::parse_from_filehandle ...
DB<1> x $in_fh
0 GLOB(0x8f2534)
-> *Symbol::GEN0
FileHandle({*Symbol::GEN0}) => fileno(6)
DB<2> c Pod::Select::is_selected
Pod::Select::is_selected(/usr/lib/perl5/5.8/Pod/Select.pm:508):
$_ = "=head1 SYNOPSIS\cM\cJ\cM\cJ";
if (/^=((?:sub)*)(?:head(?:ing)?|sec(?:tion)?)(\d*)\s+(.*)\s*$/) {
my ($level, $heading) = ($2, $3);
}
DB<2> x $heading
0 "SYNOPSIS\cM"
Which should be "SYNOPSIS".
So my recommended fix would be this patch:
$ diff -bu Select.pm~ Select.pm
--- Select.pm~ 2005-01-10 00:30:15.001000000 +0100
+++ Select.pm 2005-01-18 11:02:32.920797700 +0100
@@ -505,7 +505,7 @@
## Keep track of current sections levels and headings
$_ = $paragraph;
- if (/^=((?:sub)*)(?:head(?:ing)?|sec(?:tion)?)(\d*)\s+(.*)\s*$/) {
+ if (/^=((?:sub)*)(?:head(?:ing)?|sec(?:tion)?)(\d*)\s+(.*?)\s*$/) {
## This is a section heading command
my ($level, $heading) = ($2, $3);
$level = 1 + (length($1) / 3) if ((! length $level) ||
(length $1));
-----Original Message-----
From: David Christensen [mailto: dpchrist at holgerdanske dot com]
Sent: Sunday, January 16, 2005 7:03 PM
To: 'cygwin at cygwin dot com'
Subject: Cygwin Perl bug -- pod2usage(-verbose => 0) &
pod2usage(-verbose => 1)From: David Christensen [mailto: dpchrist at holgerdanske dot com]
Sent: Sunday, January 16, 2005 7:03 PM
To: 'cygwin at cygwin dot com'
Subject: Cygwin Perl bug -- pod2usage(-verbose => 0) &
Perl Pod::Usage pod2usage(-verbose => 0) is supposed to display the
Pod SYNOPSISinformation (ref. 'perdoc Pod::Usage'). See attached script 'test0'.
On DebianThis is the synopsis...
On Cygwin, it exits without displaying anything.
pod2usage(-verbose => 1) is supposed to display the Pod SYNOPSIS,
OPTIONS,On Cygwin, it exits without displaying anything.
pod2usage(-verbose => 1) is supposed to display the Pod SYNOPSIS,
ARGUMENTS, and/or OPTIONS AND ARGUMENTS sections. See attached script
'test1'.This is the synopsis...
Here are the options...
On Cygwin, it exits without displaying anything.
pod2usage(-verbose => 2) is supposed to display the entire Pod
documentation.Here are the options...
On Cygwin, it exits without displaying anything.
pod2usage(-verbose => 2) is supposed to display the entire Pod
See attached script 'test2'. It works on both Debian and Cygwin.
http://sources.redhat.com/ml/cygwin/2002-01/msg01392.html
Google didn't seem to have much on this either.
#! /usr/bin/perl -w
use Pod::Usage;
pod2usage(-verbose => 0);
=pod
=head1 NAME
test - demonstrates Cygwin bug in pod2usage.
=head1 SYNOPSIS
This is the synopsis...
=head1 OPTIONS
Here are the options...
=head1 DESCRIPTION
Descriptive text...
=cut
#! /usr/bin/perl -w
use Pod::Usage;
pod2usage(-verbose => 1);
=pod
=head1 NAME
test - demonstrates Cygwin bug in pod2usage.
=head1 SYNOPSIS
This is the synopsis...
=head1 OPTIONS
Here are the options...
=head1 DESCRIPTION
Descriptive text...
=cut
#! /usr/bin/perl -w
use Pod::Usage;
pod2usage(-verbose => 2);
=pod
=head1 NAME
test - demonstrates Cygwin bug in pod2usage.
=head1 SYNOPSIS
This is the synopsis...
=head1 OPTIONS
Here are the options...
=head1 DESCRIPTION
Descriptive text...
=cut
http://sources.redhat.com/ml/cygwin/2002-01/msg01392.html
Google didn't seem to have much on this either.
#! /usr/bin/perl -w
use Pod::Usage;
pod2usage(-verbose => 0);
=pod
=head1 NAME
test - demonstrates Cygwin bug in pod2usage.
=head1 SYNOPSIS
This is the synopsis...
=head1 OPTIONS
Here are the options...
=head1 DESCRIPTION
Descriptive text...
=cut
#! /usr/bin/perl -w
use Pod::Usage;
pod2usage(-verbose => 1);
=pod
=head1 NAME
test - demonstrates Cygwin bug in pod2usage.
=head1 SYNOPSIS
This is the synopsis...
=head1 OPTIONS
Here are the options...
=head1 DESCRIPTION
Descriptive text...
=cut
#! /usr/bin/perl -w
use Pod::Usage;
pod2usage(-verbose => 2);
=pod
=head1 NAME
test - demonstrates Cygwin bug in pod2usage.
=head1 SYNOPSIS
This is the synopsis...
=head1 OPTIONS
Here are the options...
=head1 DESCRIPTION
Descriptive text...
=cut
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/