Your message dated Thu, 03 Aug 2006 09:24:37 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#297885: fixed in libxml-libxml-perl 1.59-1
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: libxml-libxml-perl
Version: 1.58-0.3
Severity: normal
Hi,
the XML::LibXML::SAX parser does not raise an exception by default when
parsing invalid XML syntax. The other available SAX parsers on my
system, XML::LibXML::SAX::Parser (from the same libxml-libxml-perl
package) and XML::SAX::PurePerl (from libxml-sax-perl) do raise
exceptions by default, so this is inconsistent behaviour.
I'm attaching a test script that shows the problem. It defines a simple
XML handling class, MyHandler, which is derived from XML::SAX::Base,
and uses it to parse an invalid XML document with different SAX
parsers. The result output is:
%./saxtest.pl
Trying parser XML::LibXML::SAX::Parser...OK: got exception
Trying parser XML::SAX::PurePerl...OK: got exception
Trying parser XML::LibXML::SAX...ERROR: no exception
When called with the '-2' parameter, it uses another handling class,
MyHandler2, that differs from MyHandler only in that it has an explicit
'error' method. The resulting output is now;
% ./saxtest.pl -2
Trying parser XML::LibXML::SAX::Parser...OK: got exception
Trying parser XML::SAX::PurePerl...OK: got exception
Trying parser XML::LibXML::SAX...OK: got exception
(There's also a "-v" parameter that shows the error string, in case you
want to verify the cause of the exception.)
Note that XML::LibXML::SAX is the default SAX parser when
libxml-libxml-perl is installed, so it would seem even more important
for it to do the Right Thing.
I ran into the problem while inspecting test failures in libxtm-perl,
bug #249234. I'll send details there shortly.
Cheers,
--
Niko Tyni [EMAIL PROTECTED]
#!/usr/bin/perl -w
use strict;
use XML::SAX;
use XML::SAX::ParserFactory;
use XML::LibXML::SAX;
use Getopt::Std;
my %opts;
getopts('2v', \%opts);
my @parsers = map { $_->{Name} } @{XML::SAX->parsers()};
my $h;
if ($opts{2}) {
$h = new MyHandler2;
} else {
$h = new MyHandler;
}
for (@parsers) {
print "Trying parser $_...";
local $XML::SAX::ParserPackage = $_;
my $p = XML::SAX::ParserFactory->parser(Handler => $h);
eval { $p->parse_string(q|<?xml version="1.0"?><a/><a/>|) };
if ($@) {
print "OK: got exception\n";
print $@ if $opts{v};
} else {
print "ERROR: no exception\n";
}
print "\n";
}
package MyHandler;
use base qw(XML::SAX::Base);
1;
package MyHandler2;
use base qw(XML::SAX::Base);
sub error {
my $self = shift;
die(shift);
}
1;
--- End Message ---
--- Begin Message ---
Source: libxml-libxml-perl
Source-Version: 1.59-1
We believe that the bug you reported is fixed in the latest version of
libxml-libxml-perl, which is due to be installed in the Debian FTP archive:
libxml-libxml-perl_1.59-1.diff.gz
to pool/main/libx/libxml-libxml-perl/libxml-libxml-perl_1.59-1.diff.gz
libxml-libxml-perl_1.59-1.dsc
to pool/main/libx/libxml-libxml-perl/libxml-libxml-perl_1.59-1.dsc
libxml-libxml-perl_1.59-1_i386.deb
to pool/main/libx/libxml-libxml-perl/libxml-libxml-perl_1.59-1_i386.deb
libxml-libxml-perl_1.59.orig.tar.gz
to pool/main/libx/libxml-libxml-perl/libxml-libxml-perl_1.59.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Florian Ragwitz <[EMAIL PROTECTED]> (supplier of updated libxml-libxml-perl
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 3 Aug 2006 16:12:11 +0200
Source: libxml-libxml-perl
Binary: libxml-libxml-perl
Architecture: source i386
Version: 1.59-1
Distribution: unstable
Urgency: low
Maintainer: Florian Ragwitz <[EMAIL PROTECTED]>
Changed-By: Florian Ragwitz <[EMAIL PROTECTED]>
Description:
libxml-libxml-perl - Perl module for using the GNOME libxml2 library
Closes: 287473 297885 358524
Changes:
libxml-libxml-perl (1.59-1) unstable; urgency=low
.
* New upstream release.
+ Fixes several memory leaks (Closes: #358524).
+ Adds default error method for XML::LibXML::SAX (Closes: #297885).
* Bump Standards-Version to 3.7.2 (no changes).
* Fixed some documentation typos in XML::LibXML::Node (Closes: #287473).
Files:
1905caf6d73dadab7ca52b1b938de794 770 perl optional
libxml-libxml-perl_1.59-1.dsc
b9a99e3ce781f9eabba0b1776369b328 230723 perl optional
libxml-libxml-perl_1.59.orig.tar.gz
7a3210e027054f14718cc9f7a496faa2 7566 perl optional
libxml-libxml-perl_1.59-1.diff.gz
dbe51d124b8578aee30d72d9a32b6d8e 300050 perl optional
libxml-libxml-perl_1.59-1_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFE0g3GdC8qQo5jWl4RAqsJAKCFjs2lOGsaMCumPhDciPH1H8ZMAwCfXWyl
GX4hJCTrs2dnfte9qQ+El54=
=SFzO
-----END PGP SIGNATURE-----
--- End Message ---