Skip Menu |

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

Report information
The Basics
Id: 19417
Status: resolved
Priority: 0/
Queue: XML-RSS

People
Owner: Nobody in particular
Requestors: gdsotirov [...] dir.bg
Cc:
AdminCc:

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



Subject: Missing last build date value in RSS 2.0
Producing a RSS 2.0 feed doesn't put value in the lastBuildDate element. It is empty. For example $rss->channel(... lastBuildDate => an valid RFC 822 date and time, ... produces empty (<lastBuildDate></lastBuildDate>) element. The problem is in RSS.pm at line 1115 where invalid key is passed for extracting of the lastBuildDate value. 1115: $output .= '<lastBuildDate>'.$self->encode($self->{channel}->{'dc'}->{lastBuildDate}).'</lastBuildDate>'."\n"; Additional information --- Distirbution: XML-RSS-1.10 Perl: 5.8.8 OS: Slackware Linux Current
Subject: Cannot Reproduce - but it does seem like a typo
On Mon May 22 13:27:58 2006, guest wrote: Show quoted text
> Producing a RSS 2.0 feed doesn't put value in the lastBuildDate > element. > It is empty. For example > > $rss->channel(... > lastBuildDate => an valid RFC 822 date and time, > ... > > produces empty (<lastBuildDate></lastBuildDate>) element. The
problem Show quoted text
> is > in RSS.pm at line 1115 where invalid key is passed for extracting
of Show quoted text
> the lastBuildDate value. > 1115: $output .= > '<lastBuildDate>'.$self->encode($self->{channel}->{'dc'}-
> >{lastBuildDate}).'</lastBuildDate>'."\n";
> > Additional information > --- > Distirbution: XML-RSS-1.10 > Perl: 5.8.8 > OS: Slackware Linux Current
Hi! I cannot reproduce it: <<<<<<<<<< #!/usr/bin/perl use strict; use warnings; use XML::RSS; my $rss = XML::RSS->new(version => "2.0"); $rss->channel(title => 'freshmeat.net', link => 'http://freshmeat.net', language => 'en', description => 'the one-stop-shop for all your Linux software needs', rating => '(PICS-1.1 "http://www.classify.org/safesurf/" 1 r (SS~~000 1))', copyright => 'Copyright 1999, Freshmeat.net', pubDate => 'Thu, 23 Aug 1999 07:00:00 GMT', lastBuildDate => 'Thu, 23 Aug 1999 16:20:26 GMT', docs => 'http://www.blahblah.org/fm.cdf', managingEditor => 'scoop@freshmeat.net', webMaster => 'scoop@freshmeat.net' ); $rss->add_item(title => "GTKeyboard 0.85", # creates a guid field with permaLink=true permaLink => "http://freshmeat.net/news/1999/06/21/930003829.html", # alternately creates a guid field with permaLink=false # guid => "gtkeyboard-0.85 enclosure => { url=>"http://www.gd.tld/", type=>"application/x-bittorrent" }, description => 'blah blah' ); print $rss->as_string(); Show quoted text
>>>>>>>>>
Yields among else: <<<<<<<<< <lastBuildDate>Thu, 23 Aug 1999 16:20:26 GMT</lastBuildDate> Show quoted text
>>>>>>>>>
But it does seem that it's indeed a typo and that if you import an older RSS format and convert it to RSS 2.0, then this will be empty. Can you supply a testcase that will reproduce the problem? Regards, Shlomi Fish
From: SHLOMIF [...] cpan.org
I was able to reproduce this problem by converting an RSS 1.0 feed to RSS 2.0. The attachment is a patch to fix this problem (against the subversion trunk) along with a testcase. Regards, Shlomi Fish

Message body is not shown because it is too large.

On Tue Oct 17 09:37:02 2006, SHLOMIF wrote: Show quoted text
> I was able to reproduce this problem by converting an RSS 1.0 feed
to Show quoted text
> RSS 2.0. The attachment is a patch to fix this problem (against the > subversion trunk) along with a testcase. > > Regards, > > Shlomi Fish
Here is a more complete patch that handles all the date conversions between <dc:date> and the <pubDate> and friends.

Message body is not shown because it is too large.

applied, thanks. I still would like all the methods that take and omit dates to use DateTime objects. I added that to the TODO.