Branch Coverage

blib/lib/Pod/Classdoc.pm
Criterion Covered Total %
branch 151 260 58.0


line true false branch
146 1 0 unless $path eq '/'
176 0 1 if ref $txt
183 1 0 if ($txt =~ /\n\s*((my|our|local)\s+)?\$[\w\:\']*?\bVERSION\s*?\=([^;]+?);/)
196 0 1 unless my $Document = 'PPI::Document'->new(\$txt)
199 0 1 unless my $Finder = 'PPI::Find'->new(sub { $self->_wanted(@_); } )
201 0 1 unless $Finder->start($Document)
205 1 0 if $$self{'_currpod'}
210 1 0 if $$self{'_currpkg'}
212 0 1 if $$self{'_nosubs'} and $$self{'_verbose'}
215 0 1 if ($$self{'_verbose'} > 1)
248 0 0 $pkg ? :
250 0 0 if $pkg
251 0 0 unless CORE::open INF, $file
285 0 0 if $$self{'_verbose'}
290 0 0 unless (opendir PATH, $path)
291 0 0 if $$self{'_verbose'}
306 0 0 unless $self->open($_)
316 38 1 $currpod ? :
319 37 2 if ($currsub)
324 2 35 if (not $currpod or $currpod =~ /\n\s*\@xs\s+/) { }
325 1 1 if $currpod
337 62 0 if (s/\n\s*\@xs\s+([\w\:]+)[ \t\r]*\n/\n/s) { }
353 0 99 if (@parts > 1)
357 0 99 unless exists $$packages{$currpkg}
365 0 99 if (exists $$packages{$currpkg}{'Methods'}{$currsub}) { }
366 0 0 unless $$packages{$currpkg}{'Methods'}{$currsub}{'File'}
383 0 0 if $$self{'_verbose'} > 2 and $token->significant || $token->isa('PPI::Token::Pod')
386 19683 400 if $$self{'_state'} == 0 and not $token->isa('PPI::Token::Pod')
389 42 358 if ($$self{'_state'} == 0) { }
358 0 elsif ($$self{'_state'} == 1) { }
391 0 42 unless $content =~ /\n=begin\s+classdoc[ \r\t]*\n.*?\n=end\s+classdoc[ \r\t]*\n/s
392 0 42 if $$self{'_verbose'} > 1
402 1 357 if ($token->isa('PPI::Token::Pod')) { }
4 353 elsif ($token->isa('PPI::Statement::Package')) { }
37 316 elsif ($token->isa('PPI::Statement::Sub')) { }
404 0 1 unless $content =~ /\n=begin\s+classdoc[ \r\t]*\n.*?\n=end\s+classdoc[ \r\t]*\n/s
408 0 1 if $$self{'_verbose'} > 1
415 0 4 if $$self{'_verbose'} > 1
421 3 1 if $$self{'_currpkg'}
425 0 4 if (exists $$self{'_classes'}{$$self{'_currpkg'}}) { }
427 0 0 $$self{'_currpod'} && $$self{'_currpod'} =~ /\n=begin\s+classdoc[ \r\t]*\n(.*?)\n=end\s+classdoc[ \r\t]*\n/gs ? :
0 0 unless $$self{'_classes'}{$$self{'_currpkg'}}{'File'}
435 4 0 $$self{'_currpod'} && $$self{'_currpod'} =~ /\n=begin\s+classdoc[ \r\t]*\n(.*?)\n=end\s+classdoc[ \r\t]*\n/gs ? :
445 0 37 unless $$self{'_currpkg'}
448 0 37 if $$self{'_verbose'} > 1
466 3 1 defined $end ? :
504 2 1 unless $path
505 1 0 unless $path eq '/'
553 0 32 if exists $$classes{$_}{'InheritsFrom'}{$class}
562 8 0 if ($$classes{$class}{'Description'}) { }
0 0 elsif ($$self{'_verbose'} > 1) { }
570 194 4 if ($$info{'Description'}) { }
0 4 elsif ($$self{'_verbose'} > 1) { }
625 0 1 unless CORE::open OUTF, ">$path/$container"
655 2 0 $home ? :
692 0 1 unless CORE::open OUTF, ">$path/toc.html"
734 8 0 unless exists $ordered{$_}
741 0 8 unless exists $$self{'_classes'}{$class}
752 2 6 if (exists $$info{'exports'} and @{$$info{'exports'};})
761 0 8 if (exists $$info{'imports'} and @{$$info{'imports'};})
770 8 0 if (exists $$info{'member'} and @{$$info{'member'};})
779 0 8 if (exists $$info{'constructors'} and %{$$info{'constructors'};})
787 8 0 if (exists $$info{'Methods'} and %{$$info{'Methods'};})
836 0 1 unless my $classdocs = $self->render($use_private)
843 0 4 unless CORE::open OUTF, ">$fname"
877 1 3 unless -d $dir
887 6 2 @parts ? :
932 2 6 if scalar @bases
952 0 8 if scalar @bases
967 0 0 $$info{'deprecated'} ne '1' ? :
0 8 if $$info{'deprecated'}
972 8 0 if $$info{'Description'}
981 2 6 if $$info{'author'}
987 0 8 if $$info{'Version'}
993 2 6 if $$info{'since'}
999 2 6 if $$info{'see'}
1005 0 8 if $$info{'instance'}
1011 0 8 if $$info{'self'}
1020 0 8 if $$info{'imports'}
1032 2 6 if $$info{'exports'}
1044 8 0 if $$info{'member'}
1058 198 0 unless not $use_private and substr($sub, 0, 1) eq '_' and not $$methodinfo{'constructor'}
1075 198 0 unless exists $$info{'Methods'}{$_}{'constructor'}
1076 0 0 unless $anchored
1082 0 0 unless $constructor
1094 0 0 if ($$constructor{'deprecated'}) { }
0 0 elsif ($$constructor{'Description'}) { }
1095 0 0 $$constructor{'deprecated'} ne '1' ? :
1102 0 0 $descr =~ /^\s*Constructor\.\s*(.*)$/s ? :
1111 0 8 if ($constructor) { }
1123 8 0 if ($methcount) { }
1135 2 196 if ($$method{'deprecated'}) { }
192 4 elsif ($$method{'Description'}) { }
1136 2 0 $$method{'deprecated'} ne '1' ? :
1142 14 178 $$method{'static'} ? :
1160 0 8 if (keys %constructors)
1185 0 0 if $$method{'param'}
1188 0 0 if $returns
1191 0 0 if $$method{'since'}
1194 0 0 if $$method{'see'}
1202 8 0 if ($methcount)
1214 14 184 $$method{'static'} ? :
1228 0 198 if ($$method{'simplex'}) { }
0 198 elsif ($$method{'urgent'}) { }
1229 0 0 $$method{'urgent'} ? :
1237 144 54 if $$method{'param'}
1240 152 46 if ($returns)
1241 12 140 $returnlist ? :
1246 12 14 $returns ? :
26 172 if $returnlist
1251 42 156 if $$method{'since'}
1254 82 116 if $$method{'see'}
1300 1 42 $1 eq 'package' ? :
1301 1 42 $1 eq 'package' ? :
1314 4641 455 unless /^\@(\w+)(\s+(.*))?$/ and $$validtags{$1}
1319 272 183 if ($tag eq 'param' or $tag eq 'optional' or $tag eq 'exports' or $tag eq 'imports' or $tag eq 'member') { }
28 155 elsif ($tag eq 'see') { }
1321 65 207 if $tag eq 'optional'
1330 1 154 if $sep ne "\n"
1335 397 58 $$validtags{$tag} == 1 ? :
1341 6 196 if ($tag eq 'param' or $tag eq 'optional' or $tag eq 'exports' or $tag eq 'imports' or $tag eq 'member') { }
29 167 elsif ($tag eq 'see') { }
1343 1 5 if $tag eq 'optional'
1352 0 167 if $sep ne "\n"
1363 688 4 $t =~ /^[\\]?[\$\%\@\*\&]/ ? :
1368 288 108 if length $p > 1
1381 344 2 $t =~ /^[\\]?[\$\%\@\*\&]/ ? :
1401 0 0 unless opendir PATH, $path
1412 0 0 if $_ ne '.' and $_ ne '..' and -d "$path/$_"
1426 10 6 if $1 eq '.' or $1 eq '?' or $1 eq '!'