[open-ils-commits] r17638 - trunk/Open-ILS/src/perlmods/OpenILS/Application (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Sep 13 15:03:36 EDT 2010


Author: miker
Date: 2010-09-13 15:03:32 -0400 (Mon, 13 Sep 2010)
New Revision: 17638

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
Log:
a little defensive programming

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm	2010-09-13 18:14:19 UTC (rev 17637)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm	2010-09-13 19:03:32 UTC (rev 17638)
@@ -441,7 +441,7 @@
     my $self = shift;
     my $client = shift;
     my $bibid = shift;
-    my $args = shift;
+    my $args = shift || {};
 
     $args->{order} = 'asc';
 
@@ -449,10 +449,10 @@
 
     # split into issuance type sets
     my %type_blob = (basic => [], supplement => [], index => []);
-    my %statement_blob = %type_blob;
     push @{ $type_blob{ $_->holding_type } }, $_ for (@$issuances);
 
     # generate a statement list for each type
+    my %statement_blob;
     for my $type ( keys %type_blob ) {
         my ($mfhd,$list) = _summarize_contents(new_editor(), $type_blob{$type});
         $statement_blob{$type} = $list;



More information about the open-ils-commits mailing list