Add version to Entry
[catagits/XML-Feed.git] / lib / XML / Feed / Format / RSS.pm
index 5494c0b..e29123c 100644 (file)
@@ -142,6 +142,7 @@ sub entries {
     my @entries;
     for my $item (@{ $rss->{items} }) {
         push @entries, XML::Feed::Entry::Format::RSS->wrap($item);
+               $entries[-1]->{_version} = $rss->{'version'};           
     }
     @entries;
 }
@@ -158,6 +159,8 @@ sub as_xml { $_[0]->{rss}->as_string }
 package XML::Feed::Entry::Format::RSS;
 use strict;
 
+sub format { 'RSS ' . $_[0]->{'_version'} }
+
 use XML::Feed::Content;
 
 use base qw( XML::Feed::Entry );