X-Spam-Check-By: sourceware.org From: "David Christensen" To: Cc: "'Reini Urban'" , , , "'cygwin'" Subject: RE: FW: Cygwin Perl bug -- pod2usage(-verbose => 0) & pod2usage(-verbose => 1) Date: Thu, 26 Oct 2006 18:11:30 -0700 Message-ID: <002201c6f964$d5dceff0$642a8e40@s3000p> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Marek: Thank you. :-) David -----Original Message----- From: marek AT saftsack DOT fs DOT uni-bayreuth DOT de [mailto:marek AT saftsack DOT fs DOT uni-bayreuth DOT de] Sent: Thursday, October 26, 2006 2:15 PM To: David Christensen Cc: 'Reini Urban'; pod-people AT perl DOT org; perlbug AT perl DOT org; 'cygwin' Subject: RE: FW: Cygwin Perl bug -- pod2usage(-verbose => 0) & pod2usage(-verbose => 1) I will consider this fix in the next Pod-Parser release. -Marek On Sun, 9 Jul 2006, David Christensen wrote: > 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-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf > Of Reini Urban > Sent: Tuesday, January 18, 2005 2:03 AM > To: pod-people AT perl DOT org > Cc: David Christensen; perlbug AT perl DOT org; cygwin > Subject: Re: FW: Cygwin Perl bug -- pod2usage(-verbose => 0) & > pod2usage(-verbose => 1) > > David Christensen schrieb: >> pod-people & perlbug: >> I made the subject posting on the Cygwin mailing list. Gerrit P. > Haase >> confirmed the bug in pod2usage(), and requested that I forward the > posting to >> pod-people and perlbug. The referenced script attachments follow. > > All three cases work fine for me on cygwin & perl 5.8.6 with default > 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)); > > >> -----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) >> >> Cygwin: >> >> Perl Pod::Usage pod2usage(-verbose => 0) is supposed to display the > Pod SYNOPSIS >> information (ref. 'perdoc Pod::Usage'). See attached script 'test0'. > On Debian >> 3.0r2, it works: >> >> dpchrist AT p166d302:~/cygwin-issues/Pod-Usage$ perl test0 >> Usage: >> This is the synopsis... >> >> On Cygwin, it exits without displaying anything. >> >> pod2usage(-verbose => 1) is supposed to display the Pod SYNOPSIS, > OPTIONS, >> ARGUMENTS, and/or OPTIONS AND ARGUMENTS sections. See attached script > 'test1'. >> On Debian, it works: >> >> dpchrist AT p166d302:~/cygwin-issues/Pod-Usage$ perl test1 >> Usage: >> This is the synopsis... >> >> Options: >> Here are the options... >> >> On Cygwin, it exits without displaying anything. >> >> >> pod2usage(-verbose => 2) is supposed to display the entire Pod > documentation. >> See attached script 'test2'. It works on both Debian and Cygwin. >> >> >> Checking the mailing list archive, I see one report but no resolution: >> >> http://sources.redhat.com/ml/cygwin/2002-01/msg01392.html >> >> >> Google didn't seem to have much on this either. >> >> dpchrist AT p42800e:~/mydocuments/cygwin-issues/Pod-Usage$ cat test0 >> #! /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 >> dpchrist AT p42800e:~/mydocuments/cygwin-issues/Pod-Usage$ cat test1 >> #! /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 >> dpchrist AT p42800e:~/mydocuments/cygwin-issues/Pod-Usage$ cat test2 >> #! /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/ > > ************************************************************************ **** * Marek Rouchal < Marek DOT Rouchal AT gmx DOT net > * * Murstr. 20 http://saftsack.fs.uni-bayreuth.de/~marek * * D-85356 Freising finger marek AT saftsack DOT fs DOT uni-bayreuth DOT de * * Tel +49-8161-885085 for PGP Public Key * ************************************************************************ **** -- 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/