Branch Coverage

blib/lib/Data/FormValidator/Constraints/DateTime.pm
Criterion Covered Total %
branch 96 114 84.2


line true false branch
166 0 8 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
176 12 4 ref $dfv ? :
184 240 78 if ref $format eq 'SCALAR'
187 314 4 if (not ref $format) { }
202 166 152 if $dt and $formatter->can('format_datetime')
236 0 12 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
253 75 55 if ($value and exists $$data{$value}) { }
264 32 12 if (ref $_[0]) { }
272 26 18 if (defined $year and $year ne '' and defined $month and $month ne '' and defined $day and $day ne '') { }
328 0 3 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
338 6 3 ref $dfv ? :
344 6 3 if ($dt and $dt_target and $dt <= $dt_target) { }
381 0 3 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
391 6 3 ref $dfv ? :
397 6 3 if ($dt and $dt_target and $dt >= $dt_target) { }
433 0 3 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
451 4 2 if ($dt and $dt <= 'DateTime'->today)
485 0 3 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
503 4 2 if ($dt and $dt >= 'DateTime'->today)
549 0 6 if ref $date eq 'SCALAR'
553 0 6 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
558 0 6 if $$data{$date}
565 20 6 if ref $target_date eq 'SCALAR'
568 16 10 ref $dfv ? :
574 3 23 if ($dt and $dt_target and $dt < $dt_target) { }
618 0 6 if ref $date eq 'SCALAR'
622 0 6 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
634 20 6 if ref $target_date eq 'SCALAR'
637 16 10 ref $dfv ? :
643 3 23 if ($dt and $dt_target and $dt > $dt_target) { }
690 0 8 if ref $target1 eq 'SCALAR'
691 0 8 if ref $target2 eq 'SCALAR'
695 0 8 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
708 36 8 if ref $target1 eq 'SCALAR'
709 36 8 if ref $target2 eq 'SCALAR'
713 26 18 ref $dfv ? :
720 3 41 if ($dt and $dt_target1 and $dt_target2 and $dt > $dt_target1 and $dt < $dt_target2) { }
753 0 9 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
763 13 9 ref $dfv ? :
767 2 20 if $@
773 12 8 if ($format) { }
779 5 15 if ($dt) { }
804 0 9 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
814 13 9 ref $dfv ? :
818 2 20 if $@
824 12 8 if ($format) { }
830 5 15 if ($dt) { }
854 0 8 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
864 12 8 ref $dfv ? :
869 12 8 if ($format) { }
876 2 6 if ($value =~ /(\d{4})\D*(\d{2})\D*(\d{2})\D*(\d{2})\D*(\d{2})\D*(\d{2})/)
889 5 15 if ($dt) { }
914 0 9 unless blessed $dfv and $dfv->isa('Data::FormValidator::Results')
924 13 9 ref $dfv ? :
928 2 20 if $@
934 12 8 if ($format) { }
940 5 15 if ($dt) { }