8 if ($XML::RSS::VERSION <= 1.36) {
9 plan skip_all => "Version of XML::RSS is too old to do xml:base";
14 my $feed = XML::Feed->parse('t/samples/base_rss.xml');
16 my ($entry) = $feed->entries;
17 my $content = $entry->content;
18 is($feed->base, "http://example.org/", "Got feed base");
19 is($entry->base, "http://example.org/archives/", "Got entry base");
20 is($content->base, "http://example.org/archives/000001.html", "Got content base");
22 my $xml = $feed->as_xml;
24 ok($new = XML::Feed->parse(\$xml), "Parsed old feed");
25 my ($new_entry) = $new->entries;
26 my $new_content = $entry->content;
27 is($new->base, "http://example.org/", "Got feed base");
28 is($new_entry->base, "http://example.org/archives/", "Got entry base");
29 is($new_content->base, "http://example.org/archives/000001.html", "Got content base");
32 ok($feed->base("http://foo.com/"), "Set feed base");
33 ok($entry->base("http://foo.com/archives/"), "Set entry base");
34 ok($content->base("http://foo.com/archives/000001.html"), "Set content base");
36 is($feed->base, "http://foo.com/", "Got feed base");
37 is($entry->base, "http://foo.com/archives/", "Got entry base");
38 is($content->base, "http://foo.com/archives/000001.html", "Got content base");