use strict; use Test::More; 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("
Hello world.
"); $entry->id("tag:cpan.org;xml-feed-atom-entry"); $entry->updated($now); $feed->add_entry($entry); my $xml = $feed->as_xml; like $xml, qr!Hello world.
\s*!s; is $entry->id, "tag:cpan.org;xml-feed-atom-entry"; is "".$entry->updated, "".$now;