Branch Coverage

blib/lib/Mason/Tidy.pm
Criterion Covered Total %
branch 53 56 94.6


line true false branch
31 0 67 unless $_[0] =~ /^[12]$/
71 4 74 unless $source =~ /\S/
96 35 39 if @lines and $lines[-1] eq ''
109 4 187 if ($mason2 and $line =~ /^%\s*(.*)\{\{\s*/)
116 4 183 if ($mason2 and $line =~ /^%\s*\}\}\s*/)
123 71 112 if ($line =~ /^%/)
130 13 99 if ($line =~ /^\s*<%perl>\s*$/)
133 12 1 if ($end_line)
152 118 124 $$_[0] eq 'perl_line' ? :
167 2 71 unless @tidied_lines
172 124 117 if (my $marker = $self->marker_in_line($line)) { }
175 12 112 if ($type eq 'begin_perl_block') { }
12 100 elsif ($type eq 'end_perl_block') { }
185 114 3 if ($mason2)
191 39 78 if ($perl_block_mode) { }
192 28 11 $line =~ /\S/ ? :
197 66 12 $line =~ /\S/ ? :
203 35 38 $final_newline ? :
215 1 24 if length $preceding > 0 and substr($preceding, 0, 1) eq '%'
217 23 1 if ($final =~ m[(\n?[\t ]*</%$block_type>)]g) { }
236 0 23 unless ($actual eq $untidied_block_contents)
258 4 3 if (($path) = $expr =~ m[^(\s*[\w/\.][^,]+)])
266 4 3 if ($path)
273 11 12 if ($self->_is_code_block->{$block_type} or $block_type eq 'filter' and not defined $block_args) { }
10 4 elsif ($self->_is_mixed_block->{$block_type} or $block_type eq 'filter' and defined $block_args) { }
306 124 117 if (my($marker) = $line =~ /\s*_LINE_(${marker_prefix}_\d+)/)
327 1 176 if $errorfile
337 0 73 unless my($indent) = $destination =~ /^(\s*)foo/m