line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::Condition::is_valid_issn; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
429023
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
8
|
|
6
|
1
|
|
|
1
|
|
211
|
use Moo; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
7
|
1
|
|
|
1
|
|
870
|
use Business::ISSN; |
|
1
|
|
|
|
|
1579
|
|
|
1
|
|
|
|
|
44
|
|
8
|
1
|
|
|
1
|
|
8
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Catmandu::Fix::Condition::SimpleAllTest'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub emit_test { |
15
|
4
|
|
|
4
|
0
|
28019
|
my ($self, $var, $parser) = @_; |
16
|
4
|
|
|
|
|
22
|
"(is_value(${var}) && Business::ISSN->new(${var}) && Business::ISSN->new(${var})->is_valid)"; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 NAME |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Catmandu::Fix::Condition::is_valid_issn - condition on validity of issn numbers |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 SYNOPSIS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
if is_valid_issn(issn_field) |
26
|
|
|
|
|
|
|
... |
27
|
|
|
|
|
|
|
else |
28
|
|
|
|
|
|
|
... |
29
|
|
|
|
|
|
|
end |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SEE ALSO |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
L<Catmandu::Fix> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |