[open-ils-commits] [GIT] Evergreen ILS branch master updated. 174c7db5bb5be07b19d564412fc5651405ba5b1c

Evergreen Git git at git.evergreen-ils.org
Fri Jun 21 09:09:00 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  174c7db5bb5be07b19d564412fc5651405ba5b1c (commit)
      from  adba9bf5b841e3b38cb78002db94b341fa9ce78b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 174c7db5bb5be07b19d564412fc5651405ba5b1c
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Jun 20 23:39:21 2013 -0400

    return, not next, from eval BLOCK
    
    Per perldoc eval, exiting an eval BLOCK is not allowed. And it generates
    warnings - 37,000 of them in one day - on a system on which the fine
    generator runs every 15 minutes. Simply returning from the block
    achieves the same goal without generating scads of warnings.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
index 7acb5fb..240e2ab 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
@@ -1086,7 +1086,7 @@ sub generate_fines {
             if ( $fine_interval == 0 || int($c->$recurring_fine_method * 100) == 0 || int($c->max_fine * 100) == 0 ) {
                 $client->respond( "Fine Generator skipping circ due to 0 fine interval, 0 fine rate, or 0 max fine.\n" );
                 $log->info( "Fine Generator skipping circ " . $c->id . " due to 0 fine interval, 0 fine rate, or 0 max fine." );
-                next;
+                return;
             }
 
             if ( $is_reservation and $fine_interval >= interval_to_seconds('1d') ) {    
@@ -1132,7 +1132,7 @@ sub generate_fines {
                 $grace_period = OpenILS::Application::Circ::CircCommon->extend_grace_period($c->$circ_lib_method->to_fieldmapper->id,$c->$due_date_method,$grace_period,undef,$hoo{$c->$circ_lib_method});
             }
 
-            next if ($last_fine > $now);
+            return if ($last_fine > $now);
             # Generate fines for each past interval, including the one we are inside
             my $pending_fine_count = ceil( ($now - $last_fine) / $fine_interval );
 
@@ -1142,11 +1142,11 @@ sub generate_fines {
             ) {
                 $client->respond( "Still inside grace period of: ". seconds_to_interval( $grace_period )."\n" );
                 $log->info( "Circ ".$c->id." is still inside grace period of: $grace_period [". seconds_to_interval( $grace_period ).']' );
-                next;
+                return;
             }
 
             $client->respond( "\t$pending_fine_count pending fine(s)\n" );
-            next unless ($pending_fine_count);
+            return unless ($pending_fine_count);
 
             my $recurring_fine = int($c->$recurring_fine_method * 100);
             my $max_fine = int($c->max_fine * 100);
@@ -1186,7 +1186,7 @@ sub generate_fines {
                     my $dow_close = "dow_${dow}_close";
 
                     if (my $h = $hoo{$c->$circ_lib_method}) {
-                        next if ( $h->$dow_open eq '00:00:00' and $h->$dow_close eq '00:00:00');
+                        return if ( $h->$dow_open eq '00:00:00' and $h->$dow_close eq '00:00:00');
                     }
     
                     my @cl = actor::org_unit::closed_date->search_where(
@@ -1194,7 +1194,7 @@ sub generate_fines {
                               close_end => { '>=' => $timestamptz },
                               org_unit  => $c->$circ_lib_method }
                     );
-                    next if (@cl);
+                    return if (@cl);
                 }
 
                 # The billing amount for this billing normally ought to be the recurring fine amount.

-----------------------------------------------------------------------

Summary of changes:
 .../Application/Storage/Publisher/action.pm        |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list