Skip Menu |
 

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

Report information
The Basics
Id: 24392
Status: resolved
Priority: 0/
Queue: XML-Twig

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

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



Subject: root not triggering when ignore_elts specified
Download (untitled) / with headers
text/plain 130b
If you have a handler for root, it is never triggered if you specify ignore_elts. This worked in 3.26 and before, broke in 3.28.
Subject: test.pl
Download test.pl
text/x-perl 804b
use XML::Twig; $a=" <xtvd schemaVersion='1.3'> <station id='10035'/> <schedules> <schedule station='10035'/> </schedules> </xtvd> "; print "\n\nTrying with ignore_elts\n"; $twig=XML::Twig->new( ignore_elts => { schedules => 1 }, twig_handlers => { xtvd => sub { print "Got xtvd\n"; }, station => sub { print "Got station\n"; }, }); $twig->parse( $a); print "\nTrying without ignore_elts (why didn't xtvd trigger above?)\n"; $twig=XML::Twig->new( # ignore_elts => { schedules => 1 }, twig_handlers => { xtvd => sub { print "Got xtvd\n"; }, station => sub { print "Got station\n"; }, }); $twig->parse( $a);
Download (untitled) / with headers
text/plain 493b
On Tue Jan 16 00:50:39 2007, REDEN wrote: Show quoted text
> If you have a handler for root, it is never triggered if you specify > ignore_elts. > > This worked in 3.26 and before, broke in 3.28.
Indeed, that's a bug. I have a patched version here, I will put it on http://xmltwig.com on Monday (I am away and the site is down at the moment). Let me know if you need the patched version earlier, I can email it to you. I will release a new version early next week too. Thanks for spotting this. __ mirod
From: REDEN [...] cpan.org
Download (untitled) / with headers
text/plain 584b
On Thu Jan 18 16:59:52 2007, MIROD wrote: Show quoted text
> I have a patched version here, I will put it on http://xmltwig.com on > Monday (I am away and the site is down at the moment). Let me know if > you need the patched version earlier, I can email it to you.
No need to email it... the older versions work fine for me. I was alerted to the problem when one of my users did an auto-update and the new module broke my code. ( a US TV listings grabber, tv_grab_na_dd in http://xmltv.org ) Once you upload a new version to CPAN, the trouble reports should stop. Thanks for the module! Robert


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.