Author: dom Date: 2009-02-26 00:00:10 +0000 (Thu, 26 Feb 2009) New Revision: 1261
Added: trunk/t/02_pod.t Modified: trunk/Build.PL trunk/Changes trunk/MANIFEST trunk/lib/OpenGuides.pm trunk/lib/OpenGuides/Feed.pm trunk/lib/OpenGuides/JSON.pm trunk/lib/OpenGuides/RDF.pm trunk/lib/OpenGuides/Template.pm trunk/lib/OpenGuides/Test.pm Log: Fix some more broken POD and add POD unit test (fixes #268)
Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/Build.PL 2009-02-26 00:00:10 UTC (rev 1261) @@ -329,7 +329,7 @@ 'Test::HTML::Content' => 0, # for testing, oddly enough 'Wiki::Toolkit::Plugin::Ping' => 0, # for pinging external services 'Geo::HelmertTransform' => 0, # for correct WGS84 lat/long - # when using grid systems + 'Test::Pod' => 0,
}, dynamic_config => 1,
Modified: trunk/Changes =================================================================== --- trunk/Changes 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/Changes 2009-02-26 00:00:10 UTC (rev 1261) @@ -3,6 +3,9 @@ More detailed changelogs can be found at http://dev.openguides.org/log/trunk.
+0.65 + Fix some more broken POD and add POD unit test (#268) + 0.64 23 February 2009 Correctly specify all build_requires (#245) Fix some broken POD (#246)
Modified: trunk/MANIFEST =================================================================== --- trunk/MANIFEST 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/MANIFEST 2009-02-26 00:00:10 UTC (rev 1261) @@ -78,6 +78,7 @@ templates/userstats.tt templates/wanted_pages.tt t/01_load.t +t/02_pod.t t/11_utils.t t/12_macros.t t/13_cookies.t
Modified: trunk/lib/OpenGuides/Feed.pm =================================================================== --- trunk/lib/OpenGuides/Feed.pm 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/lib/OpenGuides/Feed.pm 2009-02-26 00:00:10 UTC (rev 1261) @@ -63,13 +63,17 @@ $self; }
+=over 4 + =item B<set_feed_name_and_url_params> Overrides the default feed name and default feed http equivalent url. Useful on custom feeds, where the defaults are incorrect.
$feed->set_feed_name_and_url("Search Results", "search=pub"); $feed->build_mini_feed_for_nodes("rss", @search_results); + =cut + sub set_feed_name_and_url_params { my ($self, $name, $url) = @_;
@@ -85,6 +89,7 @@ }
=item B<make_feed> + Produce one of the standard feeds, in the requested format.
@@ -94,7 +99,9 @@ );
Passes additional arguments through to the underlying Wiki::Toolkit::Feed + =cut + sub make_feed { my ($self, %args) = @_;
@@ -133,18 +140,23 @@ }
=item B<build_feed_for_nodes> + For the given feed type, build a feed from the supplied list of nodes. Will figure out the feed timestamp from the newest node, and output a last modified header based on this.
my @nodes = $wiki->fetch_me_nodes_I_like(); my $feed_contents = $feed->build_feed_for_nodes("rss", @nodes); + =cut + sub build_feed_for_nodes { my ($self, $format, @nodes) = @_; return $self->render_feed_for_nodes($format, undef, 1, @nodes); } + =item B<build_mini_feed_for_nodes> + For the given feed type, build a mini feed (name and distance) from the supplied list of nodes. Will figure out the feed timestamp from the newest node, and output a @@ -152,16 +164,21 @@
my @nodes = $wiki->search_near_here(); my $feed_contents = $feed->build_mini_feed_for_nodes("rss", @nodes); + =cut + sub build_mini_feed_for_nodes { my ($self, $format, @nodes) = @_; return $self->render_feed_for_nodes($format, undef, 0, @nodes); }
=item B<render_feed_for_nodes> + Normally internal method to perform the appropriate building of a feed - based on a list of nodes. +based on a list of nodes. + =cut + sub render_feed_for_nodes { my ($self, $format, $html_url, $is_full, @nodes) = @_;
@@ -194,10 +211,13 @@ }
=item B<default_content_type> + For the given feed type, return the default content type for that feed.
my $content_type = $feed->default_content_type("rss"); + =cut + sub default_content_type { my ($self,$feed_type) = @_;
@@ -217,6 +237,7 @@ }
=item B<fetch_maker> + For the given feed type, identify and return the maker routine for feeds of that type.
@@ -224,7 +245,9 @@ my $feed_contents = maker->node_all_versions(%options);
Will always return something of type Wiki::Toolkit::Feed::Listing + =cut + sub fetch_maker { my ($self,$feed_type) = @_;
@@ -291,6 +314,8 @@ $self->rss_maker->rss_timestamp(%args); }
+=back + =head1 NAME
OpenGuides::Feed - generate data feeds for OpenGuides in various formats. @@ -407,7 +432,7 @@
=head1 COPYRIGHT
-Copyright (C) 2003-2007 The OpenGuides Project. All Rights Reserved. +Copyright (C) 2003-2009 The OpenGuides Project. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides/JSON.pm =================================================================== --- trunk/lib/OpenGuides/JSON.pm 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/lib/OpenGuides/JSON.pm 2009-02-26 00:00:10 UTC (rev 1261) @@ -60,9 +60,14 @@ $self; }
+=over 4 + =item B<emit_json> + Renders the given node as JSON + =cut + sub emit_json { my ( $self, %args ) = @_;
@@ -107,8 +112,11 @@ }
=item B<output_as_json> + Renders the given arbitary data as JSON + =cut + sub output_as_json { my ( $self, %args ) = @_; return $self->json_maker->make_json(%args); @@ -148,6 +156,8 @@ $self->json_maker->rss_timestamp(%args); }
+=back + =head1 NAME
OpenGuides::JSON - An OpenGuides plugin to output JSON. @@ -284,7 +294,7 @@
=head1 COPYRIGHT
-Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. +Copyright (C) 2003-2009 The OpenGuides Project. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides/RDF.pm =================================================================== --- trunk/lib/OpenGuides/RDF.pm 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/lib/OpenGuides/RDF.pm 2009-02-26 00:00:10 UTC (rev 1261) @@ -267,6 +267,8 @@
=back
+=back + =head1 SEE ALSO
=over 4 @@ -285,7 +287,7 @@
=head1 COPYRIGHT
-Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. +Copyright (C) 2003-2009 The OpenGuides Project. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides/Template.pm =================================================================== --- trunk/lib/OpenGuides/Template.pm 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/lib/OpenGuides/Template.pm 2009-02-26 00:00:10 UTC (rev 1261) @@ -100,10 +100,10 @@
=back
+If C<node> is supplied: + =over
-If C<node> is supplied: - =item * C<node_name>
=item * C<node_param> (the node name escaped for use in URLs) @@ -597,7 +597,7 @@
=head1 COPYRIGHT
- Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2003-2009 The OpenGuides Project. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides/Test.pm =================================================================== --- trunk/lib/OpenGuides/Test.pm 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/lib/OpenGuides/Test.pm 2009-02-26 00:00:10 UTC (rev 1261) @@ -161,8 +161,6 @@ } }
-=over 4 - =item B<make_cgi_object>
my $q = OpenGuides::Test->make_cgi_object; @@ -211,7 +209,7 @@
=head1 COPYRIGHT
- Copyright (C) 2004-2008 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2004-2009 The OpenGuides Project. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2009-02-25 18:11:39 UTC (rev 1260) +++ trunk/lib/OpenGuides.pm 2009-02-26 00:00:10 UTC (rev 1261) @@ -2291,6 +2291,7 @@ return $cookie_data{$pref_name}; }
+=back
=head1 BUGS AND CAVEATS
@@ -2325,7 +2326,7 @@
=head1 COPYRIGHT
- Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2003-2009 The OpenGuides Project. All Rights Reserved.
The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Added: trunk/t/02_pod.t =================================================================== --- trunk/t/02_pod.t (rev 0) +++ trunk/t/02_pod.t 2009-02-26 00:00:10 UTC (rev 1261) @@ -0,0 +1,6 @@ +use strict; +use Test::More; +eval "use Test::Pod 1.00"; +plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; +my @poddirs = qw( blib blib/script ); +all_pod_files_ok( all_pod_files( @poddirs ) );
openguides-commits@lists.openguides.org