Branch Coverage

blib/lib/Test/Inline/Section.pm
Criterion Covered Total %
branch 41 58 70.6


line true false branch
132 57 0 $_[0] =~ /^(?:$RE_begin|$RE_example)\b/ ? :
140 1 56 if ($pod =~ /^$RE_example\b/)
147 0 56 if $begin
152 56 0 if (@lines and $lines[-1] =~ /^=end\s+(?:test|testing)\b/o)
158 1 55 unless $class->_check_nesting(\@lines, $begin)
181 148 43 unless $parts[$i] =~ /^(0|[1-9]\d*)$/
187 0 27 if (@parts == 2 and $parts[0] eq 'test' and $parts[1] eq 'setup')
190 9 37 if (@parts >= 2 and $parts[0] eq 'testing' and $parts[1] eq 'SETUP')
195 0 55 if ($parts[0] eq 'test' and not $self->{'setup'})
205 9 46 unless @parts
208 0 46 if (grep {not /^[\w:]+$/;} @parts)
214 9 37 if ($self->{'setup'}) { }
218 0 37 unless ($self->{'name'} =~ /^[^\W\d]\w*$/)
222 27 19 unless @parts
225 0 19 unless (shift @parts eq 'after')
234 26 2 if ($part =~ /^[^\W\d]\w*$/) { }
2 0 elsif ($part =~ /::/) { }
235 0 26 if ($self->setup)
259 0 1 if $begin
264 1 0 if (@lines and $lines[-1] =~ /^=for\s+example\s+end\b/o)
270 0 1 unless $class->_check_nesting(\@lines, $begin)
298 0 2 if (length $string > 30)
313 1 56 if ($bad_line)
357 0 17 unless my $elements = &_ARRAY(shift())
363 21 50 if ($element =~ /^package\s+([\w:']+)/)
369 0 50 unless ($element =~ /^=/)
374 1 49 unless my $Section = 'Test::Inline::Section'->new($element, $context)
378 16 0 @Sections ? :
431 347 138 if defined $_[0]{'name'}