From 462501407ec26d1244349518f4a98c1f0f4062a2 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=UTF-8 Content-Transfer-Encoding: 8bit To prevent conflict with Encode::encode Signed-off-by: Kyle M Hall Signed-off-by: Joonas Kylmälä --- C4/Circulation.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index e2298ad684..d59d37cbf6 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.11.0