add links to the POD
[catagits/XML-Feed.git] / lib / XML / Feed.pm
index db800ff..955a147 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Feed.pm 1958 2006-08-14 05:31:27Z btrott $
+# $Id$
 
 package XML::Feed;
 use strict;
@@ -12,7 +12,8 @@ use Module::Pluggable search_path => "XML::Feed::Format",
                       require     => 1,
                       sub_name    => 'formatters';
 
-our $VERSION = '0.3';
+our $VERSION = '0.46';
+our $MULTIPLE_ENCLOSURES = 0;
 our @formatters;
 BEGIN {
        @formatters = __PACKAGE__->formatters;
@@ -212,10 +213,10 @@ the various syndication formats. The different flavors of RSS and Atom
 handle data in different ways: date handling; summaries and content;
 escaping and quoting; etc. This module attempts to remove those differences
 by providing a wrapper around the formats and the classes implementing
-those formats (I<XML::RSS> and I<XML::Atom::Feed>). For example, dates are
+those formats (L<XML::RSS> and L<XML::Atom::Feed>). For example, dates are
 handled differently in each of the above formats. To provide a unified API for
 date handling, I<XML::Feed> converts all date formats transparently into
-I<DateTime> objects, which it then returns to the caller.
+L<DateTime> objects, which it then returns to the caller.
 
 =head1 USAGE
 
@@ -231,7 +232,8 @@ Creates a new empty I<XML::Feed> object using the format I<$format>.
 
 =head2 XML::Feed->parse($stream, $format)
 
-Parses a syndication feed identified by I<$stream>. I<$stream> can be any
+Parses a syndication feed identified by I<$stream> and returns an
+I<XML::Feed> obhect. I<$stream> can be any
 one of the following:
 
 =over 4
@@ -334,15 +336,15 @@ A string.
 =head2 $feed->entries
 
 A list of the entries/items in the feed. Returns an array containing
-I<XML::Feed::Entry> objects.
+L<XML::Feed::Entry> objects.
 
 =head2 $feed->items
 
-A synonym for I<$feed->entries>.
+A synonym (alias) for <$feed-E<gt>entries>.
 
 =head2 $feed->add_entry($entry)
 
-Adds an entry to the feed. I<$entry> should be an I<XML::Feed::Entry>
+Adds an entry to the feed. I<$entry> should be an L<XML::Feed::Entry>
 object in the correct format for the feed.
 
 =head2 $feed->as_xml
@@ -354,18 +356,33 @@ the current format of the I<$feed> object.
 
 =over 4
 
-=item C<$XML::Feed::RSS::PREFERRED_PARSER>
+=item C<$XML::Feed::Format::RSS::PREFERRED_PARSER>
 
 If you want to use another RSS parser class than XML::RSS (default), you can
-change the class by setting C<$PREFERRED_PARSER> variable in XML::Feed::RSS
-package.
+change the class by setting C<$PREFERRED_PARSER> variable in the
+XML::Feed::Format::RSS package.
 
-    $XML::Feed::RSS::PREFERRED_PARSER = "XML::RSS::LibXML";
+    $XML::Feed::Format::RSS::PREFERRED_PARSER = "XML::RSS::LibXML";
 
 B<Note:> this will only work for parsing feeds, not creating feeds.
 
+B<Note:> Only C<XML::RSS::LibXML> version 0.3004 is known to work at the moment.
+
+=item C<$XML::Feed::MULTIPLE_ENCLOSURES>
+
+Although the RSS specification states that there can be at most one enclosure per item 
+some feeds break this rule.
+
+If this variable is set then C<XML::Feed> captures all of them and makes them available as a list.
+
+Otherwise it returns the last enclosure parsed.
+
+B<Note:> C<XML::RSS> version 1.44 is needed for this to work.
+
 =back
 
+=cut
+
 =head1 VALID FEEDS
 
 For reference, this cgi script will create valid, albeit nonsensical feeds