Branch Coverage

lib/Mojolicious/Plugin/Vparam/Datetime.pm
Criterion Covered Total %
branch 46 52 88.4


line true false branch
6 1 8 unless defined $_[0]
7 0 8 unless length $_[0]
12 1 7 unless defined $_[0]
13 0 7 unless length $_[0]
18 5 31 unless defined $_[0]
19 0 31 unless length $_[0]
28 3 50 unless defined $str
30 3 47 unless length $str
34 1 46 if ($str =~ /^\d+$/) { }
18 28 elsif ($str =~ /^[+-]/) { }
46 14 4 $relative[0] eq '+' ? :
47 2 16 if defined $relative[1]
48 4 14 if defined $relative[2]
49 18 0 if defined $relative[3]
50 12 6 if defined $relative[4]
53 12 16 if ($str =~ s/^(\d{1,2})\.(\d{1,2})\.(\d{1,4})(.*)$/$3-$2-$1$4/)
57 1 11 if (my($year) = $str =~ /^(\d{1,$cur_len})-/)
62 4 24 if $str =~ /^\d{2}:/
66 1 27 if $@
69 0 46 unless $dt
87 1 8 unless defined $_[1]
90 7 1 ref $_[1] && ($conf->{'date'} || !$_[2]{'blessed'}) ? :
100 1 7 unless defined $_[1]
103 7 0 ref $_[1] && ($conf->{'time'} || !$_[2]{'blessed'}) ? :
113 3 33 unless defined $_[1]
116 14 19 ref $_[1] && ($conf->{'datetime'} || !$_[2]{'blessed'}) ? :