r27387 - in /branches/upstream/libxml-feed-perl/current: Build.PL Changes MANIFEST META.yml Makefile.PL lib/XML/Feed.pm lib/XML/Feed/Entry.pm lib/XML/Feed/Format/Atom.pm lib/XML/Feed/Format/RSS.pm t/11-xml-base-rss.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Fri Nov 28 20:04:27 UTC 2008


Author: gregoa
Date: Fri Nov 28 20:04:24 2008
New Revision: 27387

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27387
Log:
[svn-upgrade] Integrating new upstream version, libxml-feed-perl (0.40)

Added:
    branches/upstream/libxml-feed-perl/current/Build.PL
Modified:
    branches/upstream/libxml-feed-perl/current/Changes
    branches/upstream/libxml-feed-perl/current/MANIFEST
    branches/upstream/libxml-feed-perl/current/META.yml
    branches/upstream/libxml-feed-perl/current/Makefile.PL
    branches/upstream/libxml-feed-perl/current/lib/XML/Feed.pm
    branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Entry.pm
    branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/Atom.pm
    branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/RSS.pm
    branches/upstream/libxml-feed-perl/current/t/11-xml-base-rss.t

Added: branches/upstream/libxml-feed-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/Build.PL?rev=27387&op=file
==============================================================================
--- branches/upstream/libxml-feed-perl/current/Build.PL (added)
+++ branches/upstream/libxml-feed-perl/current/Build.PL Fri Nov 28 20:04:24 2008
@@ -1,0 +1,30 @@
+# $Id: Build.PL 110 2008-11-24 00:43:50Z swistow $
+use Module::Build;
+
+my $build = Module::Build
+  ->new( module_name   => "XML::Feed",
+         dist_abstract => "XML Syndication Feed Support", 
+         license       => 'perl',
+         script_files  => [ ],
+         requires      => {
+                          'Class::ErrorHandler'        => 0,
+                          'DateTime'                   => 0,
+                          'DateTime::Format::Mail'     => 0,
+                          'DateTime::Format::W3CDTF'   => 0,
+                          'Feed::Find'                 => 0,
+                          'HTML::TokeParser'           => 0,
+                          'List::Util'                 => 0,
+                          'LWP::UserAgent'             => 0,
+                          'Module::Pluggable'          => 0,
+                          'URI::Fetch'                 => 0,
+                          'XML::Atom'                  => 0.32,
+                          'XML::LibXML'                => 1.66,
+                          'XML::RSS'                   => 1.37,
+                          'Test::More'                 => 0,
+                        },
+         create_makefile_pl => 'traditional',
+       );
+
+$build->create_build_script;
+
+

Modified: branches/upstream/libxml-feed-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/Changes?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/Changes (original)
+++ branches/upstream/libxml-feed-perl/current/Changes Fri Nov 28 20:04:24 2008
@@ -1,6 +1,13 @@
-# $Id: Changes 101 2008-11-04 22:09:14Z swistow $
+# $Id: Changes 109 2008-11-21 20:41:06Z swistow $
 
 Revision history for XML::Feed
+
+0.40 
+    - Force v1.37 of XML::RSS to get proper xml:base support
+    - Force v0.32 of XML::Atom to fix 
+      http://rt.cpan.org/Ticket/Display.html?id=40766
+      (Thanks to David Brownlee for the help in fixing)
+    - Add support for format() in Entry
 
 0.3 2008-11-04
     - Allow more flexible identification of Formats

Modified: branches/upstream/libxml-feed-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/MANIFEST?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/MANIFEST (original)
+++ branches/upstream/libxml-feed-perl/current/MANIFEST Fri Nov 28 20:04:24 2008
@@ -1,3 +1,4 @@
+Build.PL
 Changes
 lib/XML/Feed.pm
 lib/XML/Feed/Content.pm

Modified: branches/upstream/libxml-feed-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/META.yml?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/META.yml (original)
+++ branches/upstream/libxml-feed-perl/current/META.yml Fri Nov 28 20:04:24 2008
@@ -1,6 +1,6 @@
 ---
 name: XML-Feed
-version: 0.3
+version: 0.40
 author: []
 abstract: XML Syndication Feed Support
 license: perl
@@ -18,13 +18,13 @@
   Module::Pluggable: 0
   Test::More: 0
   URI::Fetch: 0
-  XML::Atom: 0.23
+  XML::Atom: 0.32
   XML::LibXML: 1.66
-  XML::RSS: 1.31
+  XML::RSS: 1.37
 provides:
   XML::Feed:
     file: lib/XML/Feed.pm
-    version: 0.3
+    version: 0.40
   XML::Feed::Content:
     file: lib/XML/Feed/Content.pm
   XML::Feed::Entry:

Modified: branches/upstream/libxml-feed-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/Makefile.PL?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/Makefile.PL (original)
+++ branches/upstream/libxml-feed-perl/current/Makefile.PL Fri Nov 28 20:04:24 2008
@@ -16,9 +16,9 @@
                            'Module::Pluggable' => '0',
                            'Test::More' => '0',
                            'URI::Fetch' => '0',
-                           'XML::Atom' => '0.23',
+                           'XML::Atom' => '0.32',
                            'XML::LibXML' => '1.66',
-                           'XML::RSS' => '1.31'
+                           'XML::RSS' => '1.37'
                          },
           'INSTALLDIRS' => 'site',
           'EXE_FILES' => [],

Modified: branches/upstream/libxml-feed-perl/current/lib/XML/Feed.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/lib/XML/Feed.pm?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/lib/XML/Feed.pm (original)
+++ branches/upstream/libxml-feed-perl/current/lib/XML/Feed.pm Fri Nov 28 20:04:24 2008
@@ -12,7 +12,7 @@
                       require     => 1,
                       sub_name    => 'formatters';
 
-our $VERSION = '0.3';
+our $VERSION = '0.40';
 our @formatters;
 BEGIN {
 	@formatters = __PACKAGE__->formatters;

Modified: branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Entry.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Entry.pm?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Entry.pm (original)
+++ branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Entry.pm Fri Nov 28 20:04:24 2008
@@ -54,6 +54,7 @@
 sub modified;
 sub lat;
 sub long;
+sub format;
 
 1;
 __END__

Modified: branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/Atom.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/Atom.pm?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/Atom.pm (original)
+++ branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/Atom.pm Fri Nov 28 20:04:24 2008
@@ -28,31 +28,6 @@
     
     $feed->{atom} = XML::Atom::Feed->new(%args);
     $feed;
-}
-
-# monkey patch
-{
-    my $sub =  sub {
-        my $item = shift;
-        if (XML::Atom::LIBXML) {
-            my $elem = $item->elem;
-            if (@_) {
-                $elem->setAttributeNS('http://www.w3.org/XML/1998/namespace',
-                    'base', $_[0]);
-            }
-            return $elem->getAttributeNS('http://www.w3.org/XML/1998/namespace', 'base');
-        } else {
-            if (@_) {
-                $item->elem->setAttribute('xml:base', $_[0]);
-            }
-            return $item->elem->getAttribute('xml:base');
-        }
-
-    };
-    no strict 'refs';
-    *XML::Atom::Feed::base    = $sub unless XML::Atom::Feed->can('base');
-    *XML::Atom::Entry::base   = $sub unless XML::Atom::Entry->can('base');
-    *XML::Atom::Content::base = $sub unless XML::Atom::Content->can('base');
 }
 
 sub init_string {
@@ -164,6 +139,8 @@
     $entry->{entry} = XML::Atom::Entry->new(Version => 1.0);
     1;
 }
+
+sub format { 'Atom' }
 
 sub title { shift->{entry}->title(@_) }
 sub source { shift->{entry}->source(@_) }

Modified: branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/RSS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/RSS.pm?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/RSS.pm (original)
+++ branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Format/RSS.pm Fri Nov 28 20:04:24 2008
@@ -34,7 +34,7 @@
     my($str) = @_;
     $feed->init_empty;
     if ($str) {
-        $feed->{rss}->parse($$str);
+        $feed->{rss}->parse($$str, { hashrefs_instead_of_strings => 1 } );
     }
     $feed;
 }
@@ -142,6 +142,7 @@
     my @entries;
     for my $item (@{ $rss->{items} }) {
         push @entries, XML::Feed::Entry::Format::RSS->wrap($item);
+		$entries[-1]->{_version} = $rss->{'version'};		
     }
     @entries;
 }
@@ -157,6 +158,8 @@
 
 package XML::Feed::Entry::Format::RSS;
 use strict;
+
+sub format { 'RSS ' . $_[0]->{'_version'} }
 
 use XML::Feed::Content;
 

Modified: branches/upstream/libxml-feed-perl/current/t/11-xml-base-rss.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/t/11-xml-base-rss.t?rev=27387&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/t/11-xml-base-rss.t (original)
+++ branches/upstream/libxml-feed-perl/current/t/11-xml-base-rss.t Fri Nov 28 20:04:24 2008
@@ -5,11 +5,7 @@
 use XML::Feed;
 use XML::RSS;
 
-if ($XML::RSS::VERSION <= 1.36) {
-    plan skip_all => "Version of XML::RSS is too old to do xml:base";
-} else {
-    plan tests => 13;
-}
+plan tests => 13;
 
 my $feed    = XML::Feed->parse('t/samples/base_rss.xml');
 




More information about the Pkg-perl-cvs-commits mailing list