Branch Coverage

blib/lib/FormValidator/Simple/Validator.pm
Criterion Covered Total %
branch 62 128 48.4


line true false branch
19 2 2 $data =~ /\s/ ? :
27 15 7 $data =~ /^\-?[\d]+$/ ? :
33 0 0 $data =~ /^\d+$/ ? :
39 9 2 $data =~ /^[\x21-\x7E]+$/ ? :
46 0 4 unless (defined $data1 and defined $data2)
51 2 2 $data1 eq $data2 ? :
56 0 17 unless (scalar @$args > 0)
67 4 13 $min <= $length && $length <= $max ? :
74 2 1 $data =~ /$regex/ ? :
80 0 0 unless $data
81 0 0 'Email::Valid'->address(-'address', $data) ? :
87 0 0 unless $data
88 0 0 'Email::Valid'->address(-'address', $data, -'mxcheck', 1) ? :
94 0 3 unless $data
95 3 0 'Email::Valid::Loose'->address($data) ? :
101 0 0 unless $data
102 0 0 'Email::Valid::Loose'->address(-'address', $data, -'mxcheck', 1) ? :
108 2 2 Date::Calc::check_date($year, $month, $day) ? :
110 2 2 if ($result)
112 0 2 if ($class eq 'DateTime') { }
0 2 elsif ($class eq 'Time::Piece') { }
114 0 0 if ($@)
124 0 0 if ($self->options->{'time_zone'})
132 0 0 if ($@)
152 2 2 Date::Calc::check_time($hour, $min, $sec) ? :
153 2 2 $result ? :
163 2 2 Date::Calc::check_date($year, $month, $day) && Date::Calc::check_time($hour, $min, $sec) ? :
166 2 2 if ($result)
168 0 2 if ($class eq 'DateTime') { }
0 2 elsif ($class eq 'Time::Piece') { }
170 0 0 if ($@)
183 0 0 if ($self->options->{'time_zone'})
192 0 0 if ($@)
210 2 6 if defined $param and $param ne ''
218 1 1 $data =~ m[^s?https?://[-_.!~*'()a-zA-Z0-9;/?:\@&=+\$,%#]+$] ? :
224 0 0 ref $data ? :
226 0 0 scalar @$selected >= $num ? :
234 0 3 unless (defined $target and $target =~ /$regex/)
239 0 3 unless $data =~ /$regex/
240 2 1 $data > $target ? :
248 0 3 unless (defined $target and $target =~ /$regex/)
253 0 3 unless $data =~ /$regex/
254 1 2 $data < $target ? :
262 0 3 unless (defined $target and $target =~ /$regex/)
267 0 3 unless $data =~ /$regex/
268 1 2 $data == $target ? :
277 0 5 unless (defined $start and $start =~ /$regex/ and defined $end and $end =~ /$regex/)
282 0 5 unless $data =~ /$regex/
283 3 2 $data >= $start && $data <= $end ? :
289 0 4 unless (scalar @$args > 0)
296 0 4 unless ($digit1 =~ /^\d+$/ and $digit2 =~ /^\d+$/)
301 0 4 unless $data =~ /^\d+(\.\d+)?$/
303 2 2 $data =~ /$reg/ ? :
309 1 3 unless (defined $param and $param ne '')
318 3 0 defined $$params[0] ? :
319 2 1 &List::MoreUtils::any(sub { $_ eq $data; } , @$args) ? :
326 0 0 unless $format
331 0 0 if (ref $format) { }
336 0 0 unless $module->require
344 0 0 $dt ? :
346 0 0 if ($dt and $self->options->{'time_zone'})
356 0 0 unless $format
369 0 0 $dt ? :
371 0 0 if ($dt and $self->options->{'time_zone'})