r26088 - in /branches/upstream/libxml-feed-perl/current: ./ inc/ lib/XML/ lib/XML/Feed/ t/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Oct 17 14:27:28 UTC 2008
Author: gregoa
Date: Fri Oct 17 14:27:24 2008
New Revision: 26088
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26088
Log:
[svn-upgrade] Integrating new upstream version, libxml-feed-perl (0.21)
Added:
branches/upstream/libxml-feed-perl/current/MANIFEST.SKIP
branches/upstream/libxml-feed-perl/current/t/08-convert-summary-bug.t
Removed:
branches/upstream/libxml-feed-perl/current/inc/
Modified:
branches/upstream/libxml-feed-perl/current/Build.PL
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/Atom.pm
branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Entry.pm
branches/upstream/libxml-feed-perl/current/lib/XML/Feed/RSS.pm
branches/upstream/libxml-feed-perl/current/t/01-parse.t
branches/upstream/libxml-feed-perl/current/t/06-atom10.t
branches/upstream/libxml-feed-perl/current/t/07-atom10-create.t
Modified: 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=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/Build.PL (original)
+++ branches/upstream/libxml-feed-perl/current/Build.PL Fri Oct 17 14:27:24 2008
@@ -1,3 +1,29 @@
# $Id: Build.PL 918 2004-05-29 17:29:55Z btrott $
+use Module::Build;
-require 'Makefile.PL';
+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,
+ 'URI::Fetch' => 0,
+ 'XML::Atom' => 0.23,
+ 'XML::LibXML' => 1.66,
+ 'XML::RSS' => 1.01,
+ '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=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/Changes (original)
+++ branches/upstream/libxml-feed-perl/current/Changes Fri Oct 17 14:27:24 2008
@@ -1,7 +1,36 @@
-# $Id: Changes 1958 2006-08-14 05:31:27Z btrott $
+# $Id: Changes 67 2008-10-15 18:11:12Z swistow $
Revision history for XML::Feed
+0.21 2008.10.15
+ - Remove the inc directory because it's not needed anymore
+
+0.20 2008.10.15
+ - Allow specification of the parsing format. Fixes bugs
+ http://rt.cpan.org/Public/Bug/Display.html?id=35580 and
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477394
+ (Gregor Herrmann and Martin F Krafft)
+ - Allow pass through of initialisation options
+ http://rt.cpan.org/Public/Bug/Display.html?id=24729
+ (Christopher H. Laco CLACO)
+ - Force working version XML::Atom
+ http://rt.cpan.org/Public/Bug/Display.html?id=22548
+ http://rt.cpan.org/Public/Bug/Display.html?id=19920
+ - Allow extra Atom accessors
+ http://rt.cpan.org/Public/Bug/Display.html?id=33881
+ (Paul Mison PMISON)
+ - Prevent empty content
+ http://rt.cpan.org/Public/Bug/Display.html?id=29684
+ (Dave Rolsky DROLSKY)
+ - Cope with "updated" and "published" elements
+ http://rt.cpan.org/Public/Bug/Display.html?id=20763
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380498
+ (Gregor Herrmann and Joey Hess)
+ - Switch to Module::Build
+ http://rt.cpan.org/Public/Bug/Display.html?id=38283
+ http://rt.cpan.org/Public/Bug/Display.html?id=20575
+ http://rt.cpan.org/Public/Bug/Display.html?id=21300
+
0.12 2006.08.13
- Generate Atom 1.0 feeds by default. Thanks to Tatsuhiko Miyagawa for
the patch.
Modified: branches/upstream/libxml-feed-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/MANIFEST?rev=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/MANIFEST (original)
+++ branches/upstream/libxml-feed-perl/current/MANIFEST Fri Oct 17 14:27:24 2008
@@ -1,21 +1,5 @@
Build.PL
Changes
-inc/ExtUtils/AutoInstall.pm
-inc/HTML/TokeParser.pm
-inc/LWP.pm
-inc/Module/AutoInstall.pm
-inc/Module/Install.pm
-inc/Module/Install/AutoInstall.pm
-inc/Module/Install/Base.pm
-inc/Module/Install/Build.pm
-inc/Module/Install/Can.pm
-inc/Module/Install/Fetch.pm
-inc/Module/Install/Include.pm
-inc/Module/Install/Makefile.pm
-inc/Module/Install/Metadata.pm
-inc/Module/Install/Win32.pm
-inc/Module/Install/WriteAll.pm
-inc/Test/More.pm
lib/XML/Feed.pm
lib/XML/Feed/Atom.pm
lib/XML/Feed/Content.pm
@@ -23,6 +7,7 @@
lib/XML/Feed/RSS.pm
Makefile.PL
MANIFEST This list of files
+MANIFEST.SKIP
META.yml
README
t/00-compile.t
@@ -32,6 +17,7 @@
t/05-atom10-link.t
t/06-atom10.t
t/07-atom10-create.t
+t/08-convert-summary-bug.t
t/samples/atom-10-example.xml
t/samples/atom-full.xml
t/samples/atom.xml
Added: branches/upstream/libxml-feed-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/MANIFEST.SKIP?rev=26088&op=file
==============================================================================
--- branches/upstream/libxml-feed-perl/current/MANIFEST.SKIP (added)
+++ branches/upstream/libxml-feed-perl/current/MANIFEST.SKIP Fri Oct 17 14:27:24 2008
@@ -1,0 +1,5 @@
+\.tar\.gz$
+\.svn
+_build
+Build
+blib
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=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/META.yml (original)
+++ branches/upstream/libxml-feed-perl/current/META.yml Fri Oct 17 14:27:24 2008
@@ -1,26 +1,42 @@
+---
+name: XML-Feed
+version: 0.21
+author: []
abstract: XML Syndication Feed Support
-author: Six Apart <cpan at sixapart.com>
-build_requires:
- HTML::TokeParser: 0
- LWP: 0
- Test::More: 0
-distribution_type: module
-generated_by: Module::Install version 0.61
license: perl
-name: XML-Feed
-no_index:
- directory:
- - t
- - inc
- - t
+resources:
+ license: http://dev.perl.org/licenses/
requires:
Class::ErrorHandler: 0
DateTime: 0
DateTime::Format::Mail: 0
DateTime::Format::W3CDTF: 0
Feed::Find: 0
+ HTML::TokeParser: 0
+ LWP::UserAgent: 0
List::Util: 0
+ Test::More: 0
URI::Fetch: 0
- XML::Atom: 0.08
+ XML::Atom: 0.23
+ XML::LibXML: 1.66
XML::RSS: 1.01
-version: 0.12
+provides:
+ XML::Feed:
+ file: lib/XML/Feed.pm
+ version: 0.21
+ XML::Feed::Atom:
+ file: lib/XML/Feed/Atom.pm
+ XML::Feed::Content:
+ file: lib/XML/Feed/Content.pm
+ XML::Feed::Entry:
+ file: lib/XML/Feed/Entry.pm
+ XML::Feed::Entry::Atom:
+ file: lib/XML/Feed/Atom.pm
+ XML::Feed::Entry::RSS:
+ file: lib/XML/Feed/RSS.pm
+ XML::Feed::RSS:
+ file: lib/XML/Feed/RSS.pm
+generated_by: Module::Build version 0.2808
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
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=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/Makefile.PL (original)
+++ branches/upstream/libxml-feed-perl/current/Makefile.PL Fri Oct 17 14:27:24 2008
@@ -1,31 +1,26 @@
-# $Id: Makefile.PL 1955 2006-08-02 05:59:58Z btrott $
-
-use inc::Module::Install;
-
-name('XML-Feed');
-abstract('XML Syndication Feed Support');
-author('Six Apart <cpan at sixapart.com>');
-version_from('lib/XML/Feed.pm');
-license('perl');
-no_index(directory => 't');
-sign(1);
-
-include('ExtUtils::AutoInstall');
-
-requires('Class::ErrorHandler');
-requires('Feed::Find');
-requires('URI::Fetch');
-requires('XML::RSS' => 1.01);
-requires('XML::Atom' => 0.08);
-requires('DateTime');
-requires('DateTime::Format::Mail');
-requires('DateTime::Format::W3CDTF');
-requires('List::Util');
-build_requires('LWP');
-build_requires('HTML::TokeParser');
-build_requires('Test::More');
-
-auto_include();
-auto_install();
-
-&WriteAll;
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+ 'NAME' => 'XML::Feed',
+ 'VERSION_FROM' => 'lib/XML/Feed.pm',
+ 'PREREQ_PM' => {
+ 'Class::ErrorHandler' => '0',
+ 'DateTime' => '0',
+ 'DateTime::Format::Mail' => '0',
+ 'DateTime::Format::W3CDTF' => '0',
+ 'Feed::Find' => '0',
+ 'HTML::TokeParser' => '0',
+ 'LWP::UserAgent' => '0',
+ 'List::Util' => '0',
+ 'Test::More' => '0',
+ 'URI::Fetch' => '0',
+ 'XML::Atom' => '0.23',
+ 'XML::LibXML' => '1.66',
+ 'XML::RSS' => '1.01'
+ },
+ 'INSTALLDIRS' => 'site',
+ 'EXE_FILES' => [],
+ 'PL_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=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/lib/XML/Feed.pm (original)
+++ branches/upstream/libxml-feed-perl/current/lib/XML/Feed.pm Fri Oct 17 14:27:24 2008
@@ -8,17 +8,16 @@
use URI::Fetch;
use Carp;
-our $VERSION = '0.12';
+our $VERSION = '0.21';
sub new {
my $class = shift;
- my($format) = @_;
- $format ||= 'Atom';
+ my $format = shift || 'Atom';
my $format_class = 'XML::Feed::' . $format;
eval "use $format_class";
Carp::croak("Unsupported format $format: $@") if $@;
my $feed = bless {}, join('::', __PACKAGE__, $format);
- $feed->init_empty or return $class->error($feed->errstr);
+ $feed->init_empty(@_) or return $class->error($feed->errstr);
$feed;
}
@@ -26,7 +25,7 @@
sub parse {
my $class = shift;
- my($stream) = @_;
+ my($stream, $specified_format) = @_;
return $class->error("Stream parameter is required") unless $stream;
my $feed = bless {}, $class;
my $xml = '';
@@ -52,8 +51,13 @@
}
return $class->error("Can't get feed XML content from $stream")
unless $xml;
- my $format = $feed->identify_format(\$xml)
- or return $class->error($feed->errstr);
+ my $format;
+ if ($specified_format) {
+ $format = $specified_format;
+ } else {
+ $format = $feed->identify_format(\$xml) or return $class->error($feed->errstr);
+ }
+
my $format_class = join '::', __PACKAGE__, $format;
eval "use $format_class";
return $class->error("Unsupported format $format: $@") if $@;
@@ -190,6 +194,8 @@
=head2 XML::Feed->parse($stream)
+=head2 XML::Feed->parse($stream, $format)
+
Parses a syndication feed identified by I<$stream>. I<$stream> can be any
one of the following:
@@ -212,6 +218,8 @@
A URI from which the feed XML will be retrieved.
=back
+
+C<$format> allows you to override format guessing.
=head2 XML::Feed->find_feeds($uri)
@@ -310,7 +318,13 @@
=head1 AUTHOR & COPYRIGHT
-Except where otherwise noted, I<XML::Feed> is Copyright 2004-2005
+Except where otherwise noted, I<XML::Feed> is Copyright 2004-2008
Six Apart, cpan at sixapart.com. All rights reserved.
+=head1 SUBVERSION
+
+The latest version of I<XML::Feed> can be found at
+
+ http://code.sixapart.com/svn/XML-Feed/trunk/
+
=cut
Modified: branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Atom.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Atom.pm?rev=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Atom.pm (original)
+++ branches/upstream/libxml-feed-perl/current/lib/XML/Feed/Atom.pm Fri Oct 17 14:27:24 2008
@@ -10,8 +10,10 @@
use DateTime::Format::W3CDTF;
sub init_empty {
- my $feed = shift;
- $feed->{atom} = XML::Atom::Feed->new(Version => 1.0);
+ my ($feed, %args) = @_;
+ $args{'Version'} ||= '1.0';
+
+ $feed->{atom} = XML::Atom::Feed->new(%args);
$feed;
}
@@ -42,6 +44,9 @@
sub copyright { shift->{atom}->copyright(@_) }
sub language { shift->{atom}->language(@_) }
sub generator { shift->{atom}->generator(@_) }
+sub id { shift->{atom}->id(@_) }
+sub updated { shift->{atom}->updated(@_) }
+sub add_link { shift->{atom}->add_link(@_) }
sub author {
my $feed = shift;
@@ -59,7 +64,9 @@
if (@_) {
$feed->{atom}->modified(DateTime::Format::W3CDTF->format_datetime($_[0]));
} else {
- $feed->{atom}->modified ? iso2dt($feed->{atom}->modified) : undef;
+ return iso2dt($feed->{atom}->modified) if $feed->{atom}->modified;
+ return iso2dt($feed->{atom}->updated) if $feed->{atom}->updated;
+ return undef;
}
}
@@ -96,6 +103,9 @@
}
sub title { shift->{entry}->title(@_) }
+sub source { shift->{entry}->source(@_) }
+sub updated { shift->{entry}->updated(@_) }
+
sub link {
my $entry = shift;
if (@_) {
@@ -110,20 +120,46 @@
sub summary {
my $entry = shift;
if (@_) {
- $entry->{entry}->summary(ref($_[0]) eq 'XML::Feed::Content' ?
- $_[0]->body : $_[0]);
- } else {
- XML::Feed::Content->wrap({ type => 'html',
- body => $entry->{entry}->summary });
- }
-}
+ my %param;
+ if (ref($_[0]) eq 'XML::Feed::Content') {
+ %param = (Body => $_[0]->body);
+ } else {
+ %param = (Body => $_[0]);
+ }
+ $entry->{entry}->summary(XML::Atom::Content->new(%param, Version => 1.0));
+ } else {
+ my $s = $entry->{entry}->summary;
+ # map Atom types to MIME types
+ my $type = ($s && ref($s) eq 'XML::Feed::Content') ? $s->type : undef;
+ if ($type) {
+ $type = 'text/html' if $type eq 'xhtml' || $type eq 'html';
+ $type = 'text/plain' if $type eq 'text';
+ }
+ my $body = $s;
+ if (defined $s && ref($s) eq 'XML::Feed::Content') {
+ $body = $s->body;
+ }
+ XML::Feed::Content->wrap({ type => $type,
+ body => $body });
+ }
+}
+
+my %types = (
+ 'text/xhtml' => 'xhtml',
+ 'text/html' => 'html',
+ 'text/plain' => 'text',
+);
sub content {
my $entry = shift;
if (@_) {
my %param;
if (ref($_[0]) eq 'XML::Feed::Content') {
- %param = (Body => $_[0]->body);
+ if (defined $_[0]->type && defined $types{$_[0]->type}) {
+ %param = (Body => $_[0]->body, Type => $types{$_[0]->type});
+ } else {
+ %param = (Body => $_[0]->body);
+ }
} else {
%param = (Body => $_[0]);
}
@@ -150,7 +186,8 @@
$entry->{entry}->add_category({ term => $_[0] });
} else {
my $category = $entry->{entry}->category;
- $category ? ($category->label || $category->term) : $entry->{entry}->get($ns, 'subject');
+ my @return = $category ? ($category->label || $category->term) : $entry->{entry}->getlist($ns, 'subject');
+ return wantarray? @return : $return[0];
}
}
@@ -181,7 +218,9 @@
if (@_) {
$entry->{entry}->modified(DateTime::Format::W3CDTF->format_datetime($_[0])) if $_[0];
} else {
- $entry->{entry}->modified ? iso2dt($entry->{entry}->modified) : undef;
+ return iso2dt($entry->{entry}->modified) if $entry->{entry}->modified;
+ return iso2dt($entry->{entry}->updated) if $entry->{entry}->updated;
+ return undef;
}
}
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=26088&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 Oct 17 14:27:24 2008
@@ -3,6 +3,8 @@
package XML::Feed::Entry;
use strict;
use base qw( Class::ErrorHandler );
+
+use Scalar::Util qw( blessed );
use Carp;
@@ -35,6 +37,7 @@
for my $field (qw( title link content summary category author id issued modified )) {
my $val = $entry->$field();
next unless defined $val;
+ next if blessed $val && $val->isa('XML::Feed::Content') && ! defined $val->body;
$new->$field($val);
}
$new;
Modified: branches/upstream/libxml-feed-perl/current/lib/XML/Feed/RSS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/lib/XML/Feed/RSS.pm?rev=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/lib/XML/Feed/RSS.pm (original)
+++ branches/upstream/libxml-feed-perl/current/lib/XML/Feed/RSS.pm Fri Oct 17 14:27:24 2008
@@ -10,9 +10,10 @@
our $PREFERRED_PARSER = "XML::RSS";
sub init_empty {
- my $feed = shift;
+ my ($feed, %args) = @_;
+ $args{'version'} ||= '2.0';
eval "use $PREFERRED_PARSER"; die $@ if $@;
- $feed->{rss} = $PREFERRED_PARSER->new( version => '2.0' );
+ $feed->{rss} = $PREFERRED_PARSER->new(%args);
$feed->{rss}->add_module(prefix => "content", uri => 'http://purl.org/rss/1.0/modules/content/');
$feed->{rss}->add_module(prefix => "dcterms", uri => 'http://purl.org/rss/1.0/modules/dcterms/');
$feed;
Modified: branches/upstream/libxml-feed-perl/current/t/01-parse.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/t/01-parse.t?rev=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/t/01-parse.t (original)
+++ branches/upstream/libxml-feed-perl/current/t/01-parse.t Fri Oct 17 14:27:24 2008
@@ -1,7 +1,7 @@
# $Id: 01-parse.t 1921 2006-02-28 02:50:52Z btrott $
use strict;
-use Test::More tests => 72;
+use Test::More tests => 75;
use XML::Feed;
use URI;
@@ -58,6 +58,7 @@
is($dt->iso8601, '2004-05-30T07:39:25');
like($entry->content->body, qr/<p>Hello!<\/p>/);
is($entry->summary->body, 'Hello!...');
+ is(($entry->category)[0], 'Travel');
is($entry->category, 'Travel');
is($entry->author, 'Melody');
ok($entry->id);
Modified: branches/upstream/libxml-feed-perl/current/t/06-atom10.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/t/06-atom10.t?rev=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/t/06-atom10.t (original)
+++ branches/upstream/libxml-feed-perl/current/t/06-atom10.t Fri Oct 17 14:27:24 2008
@@ -10,8 +10,8 @@
my $e = ($feed->entries)[0];
ok $e->link, 'entry link without rel';
-is $e->category, "Catalyst", "atom:category support";
-is $e->modified, "2006-08-09T19:07:58", "atom:updated";
+is "".$e->category, "Catalyst", "atom:category support";
+is "".$e->modified, "2006-08-09T19:07:58", "atom:updated";
is $e->content->type, 'text/html';
like $e->content->body, qr/^<div class="pod">/;
Modified: branches/upstream/libxml-feed-perl/current/t/07-atom10-create.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/t/07-atom10-create.t?rev=26088&op=diff
==============================================================================
--- branches/upstream/libxml-feed-perl/current/t/07-atom10-create.t (original)
+++ branches/upstream/libxml-feed-perl/current/t/07-atom10-create.t Fri Oct 17 14:27:24 2008
@@ -1,20 +1,27 @@
use strict;
use Test::More;
-plan 'no_plan';
+plan tests => 17;
use XML::Feed;
+use DateTime;
+
+my $now = DateTime->now();
my $feed = XML::Feed->new('Atom');
$feed->title("foo");
$feed->description("Atom 1.0 feed");
$feed->link("http://example.org/");
+$feed->id("tag:cpan.org;xml-feed-atom");
+$feed->updated($now);
my $entry = XML::Feed::Entry->new('Atom');
$entry->title("1st Entry");
$entry->link("http://example.org/");
$entry->category("blah");
$entry->content("<p>Hello world.</p>");
+$entry->id("tag:cpan.org;xml-feed-atom-entry");
+$entry->updated($now);
$feed->add_entry($entry);
@@ -29,6 +36,8 @@
is $feed->title, "foo";
is $feed->description, "Atom 1.0 feed";
is $feed->link, "http://example.org/";
+is $feed->id, "tag:cpan.org;xml-feed-atom";
+is "".$feed->updated, "".$now;
my @entries = $feed->entries;
is @entries, 1;
@@ -40,5 +49,7 @@
is $entry->content->type, 'text/html';
like $entry->content->body, qr!\s*<p>Hello world.</p>\s*!s;
+is $entry->id, "tag:cpan.org;xml-feed-atom-entry";
+is "".$entry->updated, "".$now;
Added: branches/upstream/libxml-feed-perl/current/t/08-convert-summary-bug.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-feed-perl/current/t/08-convert-summary-bug.t?rev=26088&op=file
==============================================================================
--- branches/upstream/libxml-feed-perl/current/t/08-convert-summary-bug.t (added)
+++ branches/upstream/libxml-feed-perl/current/t/08-convert-summary-bug.t Fri Oct 17 14:27:24 2008
@@ -1,0 +1,23 @@
+# $Id$
+
+use strict;
+use Test::More tests => 1;
+use XML::Feed;
+use XML::Feed::Entry;
+
+my $feed = XML::Feed->new();
+$feed->title('My Feed');
+$feed->link('http://www.example.com/');
+$feed->description('Wow!');
+
+my $entry = XML::Feed::Entry->new();
+$entry->title('Foo Bar');
+$entry->link('http://www.example.com/foo/bar.html');
+$entry->content('This is the content, but there is no summary.');
+$entry->author('Foo Baz');
+
+$feed->add_entry($entry);
+
+
+unlike($feed->convert('Atom')->as_xml(), qr{<summary>},
+ 'no summary tag after converting to Atom');
More information about the Pkg-perl-cvs-commits
mailing list