#!perl -w use strict; use Data::Microformat::hFeed; use DateTime; use Test::More tests => 9; my $simple = << 'EOF'; A feed title

A title

Brendan did something
Brendan waxed lyrical about cats & puppies.
EOF ok(my $feed = Data::Microformat::hFeed->parse($simple), "Parsed entry"); my $issued = DateTime->new( year => 2008, month => 11, day => 4, hour => 17, minute => 21, second => 6); my $modified = $issued->clone->add(seconds => 1); is($feed->title, "A feed title", "Got correct title"); ok(my ($entry) = $feed->entries, "Got entries"); is($entry->link, "http://example.com/989691066", "Got correct link"); is($entry->summary, "Brendan did something", "Got correct summary"); is($entry->content, "Brendan waxed lyrical about cats & puppies.", "Got correct content"); is("".$entry->issued, "".$issued, "Got correct issued"); is("".$entry->modified, "".$modified, "Got correct modified"); is_deeply([$entry->tags], [qw(microformats perl)], "Got correct tags");