Subject: | namespaces with attributes not rendered correctly. |
Date: | Thu, 8 Mar 2007 10:32:40 -0500 |
To: | bug-XML-RSS [...] rt.cpan.org |
From: | "Jesus M. Rodriguez" <jmrodri [...] gmail.com> |
Dist name & version: XML-RSS 1.22
Perl version: perl-5.8.8-2.el4s1
OS: Red Hat Enterprise Linux 4
uname -a: Linux corvette.home.net 2.6.9-42.0.3.EL #1 Mon Sep 25
17:14:19 EDT 2006 i686 i686 i386 GNU/Linux
Adding a namespace that has attributes doesn't render correctly.
my $s2frss = new XML::RSS;
$s2frss->add_module(prefix=>'media', uri=>'http://search.yahoo.com/mrss/');
$s2frss->add_item(...
media => {
title => $item->{'title'},
text => $item->{'description'},
content => {
url => $item->{'enclosure'}->{'url'},
type => "image/jpeg",
height => "100", # change later
width => "100"
},
...
print $s2frss->as_string;
This renders as follows:
<media:content>HASH(0x9abc8ad)</media:content>
Expected result:
<media:content url="http://...." type="image/jpeg" height="100" width="100"/>
I have attached a test script used to recreate the problem, and a
patch to RSS.pm.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.