X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FXML%2FFeed%2FEntry.pm;h=0b66d1a457c621cc9cc775e8769752a8cd0f5e22;hb=12a4079ff02b376f0e9ff793137e9e35d8ea7645;hp=bc50585eda2fe2f60787107749a611f8b5d5ef33;hpb=9a36f82c8786ab4cc113947fc8801a31718b3d80;p=catagits%2FXML-Feed.git diff --git a/lib/XML/Feed/Entry.pm b/lib/XML/Feed/Entry.pm index bc50585..0b66d1a 100644 --- a/lib/XML/Feed/Entry.pm +++ b/lib/XML/Feed/Entry.pm @@ -20,10 +20,10 @@ sub new { my $class = shift; my($format) = @_; $format ||= 'Atom'; - my $format_class = 'XML::Feed::' . $format; + my $format_class = 'XML::Feed::Format::' . $format; eval "use $format_class"; Carp::croak("Unsupported format $format: $@") if $@; - my $entry = bless {}, join('::', __PACKAGE__, $format); + my $entry = bless {}, join('::', __PACKAGE__, "Format", $format); $entry->init_empty or return $class->error($entry->errstr); $entry; } @@ -54,6 +54,8 @@ sub issued; sub modified; sub lat; sub long; +sub format; +sub enclosure; 1; __END__ @@ -90,6 +92,10 @@ returns the new object. The title of the entry. +=head2 $entry->base([ $base ]) + +The url base of the entry. + =head2 $entry->link([ $uri ]) The permalink of the entry, in most cases, except in cases where it points @@ -143,6 +149,14 @@ A I object representing the last-modified date of the entry. If present, I<$modified> should be a I object. +=head2 $entry->wrap + +Take an entry in its native format and turn it into an I object. + +=head2 $entry->unwrap + +Take an I object and turn it into its native format. + =head1 AUTHOR & COPYRIGHT Please see the I manpage for author, copyright, and license