Branch Coverage

blib/lib/Text/Forge.pm
Criterion Covered Total %
branch 43 94 45.7


line true false branch
79 9 54 if $key eq 'header'
81 18 36 if $ref eq 'HASH'
82 0 36 if $ref eq 'ARRAY'
98 0 45 length $2 ? :
109 4 5 if $doc =~ s/^(.*)<\s*FORGE\s*>//is
110 0 9 if $doc =~ s[<\s*/\s*FORGE\s*>(.*)$][]is
115 19 4 if (length $string)
118 10 9 if (@code || defined $pre and $string =~ /^([ \t\r\f]*\n)(.*)$/s)
122 0 0 $1 eq '|' ? :
123 14 5 if length $string
125 9 14 unless @tokens
127 0 14 unless exists $$self{'ops'}{$op}
155 10 0 if $$self{'_header_sent'} or $$self{'_tie_obj'}
156 0 0 if $$self{'buffer'}
159 0 0 if $header
167 0 9 unless $$self{'_tie_obj'}
176 0 9 if $$self{'_tie_obj'}
178 0 9 unless $$self{'_tie_obj'} = tie(*STDOUT, 'Text::Forge')
185 0 9 unless $$self{'_tie_obj'}
188 0 9 if $$self{'_old_tie'}
200 0 9 unless $path =~ m[^/]
201 9 0 unless $$self{'cache_module'}->is_cached($path)
205 0 9 unless open $fh, $path
207 0 9 unless close $fh
210 0 9 if $Text::Forge::Debug
217 0 9 if $warning or $@
223 0 9 wantarray ? :
231 0 10 unless $path
233 10 0 unless $path =~ m[^/]
234 9 1 unless $$self{'cache_module'}->is_cached($path)
248 0 9 if $$self{'_in_template'}
266 0 0 if $$self{'_in_template'}
276 0 0 unless ($$clone{'_header_sent'})
278 0 0 if $header
288 0 0 unless @_
291 0 0 unless @_
294 0 0 unless ref $sub eq 'CODE'
301 0 2 unless @_
302 0 2 if (ref $_[0] eq 'ARRAY')
304 0 0 wantarray ? :
313 4 0 if $header
344 0 0 wantarray ? :
355 0 0 wantarray ? :
364 0 5 if $name eq 'DESTROY'
365 0 5 unless exists $$self{'autoload'}{$name}
366 0 5 @_ ? :
395 0 14 if $$self{'_tie_obj'} and not $$self{'_in_template'}