Skip Menu |

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

Report information
The Basics
Id: 70654
Status: resolved
Priority: 0/
Queue: XML-TreeBuilder

People
Owner: Jeff.Fearn [...] gmail.com
Requestors: elmic11111 [...] gmail.com
Cc:
AdminCc:

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



Subject: XML TreeBuilder
Date: Wed, 31 Aug 2011 15:36:30 -0400
To: jfearn [...] cpan.org, bug-XML-TreeBuilder [...] rt.cpan.org
From: David Hofmann <elmic11111 [...] gmail.com>
I'm getting an error when attempting to parse and XML file. Can't use string ("ErrorContext") as a HASH ref while "strict refs" in use at /usr/share/perl5/vendor_perl/XML/TreeBuilder.pm line 20. I'm using: perl 5, version 12, subversion 4 (v5.12.4) built for i386-linux-thread-multi perl-XML-TreeBuilder.noarch 4.0-4.fc15 Here the code to call it: my $tree = XML::TreeBuilder->new(ErrorContext => 2); $tree->parsefile($xmlfile); This is a new system which I just setup. So I'm thinking there might be a dependance issue somewhere because I've used this code the the past on other system. But I've gone through the dependance and can't find any missing. Any help would be appreciated. David
Hi David, new is expecting an anonymous hash, the bug here is that it should either complain about the data type mismatch or handle an array. my $tree = XML::TreeBuilder->new( { NoExpand => 1, ErrorContext => 2 } ); I'm a bit behind ATM, but when I get time I'll decide how best to handle this and either give a useful message or handle an array. In the mean time using an anonymous hash will get your code working. Cheers, Jeff.
Subject: Re: [rt.cpan.org #70654] XML TreeBuilder
Date: Thu, 1 Sep 2011 12:13:32 -0400
To: bug-XML-TreeBuilder [...] rt.cpan.org
From: David Hofmann <elmic11111 [...] gmail.com>
Thanks, that fixed it. David On Wed, Aug 31, 2011 at 10:36 PM, Jeff Fearn via RT <bug-XML-TreeBuilder@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=70654 > > > Hi David, new is expecting an anonymous hash, the bug here is that it > should either complain about the data type mismatch or handle an array. > > my $tree = XML::TreeBuilder->new( { NoExpand => 1, ErrorContext => 2 } ); > > I'm a bit behind ATM, but when I get time I'll decide how best to handle > this and either give a useful message or handle an array. In the mean > time using an anonymous hash will get your code working. > > Cheers, Jeff. >
Fix committed to devel branch.
Subject: Re: [rt.cpan.org #70654] XML TreeBuilder
Date: Wed, 25 Sep 2013 22:43:01 -0400
To: bug-XML-TreeBuilder [...] rt.cpan.org
From: David Hofmann <elmic11111 [...] gmail.com>
Thanks for the updates. On Wed, Sep 25, 2013 at 9:51 PM, Jeff Fearn via RT < bug-XML-TreeBuilder@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=70654 > > > Fix committed to devel branch. >