From 8c2e5cc3aa5f81a071dcd62b2085c08080fa9fbe Mon Sep 17 00:00:00 2001 From: "Joe Atzberger (siptest" Date: Tue, 4 Nov 2008 14:34:52 -0600 Subject: [PATCH] followup - make barcode_to_borrowernumber an internal function Set this function apart with _ since it is not OO like the rest. Signed-off-by: Galen Charlton --- C4/SIP/ILS/Item.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm index 5afcf1dd4e..2a4f850653 100644 --- a/C4/SIP/ILS/Item.pm +++ b/C4/SIP/ILS/Item.pm @@ -234,10 +234,10 @@ sub available { return 0; } -sub barcode_to_borrowernumber ($) { +sub _barcode_to_borrowernumber ($) { my $known = shift; (defined($known)) or return undef; - my $member = GetMember($known, 'cardnumber') or return undef; # borrowernumber is default type for GetMember lookup + my $member = GetMember($known,'cardnumber') or return undef; return $member->{borrowernumber}; } sub barcode_is_borrowernumber ($$$) { # because hold_queue only has borrowernumber... @@ -245,7 +245,7 @@ sub barcode_is_borrowernumber ($$$) { # because hold_queue only has borrowern my $barcode = shift; my $number = shift or return undef; # can't be zero (defined($barcode)) or return undef; # might be 0 or 000 or 000000 - my $converted = barcode_to_borrowernumber($barcode) or return undef; + my $converted = _barcode_to_borrowernumber($barcode) or return undef; return ($number eq $converted); # even though both *should* be numbers, eq is safer. } 1; -- 2.39.5