blib/lib/Data/Validate/WithYAML/Plugin/IBAN.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 14 | 14 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 19 | 20 | 95.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Data::Validate::WithYAML::Plugin::IBAN; | ||||||
2 | |||||||
3 | # ABSTRACT: check whether a given value is a valid IBAN | ||||||
4 | |||||||
5 | 1 | 1 | 20761 | use strict; | |||
1 | 3 | ||||||
1 | 40 | ||||||
6 | 1 | 1 | 6 | use warnings; | |||
1 | 3 | ||||||
1 | 31 | ||||||
7 | |||||||
8 | 1 | 1 | 7 | use Carp; | |||
1 | 6 | ||||||
1 | 87 | ||||||
9 | 1 | 1 | 987 | use Algorithm::CheckDigits; | |||
1 | 4147 | ||||||
1 | 138 | ||||||
10 | |||||||
11 | our $VERSION = 0.02; | ||||||
12 | |||||||
13 | sub check { | ||||||
14 | 14 | 14 | 0 | 6223 | my ($class, $value, $conf) = @_; | ||
15 | |||||||
16 | 14 | 41 | return CheckDigits('iban')->is_valid( $value ); | ||||
17 | } | ||||||
18 | |||||||
19 | 1; | ||||||
20 | |||||||
21 | __END__ |