Skip Menu |

This queue is for tickets about the Pod-Parser CPAN distribution.

Report information
The Basics
Id: 42695
Status: resolved
Priority: 0/
Queue: Pod-Parser

People
Owner: Nobody in particular
Requestors: perl [...] galumph.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.38



CC: perlcritic <dev [...] perlcritic.tigris.org>
Subject: Pod::Parser v1.36 changes handling of trailing blank lines by parse_from_filehandle().
Date: Thu, 22 Jan 2009 21:07:42 -0600
To: bug-Pod-Parser [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
One of the tests for Perl::Critic breaks with the latest release of Pod::Parser because the result of parse_from_filehandle() no longer includes blank lines between the last non-whitespace containing line and a =cut. This is fine, and I can make a simple fix to the test, but it means that the test will fail with earlier versions of Pod::Parser. I just want to make sure that this was intentional and I'm not chasing after something I shouldn't.
Wow, interesting, well spotted. Ok, I will have a look at the current Perl::Critic tests and verify that all changes in Pod::Parser 1.36 are correct. Please stand by, I'll come back to this soon. -Marek On Do. 22. Jan. 2009, 22:08:12, clonezone wrote: Show quoted text
> One of the tests for Perl::Critic breaks with the latest release of > Pod::Parser because the result of parse_from_filehandle() no
longer Show quoted text
> includes blank lines between the last non-whitespace containing > line and a =cut. This is fine, and I can make a simple fix to the > test, but it means that the test will fail with earlier versions
of Show quoted text
> Pod::Parser. I just want to make sure that this was intentional > and I'm not chasing after something I shouldn't.
CC: perlcritic <dev [...] perlcritic.tigris.org>
Subject: Re: [rt.cpan.org #42695] Pod::Parser v1.36 changes handling of trailing blank lines by parse_from_filehandle().
Date: Fri, 23 Jan 2009 21:26:33 -0600
To: bug-Pod-Parser [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Marek Rouchal via RT wrote: Show quoted text
> Wow, interesting, well spotted. Ok, I will have a look at the current > Perl::Critic tests and verify that all changes in Pod::Parser 1.36 are > correct. Please stand by, I'll come back to this soon.
To specific, here's the failure: t/05_utils_pod....1/62 # Failed test 'get_pod_section_from_string('=head1 FOO ... =head2 BAR', 'FOO')' # at t/05_utils_pod.t line 262. # got: 'FOO # Some plain text. # # BAR # ' # expected: 'FOO # Some plain text. # # BAR # # ' # Looks like you failed 1 test of 62. [21:24:14] t/05_utils_pod.... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/62 subtests
After reviewing this carefully, I found that the change in Pod::Parser _is_ valid. In fact, it is required to align the formatting of Pod::PlainText (used by Perl::Critic) with the formatting of Pod::Text (modern versions use Pod::Simple as a parser). There are several alternatives how you could solve this: - check $Pod::PlainText::VERSION and adapt the expected result accordingly - s/[\r\n+]$/\n/s on the result and remove the extra newline from the expected result - rewrite Perl::Critic POD handling to use (subclasses of) Pod::Simple (::Text) which is the modern POD Parser With your permission, I'd go ahead and resolve this RT. Cheers, Marek
Subject: Re: [rt.cpan.org #42695] Pod::Parser v1.36 changes handling of trailing blank lines by parse_from_filehandle().
Date: Mon, 26 Jan 2009 07:35:56 -0600
To: bug-Pod-Parser [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Marek Rouchal via RT wrote: Show quoted text
> With your permission, I'd go ahead and resolve this RT.
Go ahead. Thanks for looking at this.
Subject: Re: [rt.cpan.org #42695] Pod::Parser v1.36 changes handling of trailing blank lines by parse_from_filehandle().
Date: Sun, 01 Feb 2009 18:36:52 -0600
To: bug-Pod-Parser [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Marek Rouchal via RT wrote: Show quoted text
> - rewrite Perl::Critic POD handling to use (subclasses of) Pod::Simple > (::Text) which is the modern POD Parser
Can you name an alternative to Pod::Select::select()?
Hmmm, could be that Pod::Simple does not have something comparable to Pod::Parser's select() yet. It surely can be solved by subclassing Pod::Simple, but you may as well ask Allison whether this could be provided in an updated Pod::Simple. Cheers, Marek On Sun Feb 01 19:37:07 2009, clonezone wrote: Show quoted text
> Marek Rouchal via RT wrote:
> > - rewrite Perl::Critic POD handling to use (subclasses of) Pod::Simple > > (::Text) which is the modern POD Parser
> > Can you name an alternative to Pod::Select::select()?
Nothing to do in Pod::Parser, closing this ticket.
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.