Skip Menu |
 

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

Report information
The Basics
Id: 8043
Status: resolved
Priority: 0/
Queue: XML-DOM

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

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

Attachments


Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
Subject: XML-DOM-1.43 fails tests
X-RT-Original-Encoding: iso-8859-1
Content-Length: 1598
Download (untitled) / with headers
text/plain 1.5k
I think the problem is Japanese related. here is the result of maketest: [ambs@holst XML-DOM-1.43]$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/build_dom...........ok t/dom_astress.........ok t/dom_attr............ok t/dom_cdata...........ok t/dom_documenttype....ok t/dom_encode..........ok t/dom_example.........ok t/dom_extent..........ok t/dom_jp_astress......ok t/dom_jp_attr.........FAILED tests 3, 9, 12, 14, 19, 22 Failed 6/23 tests, 73.91% okay t/dom_jp_cdata........FAILED test 3 Failed 1/3 tests, 66.67% okay t/dom_jp_example......ok t/dom_jp_minus........FAILED test 2 Failed 1/2 tests, 50.00% okay t/dom_jp_modify.......FAILED test 16 Failed 1/16 tests, 93.75% okay t/dom_jp_print........FAILED tests 2-3 Failed 2/3 tests, 33.33% okay t/dom_minus...........ok t/dom_modify..........ok t/dom_noexpand........ok t/dom_print...........ok t/dom_template........ok t/dom_text............ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/dom_jp_attr.t 23 6 26.09% 3 9 12 14 19 22 t/dom_jp_cdata.t 3 1 33.33% 3 t/dom_jp_minus.t 2 1 50.00% 2 t/dom_jp_modify.t 16 1 6.25% 16 t/dom_jp_print.t 3 2 66.67% 2-3 Failed 5/21 test scripts, 76.19% okay. 11/129 subtests failed, 91.47% okay. make: *** [test_dynamic] Error 255 If I can suply some more information, just say :-D
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
Content-Type: multipart/mixed; boundary="----------=_1100864605-7298-1"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 139
Download (untitled) / with headers
text/plain 139b
The problem is that XML-DOM use the evil 'bytes' pragma. I've attached the patch that we have applied to ActivePerl to fix this problem.
Content-Type: text/x-diff; name="xml-dom-bytes.patch"
Content-Disposition: inline; filename="xml-dom-bytes.patch"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 1457
Download xml-dom-bytes.patch
text/x-diff 1.4k
Change 119231 by gisle@ask on 2004/11/19 03:38:58 use bytes is just evil! ...especially a global one. This caused strings to loose their Unicode-ness and gave us various test failures. Affected files ... ... //depot/main/Apps/Gecko/src/Modules/XML-DOM/lib/XML/DOM.pm#3 edit Differences ... ==== //depot/main/Apps/Gecko/src/Modules/XML-DOM/lib/XML/DOM.pm#3 (text) ==== Index: main/Apps/Gecko/src/Modules/XML-DOM/lib/XML/DOM.pm --- main/Apps/Gecko/src/Modules/XML-DOM/lib/XML/DOM.pm.~1~ Fri Nov 19 12:43:36 2004 +++ main/Apps/Gecko/src/Modules/XML-DOM/lib/XML/DOM.pm Fri Nov 19 12:43:36 2004 @@ -29,8 +29,6 @@ use strict; -use bytes; - use vars qw( $VERSION @ISA @EXPORT $IgnoreReadOnly $SafeMode $TagStyle %DefaultEntities %DecodeDefaultEntity @@ -405,6 +403,7 @@ # sub forgiving_isValidName { + use bytes; # XML::RegExp expressed in terms encoded UTF8 $_[0] =~ /^$XML::RegExp::Name$/o; } @@ -413,6 +412,7 @@ # sub picky_isValidName { + use bytes; # XML::RegExp expressed in terms encoded UTF8 $_[0] =~ /^$XML::RegExp::Name$/o and $_[0] !~ /^xml/i; } @@ -1243,6 +1243,7 @@ my ($self, $str) = @_; my $doctype = $self->[_Doc]->getDoctype; + use bytes; # XML::RegExp expressed in terms encoded UTF8 $str =~ s/&($XML::RegExp::Name|(#([0-9]+)|#x([0-9a-fA-F]+)));/ defined($2) ? XML::DOM::XmlUtf8Encode ($3 || hex ($4)) : expandEntityRef ($1, $doctype)/ego; End of Patch.
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 203
Download (untitled) / with headers
text/plain 203b
I just forced the installation given that that tests had names resembling japanese :-) But, it is just a good idea to add the patch to the cpan version so users stop complaining (like me :-)) Thanks.
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.415 (Entity 5.415)
From: gerard.tromp at sanger.med.wayne.edu
X-RT-Original-Encoding: iso-8859-1
Content-Length: 274
Download (untitled) / with headers
text/plain 274b
[GAAS - Fri Nov 19 06:43:25 2004]: Show quoted text
> The problem is that XML-DOM use the evil 'bytes' pragma. > I've attached the patch that we have applied to ActivePerl > to fix this problem.
Nice patch -- thank you. It would be great if this patch was included in the next release.
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.415 (Entity 5.415)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 114
Download (untitled) / with headers
text/plain 114b
Got it, will release 1.44 today with patch Show quoted text
> It would be great if this patch was included in the next release.


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.