line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
our $VERSION = '0.15'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use Catmandu::Sane; |
5
|
1
|
|
|
1
|
|
353854
|
use Moo; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
145
|
use Business::ISBN; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
1288
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
37916
|
|
|
1
|
|
|
|
|
38
|
|
8
|
1
|
|
|
1
|
|
7
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
9
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Catmandu::Fix::Condition::SimpleAllTest'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my ($self, $var) = @_; |
14
|
|
|
|
|
|
|
"(is_value(${var}) && Business::ISBN->new(${var}) && Business::ISBN->new(${var})->is_valid)"; |
15
|
4
|
|
|
4
|
0
|
24578
|
} |
16
|
4
|
|
|
|
|
20
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Catmandu::Fix::Condition::is_valid_isbn - condition on validity of isbn numbers |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
if is_valid_isbn(isbn_field) |
24
|
|
|
|
|
|
|
... |
25
|
|
|
|
|
|
|
else |
26
|
|
|
|
|
|
|
... |
27
|
|
|
|
|
|
|
end |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SEE ALSO |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
L<Catmandu::Fix> |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |