From 61f88c4c50aa05c1283fd0a715663e4ad3e369b1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 11 Feb 2021 10:44:04 +0100 Subject: [PATCH] Bug 27673: Rename C4::Circulation decode to _decode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To prevent conflict with Encode::encode Signed-off-by: Kyle M Hall Signed-off-by: Joonas Kylmälä Signed-off-by: Jonathan Druart --- C4/Circulation.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index a7302d862a..5b5a0d2c23 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -182,7 +182,7 @@ sub barcodedecode { } elsif ($filter eq 'cuecat') { chomp($barcode); my @fields = split( /\./, $barcode ); - my @results = map( decode($_), @fields[ 1 .. $#fields ] ); + my @results = map( C4::Circulation::_decode($_), @fields[ 1 .. $#fields ] ); ($#results == 2) and return $results[2]; } elsif ($filter eq 'T-prefix') { if ($barcode =~ /^[Tt](\d)/) { @@ -213,9 +213,9 @@ sub barcodedecode { return $barcode; # return barcode, modified or not } -=head2 decode +=head2 _decode - $str = &decode($chunk); + $str = &_decode($chunk); Decodes a segment of a string emitted by a CueCat barcode scanner and returns it. @@ -225,7 +225,7 @@ or Javascript based decoding on the client side. =cut -sub decode { +sub _decode { my ($encoded) = @_; my $seq = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-'; -- 2.39.5