Skip Menu |

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

Report information
The Basics
Id: 53335
Status: new
Priority: 0/
Queue: Pod-POM

People
Owner: Nobody in particular
Requestors: DAMI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.25
Fixed in: (no value)



Subject: parsing error on mixed sequences like L<C<< ...>>>
 The sequence below (excerpt from perlre.pod line 1810) is parsed incorrectly by Pod-POM-0.25 :

 see L<C<< (?>pattern) >>>

Attached is a patch to solve the problem





Subject: pod-pom.patch
diff -aur Pod-POM-0.25/Changes Pod-POM/Changes --- Pod-POM-0.25/Changes Fri Mar 27 17:24:19 2009 +++ Pod-POM/Changes Mon Jan 4 01:52:02 2010 @@ -13,6 +13,10 @@ # $Id: Changes 71 2009-03-27 16:24:19Z ford $ #======================================================================== + +* fixed bug in parsing mixed sequences with non-space angle brackets + (example from perlre.pod : see L<C<< (?>pattern) >>>). + #------------------------------------------------------------------------ # Version 0.25 2009-03-27 #------------------------------------------------------------------------ diff -aur Pod-POM-0.25/lib/Pod/POM.pm Pod-POM/lib/Pod/POM.pm --- Pod-POM-0.25/lib/Pod/POM.pm Fri Mar 27 17:24:19 2009 +++ Pod-POM/lib/Pod/POM.pm Mon Jan 4 00:42:50 2010 @@ -352,12 +352,12 @@ elsif (defined $3) { $rparen = $3; $rparen =~ s/^\s+//; - if ($rparen eq $stack[-1]->[RPAREN]) { + while ($rparen && $rparen =~ s/^$stack[-1]->[RPAREN]//) { $cmd = $TEXTSEQ->new(pop(@stack)) || return $self->error($TEXTSEQ->error()); push(@{ $stack[-1]->[CONTENT] }, $cmd); - } - else { + } + if ($rparen) { $self->warning((scalar @stack > 1 ? "expected '$stack[-1]->[RPAREN]' not '$rparen'" : "spurious '$rparen'"), $name, $line); diff -aur Pod-POM-0.25/t/testcases/220-mixed-sequences.pod Pod-POM/t/testcases/220-mixed-sequences.pod --- Pod-POM-0.25/t/testcases/220-mixed-sequences.pod Thu Mar 19 11:19:21 2009 +++ Pod-POM/t/testcases/220-mixed-sequences.pod Mon Jan 4 00:48:53 2010 @@ -14,3 +14,5 @@ Code within non-breaking space sequence: S<< C<< code code code >> >> +Code within a link (example taken from perlre.pod) : see L<C<< (?>pattern) >>>. + diff -aur Pod-POM-0.25/t/testcases/220-mixed-sequences.pom-dump Pod-POM/t/testcases/220-mixed-sequences.pom-dump --- Pod-POM-0.25/t/testcases/220-mixed-sequences.pom-dump Thu Mar 19 11:22:25 2009 +++ Pod-POM/t/testcases/220-mixed-sequences.pom-dump Mon Jan 4 01:23:43 2010 @@ -58,3 +58,14 @@ "code code code" >> >> + text + @text + "Code within a link (example taken from perlre.pod) : see " + L< + C<< + "(?" + ">" + "pattern)" + >> + > + "." diff -aur Pod-POM-0.25/t/testcases/220-mixed-sequences.view-html Pod-POM/t/testcases/220-mixed-sequences.view-html --- Pod-POM-0.25/t/testcases/220-mixed-sequences.view-html Thu Mar 19 11:20:42 2009 +++ Pod-POM/t/testcases/220-mixed-sequences.view-html Mon Jan 4 01:21:51 2010 @@ -10,5 +10,6 @@ <p>This is code with a replacable text as italic: <code>function(<i>argument</i>)</code>.</p> <p>This is an bold with embedded escapes: <b>bold &amp; bold</b>.</p> <p>Code within non-breaking space sequence: <code>code&nbsp;code&nbsp;code</code></p> +<p>Code within a link (example taken from perlre.pod) : see <i><code>(?&gt;pattern)</code></i>.</p> </body> </html> diff -aur Pod-POM-0.25/t/testcases/220-mixed-sequences.view-pod Pod-POM/t/testcases/220-mixed-sequences.view-pod --- Pod-POM-0.25/t/testcases/220-mixed-sequences.view-pod Thu Mar 19 11:19:21 2009 +++ Pod-POM/t/testcases/220-mixed-sequences.view-pod Mon Jan 4 01:38:58 2010 @@ -14,3 +14,5 @@ Code within non-breaking space sequence: S<< C<< code code code >> >> +Code within a link (example taken from perlre.pod) : see L<C<< (?>pattern) >>>. + diff -aur Pod-POM-0.25/t/testcases/220-mixed-sequences.view-text Pod-POM/t/testcases/220-mixed-sequences.view-text --- Pod-POM-0.25/t/testcases/220-mixed-sequences.view-text Thu Mar 19 11:19:53 2009 +++ Pod-POM/t/testcases/220-mixed-sequences.view-text Mon Jan 4 01:19:02 2010 @@ -12,3 +12,6 @@ Code within non-breaking space sequence: 'code code code' + Code within a link (example taken from perlre.pod) : see the + '(?>pattern)' manpage. +