Skip Menu |

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

Report information
The Basics
Id: 25099
Status: resolved
Worked: 5 min
Priority: 0/
Queue: XML-Tiny

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

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



Subject: [PATCH] Avoid warnings pollution + fix tests
Hello, Attached is a patch to: 1) localize warnings to XML::Tiny, in order to make programs or modules now using XML::Tiny suddenly emit warnings where they didn't (this broke one of my programs); 2) fix t/00-file-handling.t to make it simpler and more portable. With this patch, XML::Tiny pass all tests with the following versions of Perl under Linux x86-64: 5.4.5 5.5.3 5.5.4 5.6.0 5.6.2 5.8.7 5.8.7-thread 5.8.8 5.8.9-29832 5.9.4 5.9.5-29839 Regards, -- Close the world, txEn eht nepO.
Subject: XML-Tiny-1.04-nowarnings+tests.diff
Seulement dans XML-Tiny-1.04/: blib diff -ru XML-Tiny-1.04-orig/lib/XML/Tiny.pm XML-Tiny-1.04/lib/XML/Tiny.pm --- XML-Tiny-1.04-orig/lib/XML/Tiny.pm 2007-02-11 15:15:15.000000000 +0100 +++ XML-Tiny-1.04/lib/XML/Tiny.pm 2007-02-23 17:31:58.710725497 +0100 @@ -10,7 +10,7 @@ @EXPORT_OK = qw(parsefile); @ISA = qw(Exporter); -$^W = 1; # can't use warnings as that's a 5.6-ism +local $^W = 1; # can't use warnings as that's a 5.6-ism =head1 NAME Seulement dans XML-Tiny-1.04/: Makefile Seulement dans XML-Tiny-1.04/: pm_to_blib diff -ru XML-Tiny-1.04-orig/t/00-file-handling.t XML-Tiny-1.04/t/00-file-handling.t --- XML-Tiny-1.04-orig/t/00-file-handling.t 2007-01-30 17:50:41.000000000 +0100 +++ XML-Tiny-1.04/t/00-file-handling.t 2007-02-23 17:34:47.755441569 +0100 @@ -1,9 +1,9 @@ +use FileHandle; use XML::Tiny qw(parsefile); use strict; require "t/test_functions"; -my $tests = $] >= 5.006 ? 6 : 5; -print "1..$tests\n"; +print "1..6\n"; $^W = 1; @@ -30,15 +30,14 @@ ); close(FOO); -if($] >= 5.005003) { # lexical filehandles! woo! - open(my $foo, 't/minimal.xml'); - is_deeply( - parsefile($foo), - [{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => {} }], - "Passing a lexical filehandle works" - ); - close($foo); -} +my $foo = FileHandle->new; +open($foo, 't/minimal.xml'); +is_deeply( + parsefile($foo), +[{ 'name' => 'x', 'content' => [], 'type' => 'e', attrib => {} }], +"Passing a lexical filehandle works" +); +close($foo); is_deeply( parsefile('_TINY_XML_STRING_<x></x>'),
Thanks, applied in version 1.05