Fix bug in conversion process between RSS and Atom where HTML got double encoded
[catagits/XML-Feed.git] / lib / XML / Feed.pm
index 02d1135..7f609f3 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.44';
+our $MULTIPLE_ENCLOSURES = 0;
 our @formatters;
 BEGIN {
        @formatters = __PACKAGE__->formatters;
@@ -86,7 +87,6 @@ sub identify_format {
                return $name if eval { $class->identify(\$tmp) };
                return $feed->error($@) if $@;
        } 
-       die "$$xml\n";
        return $feed->error("Cannot detect feed type");
 }
 
@@ -365,8 +365,23 @@ package.
 
 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