Bug 17935: Adjust some POD lines, fix a few typos
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 18 Jan 2017 15:56:16 +0000 (16:56 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 14 Feb 2017 14:12:50 +0000 (14:12 +0000)
This patch does the following:

[1] Move some POD lines from Cache to Caches.
[2] Correct C4::Plugins to Koha::Plugins in POD line of Koha::Plugins
[3] POD Koha/AuthorisedValue.pm: lib_opac moved to opac_description
[4] The POD in Koha/Patron.pm uses head2 and head3 inconsistently.
    Ran s/^=head2/=head3/ on those lines (7 substitutions on 7 lines)
[5] Correct a copied POD line from reports/issues_stats.pl in
    reports/reserve_stats.pl.
[6] Correct a test description in t/db_dependent/Koha/Authorities.t.
    You should never delete the library :)
[7] Correct typo shouild in a comment of rebuild_zebra.pl

Test plan:
[1] Read the patch. Does it make sense?
[2] Run perldoc Koha/Cache.pm and Koha/Caches.pm
[3] Run t/db_dependent/Koha/Authorities.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Koha/AuthorisedValue.pm
Koha/Cache.pm
Koha/Caches.pm
Koha/Patron.pm
Koha/Plugins.pm
misc/migration_tools/rebuild_zebra.pl
reports/reserves_stats.pl
t/db_dependent/Koha/Authorities.t

index 910b3da..898b630 100644 (file)
@@ -131,11 +131,9 @@ sub replace_branch_limitations {
     return \@return_values;
 }
 
-=head3 lib_opac
+=head3 opac_description
 
-my $description = $av->lib_opac();
-
-$av->lib_opac( $description );
+my $description = $av->opac_description();
 
 =cut
 
@@ -145,7 +143,7 @@ sub opac_description {
     return $self->lib_opac() || $self->lib();
 }
 
-=head3 Koha::Objects->_avb_resultset
+=head3 _avb_resultset
 
 Returns the internal resultset or creates it if undefined
 
index 80ff1ca..5af8c0e 100644 (file)
@@ -27,6 +27,8 @@ Koha::Cache - Handling caching of html and Objects for Koha
   use Koha::Cache;
   my $cache = Koha::Cache->new({cache_type => $cache_type, %params});
 
+  # see also Koha::Caches->get_instance;
+
 =head1 DESCRIPTION
 
 Koha caching routines. This class provides two interfaces for cache access.
@@ -35,6 +37,7 @@ The first, traditional OO interface provides the following functions:
 =head1 FUNCTIONS
 
 =cut
+
 use strict;
 use warnings;
 use Carp;
@@ -54,16 +57,6 @@ our %L1_cache;
 our $L1_encoder = Sereal::Encoder->new;
 our $L1_decoder = Sereal::Decoder->new;
 
-=head2 get_instance
-
-    my $cache = Koha::Caches->get_instance();
-
-This gets a shared instance of the cache, set up in a very default way. This is
-the recommended way to fetch a cache object. If possible, it'll be
-persistent across multiple instances.
-
-=cut
-
 =head2 new
 
 Create a new Koha::Cache object. This is required for all cache-related functionality.
index 52f1812..8940925 100644 (file)
@@ -15,11 +15,36 @@ package Koha::Caches;
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
+=head1 NAME
+
+Koha::Caches - Cache handling
+
+=head1 SYNOPSIS
+
+my $cache = Koha::Caches->get_instance();
+
+=head1 DESCRIPTION
+
+Description
+
+=head1 CLASS METHODS
+
+=cut
+
 use Modern::Perl;
 
 use Koha::Cache;
 
 our $singleton_caches;
+
+=head2 get_instance
+
+This gets a shared instance of the cache, set up in a very default way. This is
+the recommended way to fetch a cache object. If possible, it'll be
+persistent across multiple instances.
+
+=cut
+
 sub get_instance {
     my ($class, $subnamespace) = @_;
     $subnamespace //= '';
@@ -28,6 +53,10 @@ sub get_instance {
     return $singleton_caches->{$subnamespace};
 }
 
+=head2 flush_L1_caches
+
+=cut
+
 sub flush_L1_caches {
     return unless $singleton_caches;
     for my $cache ( values %$singleton_caches ) {
index f04831d..5a1fe47 100644 (file)
@@ -264,7 +264,7 @@ sub do_check_for_previous_checkout {
     return $old_issues->count;  # 0 || N
 }
 
-=head2 is_debarred
+=head3 is_debarred
 
 my $debarment_expiration = $patron->is_debarred;
 
@@ -283,7 +283,7 @@ sub is_debarred {
     return;
 }
 
-=head2 is_expired
+=head3 is_expired
 
 my $is_expired = $patron->is_expired;
 
@@ -299,7 +299,7 @@ sub is_expired {
     return 0;
 }
 
-=head2 is_going_to_expire
+=head3 is_going_to_expire
 
 my $is_going_to_expire = $patron->is_going_to_expire;
 
@@ -319,7 +319,7 @@ sub is_going_to_expire {
     return 0;
 }
 
-=head2 update_password
+=head3 update_password
 
 my $updated = $patron->update_password( $userid, $password );
 
@@ -367,7 +367,7 @@ sub renew_account {
     return dt_from_string( $expiry_date )->truncate( to => 'day' );
 }
 
-=head2 has_overdues
+=head3 has_overdues
 
 my $has_overdues = $patron->has_overdues;
 
@@ -381,7 +381,7 @@ sub has_overdues {
     return $self->_result->issues->search({ date_due => { '<' => $dtf->format_datetime( dt_from_string() ) } })->count;
 }
 
-=head2 track_login
+=head3 track_login
 
     $patron->track_login;
     $patron->track_login({ force => 1 });
@@ -400,7 +400,7 @@ sub track_login {
     $self->lastseen( dt_from_string() )->store;
 }
 
-=head2 move_to_deleted
+=head3 move_to_deleted
 
 my $is_moved = $patron->move_to_deleted;
 
index 6095f51..45da6d0 100644 (file)
@@ -54,7 +54,7 @@ sub new {
 This will return a list of all available plugins, optionally limited by
 method or metadata value.
 
-    my @plugins = C4::Plugins::GetPlugins({
+    my @plugins = Koha::Plugins::GetPlugins({
         method => 'some_method',
         metadata => { some_key => 'some_value' },
     });
index 5d04545..3b2cb43 100755 (executable)
@@ -179,8 +179,8 @@ my $marcxml_close = q{
 };
 
 # Protect again simultaneous update of the zebra index by using a lock file.
-# Create our own lock directory if its missing.  This shouild be created
-# by koha-zebra-ctl.sh or at system installation.  If the desired directory
+# Create our own lock directory if it is missing. This should be created
+# by koha-zebra-ctl.sh or at system installation. If the desired directory
 # does not exist and cannot be created, we fall back on /tmp - which will
 # always work.
 
index 3db1d6b..aac93cc 100755 (executable)
@@ -41,7 +41,7 @@ use YAML;
 
 =head1 DESCRIPTION
 
-    Plugin that shows circulation stats
+    Plugin that shows reserve stats
 
 =cut
 
index 7210713..890929d 100644 (file)
@@ -49,7 +49,7 @@ is( Koha::Authority::Types->search->count, $nb_of_authority_types + 1, 'The auth
 is( Koha::Authorities->search->count,      $nb_of_authorities + 2,     'The 2 authorities should have been added' );
 
 $new_authority_1->delete;
-is( Koha::Authorities->search->count, $nb_of_authorities + 1, 'Delete should have deleted the library' );
+is( Koha::Authorities->search->count, $nb_of_authorities + 1, 'Delete should have deleted the authority' );
 
 $schema->storage->txn_rollback;
 1;