Condition Coverage

blib/lib/Plate.pm
Criterion Covered Total %
condition 145 164 88.4


and 2 conditions

line l !l condition
139 1 1 $pre && 'pre'
140 1 1 $pre && '%'
148 5 4 $pre && '%'
199 1 2 $pre && 'pre'

and 3 conditions

line !l l&&!r l&&r condition
119 180 323 31 not $pre and @Plate::_l
503 7 24 not $pre and @Plate::_l and $Plate::_l[0] <= $+[1]
121 14 10 16 @Plate::_l and $Plate::_l[0] <= $+[1]
183 20 4 2 $pre and $nl
192 36 6 1 $pre and $nl
207 60 7 17 $pre and @expr
211 122 1 135 not $pre and $Plate::_s->{'chomp'}
216 48 179 17 not $pre and @Plate::_l
227 12 5 not $pre and @Plate::_l and $Plate::_l[0] <= $+[0]
218 5 0 4 @Plate::_l and $Plate::_l[0] <= $+[0]
294 6 2 7 -f $cache and ($_[0]{'mod'}{$_[1]} // (stat _)[9]) >= $_n
353 10 0 9 $_[1] and not length $vol
10 7 2 $_[1] and not length $vol and length $dir[0] || @dir == 1
761 4 1 4 $_[0]{'cache_code'} and not $_[0]{'static'}
5 2 2 $_[0]{'cache_code'} and not $_[0]{'static'} and exists $_[0]{'mod'}{$_[1]}
825 1 1 1 defined $_[1] and $_[1] =~ /^[A-Z_a-z][0-9A-Z_a-z]*(?:::[0-9A-Z_a-z]+)*$/u
857 1 0 42 -d $dir and -r _
858 32 3 7 $self->{'static'} and $self->{'static'} eq "auto"

or 2 conditions

line l !l condition
107 22 48 $stmt //= "local\$Plate::_b='';"
196 28 223 ($13 // $14) // ""
198 1 2 $stmt // ""
340 21 132 pop() // \&Plate::_empty
673 6 96 shift() // \&Plate::_empty
789 1 0 $_[1] // ""
1 1 $_[1] // ""
5 0 $_[1] // ""
1 1 $_[1] // ""
1 0 $_[1] // ""
798 8 1 $_[1] // (return undef %{$_[0]{"filters"};})
825 1 1 $_[1] // ""
830 4 1 $_[1] // (return undef %{$_[0]{"vars"};})
836 6 1 &Scalar::Util::reftype($ref) // "CODE"
5 2 $sigil{&Scalar::Util::reftype($ref) // "CODE"} // "\$"
857 1 0 $! || 'Not accessable'
860 2 2 $self->{'static'} ||= "auto"
873 1 8 $self->{'static'} ||= "auto"

or 3 conditions

line l !l&&r !l&&!r condition
166 44 61 1 $9 // $Plate::_s->{'auto_filter'}
173 13 15 41 $pre or $fix_line_num
196 10 28 223 $13 // $14
271 10 1 2 not $dir =~ s[/[^/]*$][]u or -d $_[0]{'cache_path'} . $dir
274 1 1 0 mkdir $_ or umask $umask, croak("Can't create cache directory ${_}: $!")
290 3 0 1 do $cache // croak($@ ? $@ . "Plate compilation failed" : "Couldn't load ${cache}: $!")
291 3 1 0 $plate // croak("Plate template '$_[1]' does not exist")
293 2 13 3 $_[2] // (stat $plate)[9]
15 3 0 ($_[2] // (stat $plate)[9]) // croak("Can't read ${plate}: $!")
294 4 5 0 $_[0]{'mod'}{$_[1]} // (stat _)[9]
295 6 0 1 do $cache // croak($@ ? $@ . "Plate compilation failed" : "Couldn't load ${cache}: $!")
296 3 3 0 $_[0]{'mod'}{$_[1]} //= $_n
302 7 0 3 $_[0]{'static'} or exists $_[0]{'mod'}{$_[1]}
309 152 11 1 $_[0]{'mem'}{$_[1]} //= $_[0]->_load($_[1])
6 158 6 $_[0]{'static'} or not exists $_[0]{'mod'}{$_[1]}
312 2 1 0 $_[0]{'mem'}{$_[1]} //= $_[0]->_load($_[1], $mod)
318 6 23 0 $Plate::_s->{'mem'}{$_[0]} // $Plate::_s->_load($_[0])
345 122 2 1 $Plate::_s->{'filters'}{$f} // croak("No '${f}' filter defined")
351 0 1 1 length $vol || !$_[1]
353 7 1 1 length $dir[0] || @dir == 1
764 5 1 0 $_[0]->_plate_file($_[1]) // $_[0]->_cache_file($_[1])
809 3 1 1 ref $code eq "CODE" or $code = $code =~ /(.*)::(.*)/u ? $1->can($2) : do { my($i, $p) = 0; ++$i while "Plate" eq ($p = caller $i); $p->can($code) }