From 86e01e6ae60a5ad2d775f2f0fdb0144e702b3b5f Mon Sep 17 00:00:00 2001 From: djfiander Date: Sun, 16 Apr 2006 15:47:07 +0000 Subject: [PATCH] Minor cleanups. move available() method out of Transaction and into Item. --- ILS/Item.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ILS/Item.pm b/ILS/Item.pm index 0d214a4..91b8830 100644 --- a/ILS/Item.pm +++ b/ILS/Item.pm @@ -133,10 +133,10 @@ sub owner { return 'UWOLS'; } -sub hold_queue_length { +sub hold_queue { my $self = shift; - return scalar @{$self->{hold_queue}}; + return @{$self->{hold_queue}}; } sub hold_queue_position { @@ -181,5 +181,9 @@ sub print_line { return $self->{print_line} || ''; } +sub available { + my $self = shift; + return (!$self->{patron_id} && !$self->{hold_queue}); +} 1; -- 2.11.0