projects
/
srvgit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
1059c03
)
Merge remote-tracking branch 'origin/new/bug_6448'
author
Paul Poulain
<paul.poulain@biblibre.com>
Wed, 19 Sep 2012 14:12:23 +0000
(16:12 +0200)
committer
Paul Poulain
<paul.poulain@biblibre.com>
Wed, 19 Sep 2012 14:12:23 +0000
(16:12 +0200)
C4/Barcodes/EAN13.pm
patch
|
blob
|
history
diff --git
a/C4/Barcodes/EAN13.pm
b/C4/Barcodes/EAN13.pm
index
da27c41
..
adc1283
100644
(file)
--- a/
C4/Barcodes/EAN13.pm
+++ b/
C4/Barcodes/EAN13.pm
@@
-24,6
+24,7
@@
use C4::Context;
use C4::Debug;
use Algorithm::CheckDigits;
+use Carp;
use vars qw($VERSION @ISA);
use vars qw($debug $cgi_debug); # from C4::Debug, of course
@@
-40,7
+41,8
@@
sub parse {
if ( $ean->is_valid($barcode) ) {
return ( '', $ean->basenumber($barcode), $ean->checkdigit($barcode) );
} else {
- die "$barcode not valid EAN-13 barcode";
+ carp "$barcode not valid EAN-13 barcode";
+ return ( '', $barcode, '' );
}
}