From: Simon Wistow Date: Wed, 29 Oct 2008 17:55:22 +0000 (+0000) Subject: Add pod and coverage tests X-Git-Tag: v0.3~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FXML-Feed.git;a=commitdiff_plain;h=8c30ad3d71619bc69bf47f1b229bdbf865da74f8 Add pod and coverage tests --- diff --git a/lib/XML/Feed.pm b/lib/XML/Feed.pm index 6a0ce28..254ccc9 100644 --- a/lib/XML/Feed.pm +++ b/lib/XML/Feed.pm @@ -238,7 +238,7 @@ A URI from which the feed XML will be retrieved. =back -C<$format> allows you to override format guessing. +I<$format> allows you to override format guessing. =head2 XML::Feed->find_feeds($uri) @@ -247,6 +247,10 @@ from that page (using IlinkE> tags). Returns a list of feed URIs. +=head2 XML::Feed->identify_format($xml) + +Given the xml of a feed return what format it is in (C, or some version of C). + =head2 $feed->convert($format) Converts the I object into the I<$format> format, and returns @@ -316,6 +320,10 @@ A string. A list of the entries/items in the feed. Returns an array containing I objects. +=head2 $feed->items + +A synonym for I<$feed->entries>. + =head2 $feed->add_entry($entry) Adds an entry to the feed. I<$entry> should be an I diff --git a/lib/XML/Feed/Content.pm b/lib/XML/Feed/Content.pm index 2f6f284..7a1ea3b 100644 --- a/lib/XML/Feed/Content.pm +++ b/lib/XML/Feed/Content.pm @@ -45,6 +45,14 @@ B of data is useful. =head1 USAGE +=head2 wrap + +Take params and turn them into a I object. + +=head2 new + +A synonym for I. + =head2 $content->body The actual data. diff --git a/lib/XML/Feed/Entry.pm b/lib/XML/Feed/Entry.pm index 005a926..4f18399 100644 --- a/lib/XML/Feed/Entry.pm +++ b/lib/XML/Feed/Entry.pm @@ -147,6 +147,14 @@ A I object representing the last-modified date of the entry. If present, I<$modified> should be a I object. +=head2 $entry->wrap + +Take an entry in its native format and turn it into an I object. + +=head2 $entry->unwrap + +Take an I object and turn it into its native format. + =head1 AUTHOR & COPYRIGHT Please see the I manpage for author, copyright, and license diff --git a/t/pod-coverage.t b/t/pod-coverage.t new file mode 100644 index 0000000..d53f656 --- /dev/null +++ b/t/pod-coverage.t @@ -0,0 +1,11 @@ +#!perl + +use strict; +use warnings; +use Test::More; +eval 'use Test::Pod::Coverage 1.04'; +plan skip_all => 'Test::Pod::Coverage 1.04 required for testing POD coverage' if $@; +my @modules = grep { !/(RSS|Atom)/ }Test::Pod::Coverage::all_modules(); +plan tests => scalar(@modules); +pod_coverage_ok($_, { also_private => [ qr/^init_empty/ ], },) for @modules; + diff --git a/t/pod.t b/t/pod.t new file mode 100644 index 0000000..a422f97 --- /dev/null +++ b/t/pod.t @@ -0,0 +1,9 @@ +#!perl + +use strict; +use warnings; + +use Test::More; +eval 'use Test::Pod 1.14'; +plan skip_all => 'Test::Pod 1.14 required for testing POD' if $@; +all_pod_files_ok( grep { /^Boomerang/ } all_pod_files() );