Skip Menu |

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

Report information
The Basics
Id: 28213
Status: open
Priority: 0/
Queue: Pod-XML

People
Owner: Nobody in particular
Requestors: yanick+cpan [...] babyl.dyndns.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.99
Fixed in: (no value)



Subject: a '=back' without a '=over' creates malformed xml
If a '=back' doesn't close a '=over', Pod::XML generates a lone '</list>', which results in a badly formatted xml document. I've attached a small patch that only print the '</list>' if it's closing a '<list>'.
Subject: buggy.pod
=head1 How a =back can spoil the fun The =back below will generate a lone '</list>' =back
Subject: Pod-XML.patch
*** XML.pm Sat Jul 14 18:16:40 2007 --- patch/Pod/XML.pm Sat Jul 14 18:13:56 2007 *************** *** 239,244 **** --- 239,245 ---- $parser->{closeitem} = 0; } + $parser->{in_over}++; $parser->xml_output ( "<list>\n" ); } elsif ( $command eq "back" ) *************** *** 249,255 **** $parser->{closeitem} = 0; } ! $parser->xml_output ( "</list>\n" ); } elsif ( $command eq "item" ) { --- 250,259 ---- $parser->{closeitem} = 0; } ! if ( $parser->{in_over} ) { ! $parser->{in_over}--; ! $parser->xml_output ( "</list>\n" ); ! } } elsif ( $command eq "item" ) {
From: mattw [...] mattsscripts.co.uk
On Sat Jul 14 17:56:51 2007, YANICK wrote: Show quoted text
> If a '=back' doesn't close a '=over', Pod::XML generates a lone > '</list>', which results in a badly formatted xml document. I've > attached a small patch that only print the '</list>' if it's closing a > '<list>'.
If a "=back" appears without an "=over" then the POD is invalid and producing broken output should be expected.
Subject: Re: [rt.cpan.org #28213] a '=back' without a '=over' creates malformed xml
Date: Fri, 19 Oct 2007 19:54:08 -0400
To: bug-Pod-XML [...] rt.cpan.org
From: Yanick Champoux <yanick [...] babyl.dyndns.org>
On October 19, 2007, Matt Wilson via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=28213 > > > On Sat Jul 14 17:56:51 2007, YANICK wrote:
> > If a '=back' doesn't close a '=over', Pod::XML generates a lone > > '</list>', which results in a badly formatted xml document. I've > > attached a small patch that only print the '</list>' if it's closing a > > '<list>'.
> > If a "=back" appears without an "=over" then the POD is invalid and > producing broken output should be expected.
Fair enough. It's just that a pod with a =back too many will still be rendered correctly, whereas a badly formatted xml document is much less forgiving. Oh well... I guess it's nothing that a few well-placed evals can't deal with. :-) Joy, `/anick