Branch Coverage

lib/Pod/Simple/PullParser.pm
Criterion Covered Total %
branch 76 102 74.5


line true false branch
14 10 0 unless defined &Pod::Simple::PullParser::DEBUG
28 0 0 unless ref $self
30 0 0 unless defined $source
57 0 0 if ('Pod::Simple::PullParser' eq ref $_[0] or $_[0]) { }
84 0 89 unless $self
112 79 508 if ($self->{'source_dead'}) { }
23 485 elsif (exists $self->{'source_fh'}) { }
2 483 elsif (exists $self->{'source_arrayref'}) { }
483 0 elsif (exists $self->{'source_scalar_ref'}) { }
128 17 281 unless (defined $lines[-1])
164 2 0 unless (@{$self->{'source_arrayref'};})
179 427 56 if (${$self->{'source_scalar_ref'};} =~ /([^\n\r]*)((?:\r?\n)?)/g) { }
186 156 56 if length $1 or length $2 or pos ${$$self{'source_scalar_ref'};} != length ${$self->{'source_scalar_ref'};}
212 0 656 unless defined $t
214 0 656 unless ref $t
216 0 656 unless UNIVERSAL::can($t, 'type')
232 0 90 unless @_
234 1 89 if $self->{'source_fh'} or $self->{'source_scalar_ref'} or $self->{'source_arrayref'}
236 0 89 if (not defined $_[0]) { }
1 88 elsif (ref \$_[0] eq 'GLOB') { }
70 18 elsif (ref $_[0] eq 'SCALAR') { }
2 16 elsif (ref $_[0] eq 'ARRAY') { }
2 14 elsif (ref $_[0]) { }
0 14 elsif (not length $_[0]) { }
259 0 14 unless open PODSOURCE, "<$_[0]"
279 13 8 if $title =~ /^(\S{1,60})\s+--?\s+./s
308 1 1 unless $this->_get_titled_section('AUTHOR', 'max_token', 10000, @_)
323 42 10 unless defined $max_content_length
325 0 0 1 == keys %options ? :
0 52 if keys %options
332 3 49 if ($accept_verbatim)
343 0 52 unless defined $titlename and $titlename =~ /^[A-Z ]{1,60}$/s
357 276 287 if ($state == 0) { }
131 156 elsif ($state == 1) { }
36 120 elsif ($state == 2) { }
120 0 elsif ($state == 3) { }
358 62 214 if ($token->is_start and $token->tagname eq 'head1')
366 65 66 if ($token->is_text) { }
2 64 elsif ($token->is_tagname('X')) { }
62 3 elsif ($token->is_end and $token->tagname eq 'head1') { }
367 64 1 unless ($skipX)
377 1 61 if $nocase
378 6 0 $max_content_length ? :
36 26 if ($head1_text_content eq $titlename or $head1_text_content =~ /\($titlename_re\)/s) { }
6 20 elsif ($desperate_for_title and $head1_text_content =~ /\S/ and not $head1_text_content =~ /^[ A-Z]+$/s and not $head1_text_content =~ /\((?: NAME | TITLE | VERSION | AUTHORS? | DESCRIPTION | SYNOPSIS | COPYRIGHT | LICENSE | NOTES? | FUNCTIONS? | METHODS? | CAVEATS? | BUGS? | SEE\ ALSO | SWITCHES | ENVIRONMENT )\)/sx and $max_content_length ? length $head1_text_content <= $max_content_length : 1) { }
415 36 0 if ($token->is_start and $content_containers{$token->tagname}) { }
428 60 60 if ($token->is_text) { }
36 36 elsif ($token->is_end and $content_containers{$token->tagname}) { }
437 36 0 $max_content_length ? :
36 0 if ($para_text_content =~ /\S/ and $max_content_length ? length $para_text_content <= $max_content_length : 1) { }
468 10 42 unless defined $title