From c4fba0c28826d0f6b3e1e31ad9c5d8f4ead1041f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 25 Sep 2011 22:51:56 -0400 Subject: [PATCH] fix up POD - avoids some noise when building the Perl modules for distributions that check for correctness when converting POD to man pages - add a an author test, taken straight from the Test::Pod documentation, for POD correctness Signed-off-by: Galen Charlton Signed-off-by: Dan Scott --- .../perlmods/lib/OpenILS/Application/Acq/Picklist.pm | 4 +++- .../lib/OpenILS/Application/Storage/Publisher.pm | 4 ++-- .../OpenILS/Application/Storage/Publisher/biblio.pm | 2 +- .../src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm | 4 +++- Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm | 4 +++- Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm | 3 ++- Open-ILS/src/perlmods/xt/author/pod.t | 10 ++++++++++ 7 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 Open-ILS/src/perlmods/xt/author/pod.t diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Picklist.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Picklist.pm index eee578f9d9..eacdaaa2a7 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Picklist.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Picklist.pm @@ -381,8 +381,10 @@ sub retrieve_pl_lineitem { return undef; } -=head comment +=head1 comment + request open-ils.cstore open-ils.cstore.json_query.atomic {"select":{"jub":[{"transform":"count", "attregate":1, "column":"id","alias":"count"}]}, "from":"jub","where":{"picklist":1}} + =cut diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher.pm index fb685d69b2..658fa2231a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher.pm @@ -463,7 +463,7 @@ for my $fmclass ( (Fieldmapper->classes) ) { ); } -=comment +=head1 comment unless ( __PACKAGE__->is_registered( $api_prefix.'.search_like' ) ) { __PACKAGE__->register_method( @@ -570,7 +570,7 @@ for my $fmclass ( (Fieldmapper->classes) ) { ); } -=comment +=head1 comment unless ( __PACKAGE__->is_registered( $api_prefix.'.search_like.'.$field ) ) { __PACKAGE__->register_method( diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/biblio.pm index b6dd586ed7..65a777a31d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/biblio.pm @@ -241,7 +241,7 @@ __PACKAGE__->register_method( ); -=comment Old version +=head1 comment Old version my $org_unit_lookup; sub record_copy_count { diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm index 03237caf3a..48c6e39f17 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm @@ -129,7 +129,8 @@ sub checkauth { return $self->{requestor} = $content->{userobj}; } -=head test +=head1 test + sub checkauth { my $self = shift; $cache = OpenSRF::Utils::Cache->new('global') unless $cache; @@ -139,6 +140,7 @@ sub checkauth { $self->event(OpenILS::Event->new('NO_SESSION')); return undef; } + =cut diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm index 287890c99c..1ab2c86a48 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm @@ -162,7 +162,8 @@ sub get_field_value { return @string; } -=head +=head1 old implementation + sub _modsdoc_to_values { my( $self, $mods ) = @_; my $data = {}; @@ -179,6 +180,7 @@ sub _modsdoc_to_values { } return $data; } + =cut sub modsdoc_to_values { diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm index 99667d09bd..560ccc686e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm @@ -100,7 +100,8 @@ sub handler { $url .= "/eg/opac/home"; $url .= "?orig_loc=$orig_loc" if $orig_loc; -=head potential locale/skin implementation +=head1 potential locale/skin implementation + if($locale ne 'en-US') { $apache->headers_out->add( "Set-Cookie" => $cgi->cookie( diff --git a/Open-ILS/src/perlmods/xt/author/pod.t b/Open-ILS/src/perlmods/xt/author/pod.t new file mode 100644 index 0000000000..da5da6f108 --- /dev/null +++ b/Open-ILS/src/perlmods/xt/author/pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More; +eval "use Test::Pod 1.00"; +plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; + +all_pod_files_ok(); -- 2.43.2