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 {