Condition Coverage

blib/lib/Data/FormValidator/Constraints.pm
Criterion Covered Total %
condition 65 156 41.6


and 3 conditions

line !l l&&!r l&&r condition
70 0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 1 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
0 0 0 &Scalar::Util::blessed($dfv) and $dfv->can('name_this')
239 0 0 34 defined $prefix and $prefix eq 'valid_'
282 0 0 8 defined $min and defined $max
376 0 0 3 defined $value and ref $value eq 'ARRAY'
408 0 0 2 $min and $max
420 1 0 1 $num_values >= $min && $num_values <= $max
425 0 0 0 $min <= 1 and $max >= 1
457 26 1 11 $valid_email = 'Email::Valid'->address($in_email) and $valid_email eq $in_email
629 0 0 1 $attrs and ref $attrs eq 'HASH'
0 0 1 $attrs and ref $attrs eq 'HASH' and exists $attrs->{'fields'}
0 0 1 $attrs and ref $attrs eq 'HASH' and exists $attrs->{'fields'} and ref $attrs->{'fields'} eq 'ARRAY'
657 20 8 0 $card_type =~ /^v/i and substr($the_card, 0, 1) ne '4'
20 6 2 $card_type =~ /^m/i and substr($the_card, 0, 1) ne '5'
26 0 2 $card_type =~ /^m/i and substr($the_card, 0, 1) ne '5' and substr($the_card, 0, 1) ne '2'
20 4 2 $card_type =~ /^d/i and substr($the_card, 0, 4) ne '6011'
18 0 6 $card_type =~ /^a/i and substr($the_card, 0, 2) ne '34'
18 6 0 $card_type =~ /^a/i and substr($the_card, 0, 2) ne '34' and substr($the_card, 0, 2) ne '37'
670 18 6 0 $digit == 3 and $index != 14
16 0 8 $digit == 4 and $index != 12
16 8 0 $digit == 4 and $index != 12 and $index != 15
18 6 0 $digit == 5 and $index != 15
20 0 4 $digit == 6 and $index != 13
20 4 0 $digit == 6 and $index != 13 and $index != 15
719 2 0 0 $year == $now[5] and $month <= $now[4]
751 0 1 3 $2 >= 0 and $2 <= 255
0 0 3 $3 >= 0 and $3 <= 255
1 0 3 $2 >= 0 and $2 <= 255 and ($3 >= 0 and $3 <= 255)
0 0 3 $4 >= 0 and $4 <= 255
0 0 3 $2 >= 0 and $2 <= 255 and ($3 >= 0 and $3 <= 255) and ($4 >= 0 and $4 <= 255)
0 0 3 $5 >= 0 and $5 <= 255
0 0 3 $2 >= 0 and $2 <= 255 and ($3 >= 0 and $3 <= 255) and ($4 >= 0 and $4 <= 255) and ($5 >= 0 and $5 <= 255)

or 3 conditions

line l !l&&r !l&&!r condition
288 2 3 3 length $value > $max or length $value < $min
367 2 0 0 shift() || croak('size argument is required')
657 0 2 26 $card_type =~ /^v/i and substr($the_card, 0, 1) ne '4' or $card_type =~ /^m/i and substr($the_card, 0, 1) ne '5' and substr($the_card, 0, 1) ne '2'
2 2 24 $card_type =~ /^v/i and substr($the_card, 0, 1) ne '4' or $card_type =~ /^m/i and substr($the_card, 0, 1) ne '5' and substr($the_card, 0, 1) ne '2' or $card_type =~ /^d/i and substr($the_card, 0, 4) ne '6011'
2 0 24 $card_type =~ /^v/i and substr($the_card, 0, 1) ne '4' or $card_type =~ /^m/i and substr($the_card, 0, 1) ne '5' and substr($the_card, 0, 1) ne '2' or $card_type =~ /^d/i and substr($the_card, 0, 4) ne '6011' or $card_type =~ /^a/i and substr($the_card, 0, 2) ne '34' and substr($the_card, 0, 2) ne '37'
670 0 0 24 $digit == 3 and $index != 14 or $digit == 4 and $index != 12 and $index != 15
0 0 24 $digit == 3 and $index != 14 or $digit == 4 and $index != 12 and $index != 15 or $digit == 5 and $index != 15
0 0 24 $digit == 3 and $index != 14 or $digit == 4 and $index != 12 and $index != 15 or $digit == 5 and $index != 15 or $digit == 6 and $index != 13 and $index != 15
715 0 0 2 $month < 1 or $month > 12
719 0 0 2 $year < $now[5] or $year == $now[5] and $month <= $now[4]