Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 91851
Status: resolved
Priority: 0/
Queue: Pod-Simple

People
Owner: Nobody in particular
Requestors: jkeenan [...] cpan.org
Cc: davem [...] iabyn.com
david [...] landgren.net
hughmyers [...] micron.com
matt.follett [...] gmail.com
renee.baecker [...] smart-websolutions.de
AdminCc:

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



CC: hughmyers [...] micron.com, matt.follett [...] gmail.com, davem [...] iabyn.com, david [...] landgren.net, renee.baecker [...] smart-websolutions.de
Subject: Pod::HTML problem: =begin html and =end html fail to respect empty lines
This problem was originally reported by Hugh Myers in May 2002 in the Perl 5 bug queue as https://rt.perl.org/Ticket/Display.html?id=9385. It was reported there on the assumption that it was a bug in Pod::Html. However, AFAICT Pod::Html does nothing with '=begin html' and '=end html'. Pod::Html is, in part, a wrapper around Pod::Simple::XHTML::LocalPodLinks and other parts of the Pod-Simple distribution. So I am moving it into Pod-Simple's own bug tracker. Here is the original report: ##### This is a bug report for perl from hughmyers@mail-srv1.micron.com, generated with the help of perlbug 1.33 running under perl v5.6.1. ----------------------------------------------------------------- [Please enter your report here] In Pod::HTML 1.04, =begin html/=end html eats lines that consist of single newlines, i.e. "\n". This happens because the sub clean_data is applied to the body of text before parsing. This converts the text into 'paragraphs', text delimited by blank lines, which discards the delimiter. As an example, the fragment: =begin html <tt> <pre> #include &lt;stdio.h&gt; int main(int argc,char *argv[]) { printf("Hellow World\n"); return 0; } </pre> </tt> =end html should display as: #include <stdio.h> int main(int argc,char *argv[]) { printf("Hellow World\n"); return 0; } not as: #include <stdio.h>int main(int argc,char *argv[]) { printf("Hellow World\n"); return 0;} There is an obvious work-around of 'no blank lines--use &nbsp;' --hsm ##### Please see the original RT for various test files which have been posted over the years. Thank you very much. Jim Keenan
I added a couple of TODO tests for this in https://github.com/theory/pod-simple/commit/52de002, but suspect that the fix will be ugly. :-(
I believe this issue is fixed as of http://github.com/theory/pod-simple/commits/bb23b85. Additional testing would be much appreciated.
On Sat Jan 10 23:11:00 2015, DWHEELER wrote: Show quoted text
> I believe this issue is fixed as of http://github.com/theory/pod- > simple/commits/bb23b85. Additional testing would be much appreciated.
Setting aside problems reported in https://rt.cpan.org/Ticket/Display.html?id=101454, I attempted to import these revisions into a branch in the Perl 5 core distribution. You can see that in the 'smoke-me/jkeenan/updated-pod-simple' branch. There was, not surprisingly, collateral damage in the tests for Pod-Html in the core distribution. See attachment. I haven't diagnosed these in depth, but my hunch is that this breakage speaks more to the problems in ext/Pod-Html and its tests than to the validity of changes to Pod-Simple. Thank you very much. Jim Keenan
Subject: pod-html-test-breakage-when-pod-simple-updated.txt
[perl] 97 $ cd t;./perl harness -v ../ext/Pod-Html/t/feature.t; cd - # Failed test 'misc pod-html features' # at t/pod2html-lib.pl line 82. not ok 1 - misc pod-html features # --- feature_expected.tmp 2015-01-11 10:15:34.234307549 -0500 # +++ /home/jkeenan/gitwork/perl/ext/Pod-Html/t/feature.html 2015-01-11 10:15:34.234307549 -0500 # @@ -21,8 +21,6 @@ # # <p>A paragraph</p> # # - # - # some html # # <p>Another paragraph</p> # Looks like you failed 1 test of 1. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- ../ext/Pod-Html/t/feature.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=1, 0 wallclock secs ( 0.00 usr 0.00 sys + 0.05 cusr 0.01 csys = 0.06 CPU) Result: FAIL /home/jkeenan/gitwork/perl [perl] 98 $ cd t;./perl harness -v ../ext/Pod-Html/t/feature2.t; cd - # Failed test 'misc pod-html features 2' # at t/pod2html-lib.pl line 82. not ok 1 - misc pod-html features 2 # --- feature2_expected.tmp 2015-01-11 10:15:54.278306871 -0500 # +++ /home/jkeenan/gitwork/perl/ext/Pod-Html/t/feature2.html 2015-01-11 10:15:54.278306871 -0500 # @@ -25,8 +25,6 @@ # # <p>A paragraph</p> # # - # - # some html # # <p>Another paragraph</p> ok 2 - misc pod-html --verbose warnings # Looks like you failed 1 test of 2. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests Test Summary Report ------------------- ../ext/Pod-Html/t/feature2.t (Wstat: 256 Tests: 2 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=2, 0 wallclock secs ( 0.00 usr 0.00 sys + 0.05 cusr 0.01 csys = 0.06 CPU) Result: FAIL /home/jkeenan/gitwork/perl [perl] 99 $ cd t;./perl harness -v ../ext/Pod-Html/t/htmlview.t; cd - # Failed test 'html rendering' # at t/pod2html-lib.pl line 82. not ok 1 - html rendering # --- htmlview_expected.tmp 2015-01-11 10:16:01.238306635 -0500 # +++ /home/jkeenan/gitwork/perl/ext/Pod-Html/t/htmlview.html 2015-01-11 10:16:01.238306635 -0500 # @@ -172,8 +172,6 @@ # # <h1 id="TESTING-FOR-AND-BEGIN">TESTING FOR AND BEGIN</h1> # # - # - # <br /> # <p> # blah blah # @@ -181,11 +179,11 @@ # # <p>intermediate text</p> # # - # - # <more> # HTML # -</more>some text # +</more> # + # +some text # # <h1 id="TESTING-URLs-hyperlinking">TESTING URLs hyperlinking</h1> # # Looks like you failed 1 test of 1. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- ../ext/Pod-Html/t/htmlview.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.06 cusr 0.01 csys = 0.08 CPU) Result: FAIL /home/jkeenan/gitwork/perl
Subject: Re: [rt.cpan.org #91851] Pod::HTML problem: =begin html and =end html fail to respect empty lines
Date: Mon, 12 Jan 2015 09:32:12 -0800
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <david [...] justatheory.com>
On Jan 11, 2015, at 7:25 AM, James E Keenan via RT <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> There was, not surprisingly, collateral damage in the tests for Pod-Html in the core distribution. See attachment. I haven't diagnosed these in depth, but my hunch is that this breakage speaks more to the problems in ext/Pod-Html and its tests than to the validity of changes to Pod-Simple.
Yes, this should fix it: diff --git a/ext/Pod-Html/t/pod2html-lib.pl b/ext/Pod-Html/t/pod2html-lib.pl index 42cf1c9..16cc797 100644 --- a/ext/Pod-Html/t/pod2html-lib.pl +++ b/ext/Pod-Html/t/pod2html-lib.pl @@ -64,6 +64,10 @@ sub convert_n_test { if (ord("A") == 193) { # EBCDIC. $expect =~ s/item_mat_3c_21_3e/item_mat_4c_5a_6e/; } + if (Pod::Simple->VERSION > 3.28) { + $expect =~ s/\n\nsome html/$1/m; + $expect =~ s{(TESTING FOR AND BEGIN</h1>)\n\n}{$1}m; + } # result open my $in, $outfile or die "cannot open $outfile: $!"; Best, David
Download smime.p7s
application/pkcs7-signature 4k

Message body not shown because it is not plain text.

On Mon Jan 12 12:32:34 2015, david@justatheory.com wrote: Unfortunately, I'm still getting failures in three tests. ##### [perl] 117 $ cd t;./perl harness -v ../ext/Pod-Html/t/feature.t; cd - Use of uninitialized value $1 in substitution (s///) at t/pod2html-lib.pl line 68, <DATA> chunk 1. # Failed test 'misc pod-html features' # at t/pod2html-lib.pl line 86. not ok 1 - misc pod-html features # --- feature_expected.tmp 2015-01-12 19:58:10.871245500 -0500 # +++ /home/jkeenan/gitwork/perl/ext/Pod-Html/t/feature.html 2015-01-12 19:58:10.871245500 -0500 # @@ -21,7 +21,7 @@ # # <p>A paragraph</p> # # - # +some html # # <p>Another paragraph</p> # # Looks like you failed 1 test of 1. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- ../ext/Pod-Html/t/feature.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=1, 0 wallclock secs ( 0.00 usr 0.00 sys + 0.05 cusr 0.01 csys = 0.06 CPU) Result: FAIL /home/jkeenan/gitwork/perl [perl] 118 $ cd t;./perl harness -v ../ext/Pod-Html/t/feature2.t; cd - # Failed test 'misc pod-html features 2' # at t/pod2html-lib.pl line 86. not ok 1 - misc pod-html features 2 # --- feature2_expected.tmp 2015-01-12 19:58:16.555245308 -0500 # +++ /home/jkeenan/gitwork/perl/ext/Pod-Html/t/feature2.html 2015-01-12 19:58:16.555245308 -0500 # @@ -25,7 +25,7 @@ # # <p>A paragraph</p> # # - # +some html # # <p>Another paragraph</p> # # Failed test 'misc pod-html --verbose warnings' # at t/feature2.t line 27. # 'caching directories for later use # Converting input file /home/jkeenan/gitwork/perl/ext/Pod-Html/t/feature2.pod # Use of uninitialized value $1 in substitution (s///) at t/pod2html-lib.pl line 68, <DATA> chunk 1. # ' # doesn't match '(?^x: # \Acaching\ directories\ for\ later\ use\n # Converting\ input\ file\ \S+[/\\\]]feature2\.pod\n\z # )' not ok 2 - misc pod-html --verbose warnings # Looks like you failed 2 tests of 2. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/2 subtests Test Summary Report ------------------- ../ext/Pod-Html/t/feature2.t (Wstat: 512 Tests: 2 Failed: 2) Failed tests: 1-2 Non-zero exit status: 2 Files=1, Tests=2, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.06 cusr 0.00 csys = 0.07 CPU) Result: FAIL /home/jkeenan/gitwork/perl [perl] 119 $ cd t;./perl harness -v ../ext/Pod-Html/t/htmlview.t; cd - # Failed test 'html rendering' # at t/pod2html-lib.pl line 86. not ok 1 - html rendering # --- htmlview_expected.tmp 2015-01-12 19:58:23.267245081 -0500 # +++ /home/jkeenan/gitwork/perl/ext/Pod-Html/t/htmlview.html 2015-01-12 19:58:23.263245081 -0500 # @@ -179,11 +179,11 @@ # # <p>intermediate text</p> # # - # - # <more> # HTML # -</more>some text # +</more> # + # +some text # # <h1 id="TESTING-URLs-hyperlinking">TESTING URLs hyperlinking</h1> # # Looks like you failed 1 test of 1. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- ../ext/Pod-Html/t/htmlview.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.07 cusr 0.00 csys = 0.08 CPU) Result: FAIL /home/jkeenan/gitwork/perl ##### See perl5 branch smoke-me/jkeenan/updated-pod-simple
Subject: Re: [rt.cpan.org #91851] Pod::HTML problem: =begin html and =end html fail to respect empty lines
Date: Mon, 12 Jan 2015 20:38:58 -0800
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <david [...] justatheory.com>
On Jan 12, 2015, at 5:03 PM, James E Keenan via RT <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> Unfortunately, I'm still getting failures in three tests.
Bah, sorry, here you go. diff --git a/ext/Pod-Html/t/htmlview.t b/ext/Pod-Html/t/htmlview.t index 792df93..06914d1 100644 --- a/ext/Pod-Html/t/htmlview.t +++ b/ext/Pod-Html/t/htmlview.t @@ -193,11 +193,11 @@ blah blah <p>intermediate text</p> - - <more> HTML -</more>some text +</more> + +some text <h1 id="TESTING-URLs-hyperlinking">TESTING URLs hyperlinking</h1> diff --git a/ext/Pod-Html/t/pod2html-lib.pl b/ext/Pod-Html/t/pod2html-lib.pl index 16cc797..27e3e94 100644 --- a/ext/Pod-Html/t/pod2html-lib.pl +++ b/ext/Pod-Html/t/pod2html-lib.pl @@ -65,7 +65,7 @@ sub convert_n_test { $expect =~ s/item_mat_3c_21_3e/item_mat_4c_5a_6e/; } if (Pod::Simple->VERSION > 3.28) { - $expect =~ s/\n\nsome html/$1/m; + $expect =~ s/\n\n(some html)/$1/m; $expect =~ s{(TESTING FOR AND BEGIN</h1>)\n\n}{$1}m; } Best, DAvid
Download smime.p7s
application/pkcs7-signature 4k

Message body not shown because it is not plain text.

On Mon Jan 12 23:39:11 2015, david@justatheory.com wrote: Show quoted text
> On Jan 12, 2015, at 5:03 PM, James E Keenan via RT <bug-Pod- > Simple@rt.cpan.org> wrote: >
> > Unfortunately, I'm still getting failures in three tests.
> > Bah, sorry, here you go. >
Okay, I got a clean 'make test' with that and have sent that back to the smoke-me branch. However, since these patches were inlined rather than attached, I had to apply them very manually. So I don't really want to merge that branch into Perl 5 blead. When you prepare patches for merging the latest Pod-Simple into Perl 5 blead, could you include patches for ext/Pod-Html/ as well? Thank you very much. Jim Keenan
Subject: Re: [rt.cpan.org #91851] Pod::HTML problem: =begin html and =end html fail to respect empty lines
Date: Tue, 13 Jan 2015 09:05:14 -0800
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <david [...] justatheory.com>
On Jan 13, 2015, at 5:45 AM, James E Keenan via RT <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> When you prepare patches for merging the latest Pod-Simple into Perl 5 blead, could you include patches for ext/Pod-Html/ as well?
Sure. Do you need new patches, then? D
Download smime.p7s
application/pkcs7-signature 4k

Message body not shown because it is not plain text.

CC: davem [...] iabyn.com, david [...] landgren.net, hughmyers [...] micron.com, matt.follett [...] gmail.com, renee.baecker [...] smart-websolutions.de
Subject: Re: [rt.cpan.org #91851] Pod::HTML problem: =begin html and =end html fail to respect empty lines
Date: Tue, 13 Jan 2015 20:47:20 -0500
To: bug-Pod-Simple [...] rt.cpan.org, jkeenan [...] cpan.org
From: James E Keenan <jkeen [...] verizon.net>
On 01/13/2015 12:05 PM, david@justatheory.com via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=91851 > > > On Jan 13, 2015, at 5:45 AM, James E Keenan via RT <bug-Pod-Simple@rt.cpan.org> wrote: >
>> When you prepare patches for merging the latest Pod-Simple into Perl 5 blead, could you include patches for ext/Pod-Html/ as well?
> > Sure. Do you need new patches, then? >
Well, what I'm saying is: Whenever you're ready for Perl 5 core to pick up the latest Pod-Simple, prepare a patch set (preferably against blead) in whatever manner you normally use, but include the additional changes for ext/Pod-Html/ in that set. That would be more reliable than the smoke-me branch, for which I had to do a lot of manual editing. Any P5 committer will then be able to handle the patch set. Thank you very much. Jim Keenan
Subject: Re: [rt.cpan.org #91851] Pod::HTML problem: =begin html and =end html fail to respect empty lines
Date: Tue, 13 Jan 2015 17:50:41 -0800
To: bug-Pod-Simple [...] rt.cpan.org
From: "David E. Wheeler" <david [...] justatheory.com>
On Jan 13, 2015, at 5:47 PM, jkeen@verizon.net via RT <bug-Pod-Simple@rt.cpan.org> wrote: Show quoted text
> Well, what I'm saying is: Whenever you're ready for Perl 5 core to pick > up the latest Pod-Simple, prepare a patch set (preferably against blead) > in whatever manner you normally use, but include the additional changes > for ext/Pod-Html/ in that set. That would be more reliable than the > smoke-me branch, for which I had to do a lot of manual editing. > > Any P5 committer will then be able to handle the patch set.
In the past couple of years, all I’ve had to do was release it and Florian or someone got it merged into blead before I could even post to p5p that it was available. Though I can submit a proper patch for Pod-Html if you need it. D
Download smime.p7s
application/pkcs7-signature 4k

Message body not shown because it is not plain text.