Branch Coverage

lib/Petal.pm
Criterion Covered Total %
branch 126 162 77.7


line true false branch
28 77 0 if ($] > 5.007)
31 0 77 if $@
178 73 1547 if (not $CodeGeneratorLoaded)
181 0 73 if $@
192 134 81 if @_ == 1
207 20 195 if ($file =~ /#/) { }
230 16 0 if $filename
243 0 0 exists $_[0]{'default_language'} ? :
244 1 0 exists $_[0]{'input'} ? :
245 0 0 exists $_[0]{'output'} ? :
246 2 2 exists $_[0]{'taint'} ? :
247 0 0 exists $_[0]{'error_on_undef_var'} ? :
248 2 2 exists $_[0]{'disk_cache'} ? :
249 2 2 exists $_[0]{'memory_cache'} ? :
250 2 2 exists $_[0]{'cache_only'} ? :
251 2 2 exists $_[0]{'max_includes'} ? :
257 436 0 defined $_ ? :
264 48 209 if (exists $self->{'base_dir'}) { }
267 3 45 if (ref $base_dir) { }
270 0 45 unless defined $base_dir
276 200 9 if (defined $BASE_DIR) { }
292 2 69 if ($file =~ /^#/)
297 53 18 unless $file =~ /^\./
310 25 27 if $next eq '.'
312 3 24 if ($next eq '..')
314 2 1 if scalar @new_path == 0
347 0 204 defined $self->{'taint'} ? :
348 0 204 defined $self->{'error_on_undef_var'} ? :
349 6 198 defined $self->{'disk_cache'} ? :
350 6 198 defined $self->{'memory_cache'} ? :
351 1 203 defined $self->{'cache_only'} ? :
352 3 201 defined $self->{'max_includes'} ? :
353 3 201 defined $self->{'input'} ? :
354 2 202 defined $self->{'output'} ? :
355 1 19 ref $self->{'base_dir'} ? :
20 184 defined $self->{'base_dir'} ? :
356 1 19 ref $self->{'base_dir'} ? :
20 184 defined $self->{'base_dir'} ? :
357 0 204 defined $self->{'default_language'} ? :
358 0 204 defined $self->{'debug_dump'} ? :
359 2 202 defined $self->{'decode_charset'} ? :
360 5 199 defined $self->{'translation_service'} ? :
365 2 202 if $CURRENT_INCLUDES > $MAX_INCLUDES
371 69 133 if (ref $_[0] eq 'Petal::Hash') { }
14 119 elsif (ref $_[0] eq 'HASH') { }
376 0 195 unless $coderef
377 0 195 unless $hash
381 2 200 if ($CACHE_ONLY == 1)
383 9 191 if (defined $@ and $@) { }
5 372 elsif (defined $TranslationService and $CURRENT_INCLUDES == 1) { }
398 177 27 if (defined $BASE_DIR)
400 64 113 unless 'File::Spec'->file_name_is_absolute($BASE_DIR)
405 124 70 'File::Spec'->file_name_is_absolute($_) ? :
406 194 0 defined $_ ? :
408 20 184 if (defined $self->{'base_dir'})
410 1 19 if (ref $self->{'base_dir'}) { }
413 0 2 'File::Spec'->file_name_is_absolute($_) ? :
414 2 0 defined $_ ? :
415 1 0 if defined $self->{'base_dir'}
421 19 0 unless 'File::Spec'->file_name_is_absolute($self->{'base_dir'})
432 1 8 if ($HTML_ERRORS)
449 0 1 $dump ? :
455 7 1 if ($DEBUG_DUMP)
463 0 7 if (ref $error)
481 1 6 $dump ? :
486 1 0 if (not $DEBUG_DUMP)
528 0 540 if @_
538 213 20 unless $file =~ s/^.*#//
548 0 23 $macro ? :
571 230 12 if -e $file_path and -r $file_path
588 207 0 if ($] > 5.007) { }
591 0 207 unless open FP, "<:encoding($encoding)", "$file_path"
604 27 180 $OUTPUT =~ /HTML$/i || $INPUT =~ /HTML$/i ? :
619 4 206 defined $DISK_CACHE && $DISK_CACHE ? :
620 210 0 unless (defined $code)
630 4 192 if defined $DISK_CACHE and $DISK_CACHE
643 8 194 defined $MEMORY_CACHE && $MEMORY_CACHE ? :
644 202 0 unless (defined $code)
650 0 195 if $@
653 7 188 if defined $MEMORY_CACHE and $MEMORY_CACHE
666 0 0 if defined $self->{'memory_cache'}