View | Details | Raw Unified | Return to bug 6448
Collapse All | Expand All

(-)a/C4/Barcodes/EAN13.pm (-2 / +3 lines)
Lines 24-29 use C4::Context; Link Here
24
use C4::Debug;
24
use C4::Debug;
25
25
26
use Algorithm::CheckDigits;
26
use Algorithm::CheckDigits;
27
use Carp;
27
28
28
use vars qw($VERSION @ISA);
29
use vars qw($VERSION @ISA);
29
use vars qw($debug $cgi_debug);	# from C4::Debug, of course
30
use vars qw($debug $cgi_debug);	# from C4::Debug, of course
Lines 40-46 sub parse { Link Here
40
    if ( $ean->is_valid($barcode) ) {
41
    if ( $ean->is_valid($barcode) ) {
41
        return ( '', $ean->basenumber($barcode), $ean->checkdigit($barcode) );
42
        return ( '', $ean->basenumber($barcode), $ean->checkdigit($barcode) );
42
    } else {
43
    } else {
43
        die "$barcode not valid EAN-13 barcode";
44
        carp "$barcode not valid EAN-13 barcode";
45
        return ( '', $barcode, '' );
44
    }
46
    }
45
}
47
}
46
48
47
- 

Return to bug 6448