Branch Coverage

blib/lib/HTML/Mason/Compiler.pm
Criterion Covered Total %
branch 102 132 77.2


line true false branch
67 0 30 if (defined $DB::sub) { }
95 391 0 if defined $self->{'default_escape_flags'}
135 0 12 if (my(@bad) = grep({not /^[\$\@%]/;} @globals))
148 5 917 if (@_)
151 0 5 if @_ == 1 and not defined $_[0]
162 22 391 unless @_
166 0 391 unless (defined $flags)
173 4 387 unless (ref $flags)
175 4 0 if ($flags =~ /^[hu]+$/) { }
196 517 30 ref $p{'comp_source'} ? :
211 1 546 if ($self->preprocess)
214 0 1 if $@
219 502 28 exists $p{'fh'} ? :
265 2 545 if @{$c->{'comp_with_content_stack'};}
275 0 265 if $top_level_only_block{$p{'block_type'}} and not $c->{'in_main'}
278 0 265 if $c->{'in_block'}
291 1 162 if $self->postprocess_perl
292 0 163 if $@
295 34 129 if $self->can($method)
298 129 0 if ($self->lexer->line_number and $self->use_source_line_numbers)
326 2 1131 ref $p{'text'} ? :
328 5 1128 if $self->postprocess_text
329 0 1133 if $@
333 1115 18 if ($self->enable_autoflush) { }
356 0 263 unless $c->{'in_block'} eq $p{'block_type'}
367 0 85 unless $p{'block_type'} eq 'args'
372 0 85 if grep {"$_->{'type'}$_->{'name'}" eq $arg;} @{$$self{'current_compile'}{'args'};}
388 0 62 unless $p{'block_type'} eq 'flags' or $p{'block_type'} eq 'attr'
390 19 43 $p{'block_type'} eq 'flags' ? :
392 0 62 if exists $self->{'current_compile'}{$p{'block_type'}}{$p{'key'}}
406 0 119 unless $c->{'in_main'}
410 2 117 if $p{'name'} =~ /[^.\w-]/
416 1 1 $p{'block_type'} eq 'def' ? :
2 115 if exists $$c{$p{'block_type'}}{$p{'name'}}
419 57 58 $p{'block_type'} eq 'def' ? :
422 1 114 if exists $c->{$other_type}{$p{'name'}}
458 4 383 unless (grep {/^\s*[^\s\#]/;} @lines)
463 29 354 if (exists $p{'escape'} and defined $p{'escape'} or @{$self->{'default_escape_flags'};})
468 22 7 if (defined $p{'escape'})
472 14 8 if ($p{'escape'} =~ /$old_escape_re/) { }
486 22 7 unless grep {$_ eq 'n';} @flags
491 8 24 $seen{$_}++ ? :
495 24 5 if $flags
503 375 8 if ($self->enable_autoflush) { }
513 3 380 if $self->postprocess_perl
514 0 383 if $@
527 203 13 if ($call =~ m[^[\w/.]])
530 154 49 if $comma == -1
535 0 216 if $self->postprocess_perl
536 0 216 if $@
556 0 39 if $self->postprocess_perl
557 0 39 if $@
571 2 37 unless @{$c->{'comp_with_content_stack'};}
578 33 4 if ($call =~ m[^[\w/.]])
581 26 7 if $comma == -1
585 7 30 if ($call_end)
586 2 5 unless ($call_end =~ m[^[\w/.]])
589 1 4 unless (defined $comp)
592 1 3 if ($call_end ne $comp)
599 0 33 if $self->postprocess_perl
600 0 33 if $@
614 1 394 if $self->postprocess_perl
615 0 395 if $@
631 1926 307 if ($self->lexer->line_number and $self->{'current_compile'}{'last_body_code_type'} ne 'perl_line' and $self->use_source_line_numbers)
681 0 0 if (@{$data->{'args'};})
687 0 0 if defined $_->{'default'}