-# $Id: Entry.pm 1872 2005-08-12 04:28:42Z btrott $
+# $Id$
package XML::Feed::Entry;
use strict;
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;
}
sub modified;
sub lat;
sub long;
+sub format;
+sub tags { shift->category(@_) }
1;
__END__
The category in which the entry was posted.
+Returns a list of categories if called in array context or the first
+category if called in scalar context.
+
+B<WARNING> It's possible this API might change to have an
+I<add_category> instead.
+
+=head2 $entry->tags([ $tag ])
+
+A synonym for I<category>;
+
=head2 $entry->author([ $author ])
The name or email address of the person who posted the entry.
If present, I<$modified> should be a I<DateTime> object.
+=head2 $entry->wrap
+
+Take an entry in its native format and turn it into an I<XML::Feed::Entry> object.
+
+=head2 $entry->unwrap
+
+Take an I<XML::Feed::Entry> object and turn it into its native format.
+
=head1 AUTHOR & COPYRIGHT
Please see the I<XML::Feed> manpage for author, copyright, and license