Add pod and coverage tests
Simon Wistow [Wed, 29 Oct 2008 17:55:22 +0000 (17:55 +0000)]
lib/XML/Feed.pm
lib/XML/Feed/Content.pm
lib/XML/Feed/Entry.pm
t/pod-coverage.t [new file with mode: 0644]
t/pod.t [new file with mode: 0644]

index 6a0ce28..254ccc9 100644 (file)
@@ -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 I<E<lt>linkE<gt>> 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<Atom>, or some version of C<RSS>).
+
 =head2 $feed->convert($format)
 
 Converts the I<XML::Feed> 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<XML::Feed::Entry> 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<XML::Feed::Entry>
index 2f6f284..7a1ea3b 100644 (file)
@@ -45,6 +45,14 @@ B<type> of data is useful.
 
 =head1 USAGE
 
+=head2 wrap
+
+Take params and turn them into a I<XML::Feed::Content> object.
+
+=head2 new
+
+A synonym for I<wrap>.
+
 =head2 $content->body
 
 The actual data.
index 005a926..4f18399 100644 (file)
@@ -147,6 +147,14 @@ A I<DateTime> object representing the last-modified date of the entry.
 
 If present, I<$modified> should be a I<DateTime> object.
 
+=head2 $entry->wrap
+
+Take an entry in its native format and turn it into an I<XML::Feed::Entry> object.
+
+=head2 $entry->unwrap
+
+Take an I<XML::Feed::Entry> object and turn it into its native format.
+
 =head1 AUTHOR & COPYRIGHT
 
 Please see the I<XML::Feed> manpage for author, copyright, and license
diff --git a/t/pod-coverage.t b/t/pod-coverage.t
new file mode 100644 (file)
index 0000000..d53f656
--- /dev/null
@@ -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 (file)
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() );