Skip Menu |

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

Report information
The Basics
Id: 55197
Status: resolved
Priority: 0/
Queue: XML-FeedPP

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

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



Subject: Not a HASH reference at /home/dom/perl5/lib/perl5/XML/FeedPP.pm line 2260
Hello, there seems to be a little error in the set_value subroutine due a fix to allow CDATA sections. As it's now possible to for an element to be a hash reference, a scalar reference and a simple scalar, just checking for the element being a reference seems to cause some problems if your element has been a scalar reference before. The attached patch solved this at least for my use case. Cheers, Mario
Subject: FeedPP_hash_ref.patch
--- FeedPP.pm.orig 2010-03-03 23:08:47.627622323 +0100 +++ FeedPP.pm 2010-03-03 23:05:36.116111802 +0100 @@ -2256,7 +2256,7 @@ my $elem = shift; my $text = shift; my $attr = \@_; - if ( ref $self->{$elem} ) { + if ( ref $self->{$elem} eq 'HASH' ) { $self->{$elem}->{'#text'} = $text; } else {
fixed at version 0.42 which was released at 2010/10/31. thank you.