Branch Coverage

blib/lib/Mason/Interp.pm
Criterion Covered Total %
branch 97 108 89.8


line true false branch
73 2 104 if ($$self{'static_source'})
85 1 460 if ($is_request_attribute{$key})
127 1 73 if (not @$extensions) { }
138 2 72 if (not @$extensions) { }
143 17 55 if (my(@other_names) = grep({not /$regex/;} @{$self->dhandler_names;}, @{$self->index_names;}))
164 6 2 -d $dir ? :
334 71 189 if (my $cmeta = $superclass->cmeta)
343 71 189 $_->cmeta ? :
360 11 173 if (ref $_[0] eq 'HASH')
370 0 3 unless $value
372 1 2 unless $self->allowed_globals_hash->{"$sigil$name"}
386 0 109 if in_global_destruction
391 85 24 if defined $$self{'code_cache'}
410 225 8 if (defined $object_file and not -f $object_file)
412 95 130 unless (-d $dirname)
413 0 95 if -e _
416 0 225 if -d $object_file
424 15 222 $path =~ $self->pure_perl_regex ? :
428 194 17 $path =~ $self->top_level_regex ? :
440 0 227 if taint_is_on()
442 2 225 if $@
471 77 5 $interp->autoextend_request_path ? :
486 9 196 if $path ne '/' and substr($path, -1) eq '/'
494 20 255 $path eq '/' ? :
5 275 $path_info eq '' && !@autoextensions ? :
498 56 600 if $$declined_paths{$candidate_path}
499 165 405 if (my $compc = $interp->load($candidate_path))
500 28 6 if ($compc->cmeta->is_top_level and $path_info eq '' || $compc->cmeta->is_dhandler || $compc->allow_path_info)
512 17 75 if $path eq '/'
514 35 36 length $path_info ? :
4 71 $path_info eq '/' ? :
530 1 10 if $spec =~ /^[\@%]/
532 1 9 unless $spec =~ qr/^[[:alpha:]_]\w*$/
542 220 5 unless ($compc->meta->has_method('wrap'))
546 153 36 if ($self->cmeta->path eq $path) { }
547 153 0 if ($self->can('main')) { }
566 1 1469 unless is_absolute($path)
574 8 178 if (my $touch_file = $self->static_source_touch_file)
575 6 2 unless -f $touch_file
577 2 0 if ($touch_file_lastmod > $$self{'static_source_touch_lastmod'})
622 0 298 unless my($dir_path, $base_name) = $orig_path =~ m[^(/.*?)/?([^/]+)$]
631 267 199 $path eq '/' ? :
632 47 419 if ((my $index = first_index(sub { $_ eq $orig_path; } , @candidate_paths)) != -1)
636 74 742 if ($self->comp_exists($candidate_path))
640 224 168 if ($path eq '/')
649 13 231 if (exists $$flags{'extends'})
651 11 2 if (defined $extends) { }
652 2 9 if substr($extends, 0, 1) ne '/'
654 1 2 unless $parent_compc = $self->load($extends)
666 0 244 unless open my $fh, '<', $object_file
668 13 231 if (my($flags_str) = $line =~ /\# FLAGS: (.*)/)
691 342 939 if -f $source_file
704 0 17 @{$self->comp_root;} > 1 ? :
757 0 624 unless my($base_class) = grep({can_load($_);} @candidates)