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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1184450207-4759-7"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 210
Download (untitled) / with headers
text/plain 210b
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
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1184450206-4759-6"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="buggy.pod"
Content-Disposition: inline; filename="buggy.pod"
Content-Transfer-Encoding: base64
Content-Length: 94
Download buggy.pod
text/x-pod 94b
=head1 How a =back can spoil the fun The =back below will generate a lone '</list>' =back
Subject: Pod-XML.patch
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1184450013-4799-2"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="Pod-XML.patch"
Content-Disposition: inline; filename="Pod-XML.patch"
Content-Transfer-Encoding: base64
Content-Length: 718
Download Pod-XML.patch
text/x-diff 718b
*** 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" ) {
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-22586-1192815711-1767.28213-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: mattw [...] mattsscripts.co.uk
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 374
Download (untitled) / with headers
text/plain 374b
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.
X-Ymail-Osg: OqRakIUVM1kZG3sH8kTYauLO5NFxLzFFgpkCDfqShWZhtW0bigQKZCiQnahodXNeqQ--
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-22586-1192815711-1767.28213-6-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-28213 [...] rt.cpan.org> <rt-3.6.HEAD-22586-1192815711-1767.28213-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 89E064D804A for <bug-Pod-XML [...] rt.cpan.org>; Fri, 19 Oct 2007 19:29:25 -0400 (EDT)
Received: (qmail 11299 invoked by alias); 19 Oct 2007 23:29:24 -0000
Received: from smtp106.rog.mail.re2.yahoo.com (HELO smtp106.rog.mail.re2.yahoo.com) (68.142.225.204) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Fri, 19 Oct 2007 16:29:16 -0700
Received: (qmail 23591 invoked from network); 19 Oct 2007 23:29:11 -0000
Received: from unknown (HELO gilgamesh.babyl.dyndns.org) (yanick_champoux [...] rogers.com [...] 99.224.89.188 with login) by smtp106.rog.mail.re2.yahoo.com with SMTP; 19 Oct 2007 23:29:11 -0000
Received: from enkidu (enkidu [192.168.0.103]) by gilgamesh.babyl.dyndns.org (Postfix) with ESMTP id 6413E439EE for <bug-Pod-XML [...] rt.cpan.org>; Fri, 19 Oct 2007 20:09:25 -0400 (EDT)
Delivered-To: cpan-bug+pod-xml [...] diesel.bestpractical.com
User-Agent: KMail/1.9.7
Subject: Re: [rt.cpan.org #28213] a '=back' without a '=over' creates malformed xml
Return-Path: <yanick [...] babyl.dyndns.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Pod-XML [...] rt.cpan.org
Date: Fri, 19 Oct 2007 19:54:08 -0400
Message-Id: <200710191954.08683.yanick [...] babyl.dyndns.org>
To: bug-Pod-XML [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Yanick Champoux <yanick [...] babyl.dyndns.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-22575-1192836575-340.28213-0-0 [...] rt.cpan.org>
Content-Length: 751
Download (untitled) / with headers
text/plain 751b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.