10 my $feed = XML::Feed->parse('t/samples/base_rss.xml');
12 my ($entry) = $feed->entries;
13 my $content = $entry->content;
14 is($feed->base, "http://example.org/", "Got feed base");
15 is($entry->base, "http://example.org/archives/", "Got entry base");
16 is($content->base, "http://example.org/archives/000001.html", "Got content base");
18 my $xml = $feed->as_xml;
20 ok($new = XML::Feed->parse(\$xml), "Parsed old feed");
21 my ($new_entry) = $new->entries;
22 my $new_content = $entry->content;
23 is($new->base, "http://example.org/", "Got feed base");
24 is($new_entry->base, "http://example.org/archives/", "Got entry base");
25 is($new_content->base, "http://example.org/archives/000001.html", "Got content base");
28 ok($feed->base("http://foo.com/"), "Set feed base");
29 ok($entry->base("http://foo.com/archives/"), "Set entry base");
30 ok($content->base("http://foo.com/archives/000001.html"), "Set content base");
32 is($feed->base, "http://foo.com/", "Got feed base");
33 is($entry->base, "http://foo.com/archives/", "Got entry base");
34 is($content->base, "http://foo.com/archives/000001.html", "Got content base");