Coverage Summary

# Branch Coverage

lib/Devel/PerlySense/Document.pm
Criterion | Covered | Total | %
--- | --- | --- | ---
branch | 90 | 106 | 84.9

line | true | false | branch
--- | --- | --- | ---
170 | 0 | 517 | unless my $file = $self->file
199 | 9 | 327 | if (my $oDocument = $self->cacheGet($keyCache, $file)) { }
210 | 9 | 325 | if (my $oMeta = $self->cacheGet($keyCache, $file)) { }
238 | 2 | 325 | unless my $oDocument = 'PPI::Document'->new($file)
276 | 180 | 4 | if not $hStop{$_}
333 | 2 | 23 | unless $row > 0
335 | 23 | 0 | if $_->namespace
337 | 4 | 19 | unless my(@aPackage) = grep({$_->location->[0] <= $row if $_->namespace;} @{$self->oMeta->raPackage;})
366 | 4 | 12 | if $self->oMeta->moduleAt('row', $row, 'col', $col)
367 | 1 | 11 | if $self->oMeta->rhMethodAt('row', $row, 'col', $col)
416 | 32 | 40 | unless my $rhMethod = $self->oMeta->rhMethodAt('row', $row, 'col', $col)
419 | 32 | 8 | if wantarray
420 | 7 | 1 | defined $oObject ? :
440 | 10 | 13 | unless $method
441 | 9 | 4 | unless $object and $object eq '$self'
464 | 10 | 12 | unless $module and $method
465 | 5 | 7 | if $module =~ /[^\w:]/
467 | 5 | 2 | if wantarray
490 | 10 | 7 | unless $oObject and $oMethod
491 | 0 | 7 | unless $oObject =~ /^\$\w+$/
493 | 0 | 7 | unless my $oLocationSub = $self->oLocationEnclosingSub($oMethod)
544 | 15 | 113 | if ($oLocation->rhProperty->{'nameSub'} eq $name and $oLocation->rhProperty->{'namePackage'} eq $package)
574 | 2 | 111 | if ($row >= $oLocation->row and $row <= $oLocation->rhProperty->{'oLocationEnd'}->row)
610 | 11 | 7 | unless ($package)
611 | 10 | 1 | if ($row) { }
612 | 0 | 10 | unless $package = $self->packageAt('row', $row)
622 | 12 | 6 | if $oLocation
626 | 4 | 2 | if $oLocation
630 | 0 | 2 | unless my $oDocumentBase = $self->oPerlySense->oDocumentFindModule('nameModule', $moduleBase, 'dirOrigin', dirname($self->file))
635 | 2 | 0 | if $oLocation
678 | 0 | 194 | unless $lookFor eq 'method'
685 | 87 | 2766 | if ($oLocationCur->rhProperty->{'pod'} =~ /^= \w+ \s+ [^\n]*? \b $rexName \b /x)
692 | 2 | 85 | if $pod =~ /^=item\s/
700 | 3 | 104 | if $ignoreBaseModules
704 | 1 | 97 | unless my $oDocumentBase = $self->oPerlySense->oDocumentFindModule('nameModule', $moduleBase, 'dirOrigin', dirname($self->file))
708 | 53 | 44 | if (my $oLocation = $oDocumentBase->oLocationPod('name', $name, 'lookFor', $lookFor))
713 | 47 | 6 | unless ($oLocation->rhProperty->{'pod'} =~ /\n=head1 From <[\w:]+>\n$/)
787 | 7 | 59 | if (my $rhPackageApi = $self->cacheGet($keyCache, $self->file)) { }
817 | 59 | 6623 | if ($oNode->isa('PPI::Statement::Package'))
819 | 0 | 59 | if keys %{$oApiCur->rhSub;}
829 | 408 | 6274 | if ($oNode->isa('PPI::Statement::Sub') and not $oNode->forward)
835 | 59 | 0 | if keys %{$oApiCur->rhSub;}
841 | 0 | 20 | unless my $oDocumentBase = $self->oPerlySense->oDocumentFindModule('nameModule', $nameBase, 'dirOrigin', dirname($self->file))
847 | 0 | 20 | if $nameModule eq $nameBase
887 | 0 | 20 | unless my $oApiBase = $$rhPackageApiBase{$nameModuleBase}
890 | 0 | 20 | unless $oApi
926 | 0 | 42 | unless my $oApi = $self->rhPackageApiLikely->{$nameModule}
929 | 30 | 14 | unless $oApi->isSubSupported($method)
988 | 33 | 663 | if (index($match, 'sub') > -1)
989 | 1 | 32 | if index($match, ':') > -1
992 | 76 | 587 | if index($match, '=') > -1
1077 | 327 | 0 | unless my $raList = $oNode->find($what)
1106 | 7 | 78 | if ($row >= $oLocation->row and $row <= $oLocation->rhProperty->{'oLocationEnd'}->row)