From 5bd40b7e2bf49cc5a51bcdaffcbea1fc02c2bbfd Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 11 Oct 2014 11:50:52 -0400 Subject: [PATCH] Fix some things caught by perl -c in NCIP::ILS::Evergreen. Signed-off-by: Jason Stephenson --- lib/NCIP/ILS/Evergreen.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/NCIP/ILS/Evergreen.pm b/lib/NCIP/ILS/Evergreen.pm index 126fc58..d419560 100644 --- a/lib/NCIP/ILS/Evergreen.pm +++ b/lib/NCIP/ILS/Evergreen.pm @@ -931,11 +931,14 @@ sub requestitem { # This here is the thing we're going to put on hold: my $item; + # We need copy details if we find in a couple of places below. + my $copy_details; + # We need the copy barcode from the message. my ($item_barcode, $item_idfield) = $self->find_item_barcode($request); if (ref($item_barcode) ne 'NCIP::Problem') { # Retrieve the copy details. - my $copy_details = $self->retrieve_copy_details_by_barcode($item_barcode); + $copy_details = $self->retrieve_copy_details_by_barcode($item_barcode); unless ($copy_details) { # Return an Unknown Item problem unless we find the copy. $response->problem( @@ -1450,7 +1453,7 @@ sub handle_user_elements { sub handle_item_elements { my $self = shift; my $copy = shift; - my $elments = shift; + my $elements = shift; my $optionalfields = NCIP::Item::OptionalFields->new(); my $details; # In case we need for more than one. @@ -1518,7 +1521,7 @@ sub handle_item_elements { $details = $self->retrieve_copy_details_by_barcode($copy->barcode()) unless($details); if ($details->{circ}) { if (!$details->{circ}->checkin_time()) { - my $due = DateTime::Format::ISO8601->parse_datetime(cleanse_ISO8601($circ->due_date())); + my $due = DateTime::Format::ISO8601->parse_datetime(cleanse_ISO8601($details->{circ}->due_date())); $due->set_time_zone('UTC'); $optionalfields->DateDue($due->iso8601()); } -- 2.43.2