Branch Coverage

blib/lib/Cron/Sequencer/Parser.pm
Criterion Covered Total %
branch 52 62 83.8


line true false branch
35 0 29 if ref $class
39 0 29 if (not defined $arg) { }
2 27 elsif (ref $arg eq 'SCALAR') { }
23 4 elsif (ref $arg eq 'HASH') { }
0 4 elsif (ref $arg) { }
1 3 elsif ($arg eq '') { }
47 20 3 if exists $arg->{'crontab'}
48 1 22 if (exists $arg->{'env'})
54 0 0 unless defined $value
59 18 5 if (exists $arg->{'ignore'})
63 20 1 length $_ ? :
65 8 21 if ($val =~ /\A([1-9][0-9]*)-([1-9][0-9]*)\z/u and $2 >= $1) { }
14 7 elsif ($val =~ /\A[1-9][0-9]*\z/u) { }
83 6 15 unless ($crontab)
84 2 4 unless length $source
86 1 3 unless open my $fh, "<", $source
90 0 3 unless (defined $contents and close $fh)
98 2 16 unless ($$crontab =~ /(?:\A|\n)\z/u)
99 1 1 length $source ? :
108 3896 1 length $source ? :
114 35 7793 if $ignore->{$lineno}
124 29 7764 if $line =~ /\A(?:#|\z)/u
128 3858 3906 if ($line =~ /\A
1 3905 elsif ($line =~ /\A\@reboot[\t ]/u) { }
160 8 3897 if ($line =~ /\A\@([^\t ]+)[\t ]+(.*)\z/u) { }
3882 15 elsif ($line =~ /\A
164 1 7 unless $truetime
207 0 0 unless defined $env{$key}
211 3858 0 unless defined $default_env->{$key} and $default_env->{$key} eq $env{$key}
213 0 3889 if @unset
215 3858 31 if %set