line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
our $VERSION = '0.15'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use Catmandu::Sane; |
5
|
1
|
|
|
1
|
|
90718
|
use Business::ISBN; |
|
1
|
|
|
|
|
163188
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
757
|
use Moo; |
|
1
|
|
|
|
|
37614
|
|
|
1
|
|
|
|
|
51
|
|
7
|
1
|
|
|
1
|
|
10
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
8
|
1
|
|
|
1
|
|
773
|
|
|
1
|
|
|
|
|
865
|
|
|
1
|
|
|
|
|
5
|
|
9
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Catmandu::Fix::SimpleGetValue'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my ($self, $var) = @_; |
14
|
|
|
|
|
|
|
|
15
|
5
|
|
|
5
|
0
|
15821
|
"${var} = Business::ISBN->new(${var})->as_isbn13->as_string if is_value(${var}) && length(${var});"; |
16
|
|
|
|
|
|
|
|
17
|
5
|
|
|
|
|
26
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 NAME |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Catmandu::Fix::isbn13 - normalize the isbn value of a key in 13-digit form |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 SYNOPSIS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Normalize the ISBN value of isbn_field. |
26
|
|
|
|
|
|
|
# e.g. isbn_field => '1565922573' |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
isbn13(isbn_field) # isbn_field => '978-1-56592-257-0' |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SEE ALSO |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
L<Catmandu::Fix>, L<Catmandu::Fix::isbn10> |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |