Skip Menu |
 

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

Report information
The Basics
Id: 65151
Status: resolved
Worked: 15 min
Priority: 0/
Queue: XML-Tidy

People
Owner: Pip [...] CPAN.Org
Requestors: simotrone [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.6.A7RJKwl
Fixed in: (no value)



Subject: Don't open really XMLF
Download (untitled) / with headers
text/plain 771b
I think that in the last "else" in "new" method there is the problem: shift(@_) if($_[0] eq 'filename'); # special-case loading XML file with non-standard declaration if(-r $_[0]){ # special-case loading XML file with non-standard declaration (but doesn't handle inline XML data or IORef yet) open(XMLF,'<',$_[1]);$xmld = <XMLF>;close(XMLF);$xmld =~ s/(\?>).*/$1\n/; # if provided XML Declaration doesn't seem well-formed, ... $xmld = qq(<?xml version="1.0" encoding="utf-8"?>\n) unless($xmld =~ /^<\?xml version="[^"]+" encoding="[^"]+" *\?>\n$/); # ...reset to Standard } open(XMLF,'<',$_[1]) should to be open(XMLF,'<',$_[0]), because the filename is in $_[0]. So the unless condition have something to check. Thank you for XML::Tidy, Simone
v1.8.B2AMvdl fixed this -- -Pip@CPAN.Org


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.