Skip Menu |

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

Report information
The Basics
Id: 4495
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: XML-RSS

Owner: SHLOMIF [...]
Requestors: spoon [...]

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

Date: Thu, 27 Nov 2003 00:00:25 +1100
From: Iain Truskett <spoon [...]>
To: bug-xml-rss [...]
Subject: Patch to allow arrayrefs, thus multiple values.
Download (untitled) / with headers
text/plain 1.3k
Heyo, In order to let the trackback module work properly [1], one must be able to have multiple instances of the trackback:about element. [1] e.g. tb => [ ping => CGI::Kwiki::Plugin::TrackBack::tb_id( $self, $page_id ), ( @$pings ? ( map { ("about" => $_->{ping}) } @$pings ) : () ) ] As you know, with a hash ref this would be impossible. Arrayrefs works well though. Thus, the attached patch which, at the expense of a bit more initial logic, lets one use either arrays or hashes. No worries about backwards compatibility as previously XML::RSS would've died when trying to dereference the arrayref as a hashref. I was curious about how sometimes it received something that wasn't a reference (hence the empty condition). I'm not sure if that's a bug or intended. You may want to look into it. Or not =) See for an example of it in use (the PythonArticles item). On another note: the TrackBack module reference uses this as an alternative syntax (preferred for RSS 1.0 based output): <trackback:ping rdf:resource=""/> Damned if I know how to generate that, though. cheers, -- Iain. <>
Download xmlrss-arrays.patch
text/x-diff 2.6k

Message body is not shown because sender requested not to inline it.

Naturally that should be saying: for my $i ( 0..($#$j/2-1) ) Yay for off-by-ones.
Download (untitled) / with headers
text/plain 262b
This was fixed in the trunk. SPOON has passed away unfortunately, but I hope other people will find it useful. Note that the semantics of this patch are different: it's an array of {'el' => 'val'} => hash-refs instead of an array of interleaved keys and values.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to