Branch Coverage

blib/lib/PLS/Parser/Index.pm
Criterion Covered Total %
branch 16 106 15.0


line true false branch
38 79 7 if ref $self eq "PLS::Parser::Index"
93 0 0 if ref $text ne "SCALAR"
107 5 0 if (ref $function ne "IO::Async::Function")
115 0 5 if (scalar @uris) { }
139 0 4 length $version ? :
146 0 0 if length $version and length $current_version and $current_version < $version
149 0 4 if $self->is_ignored($file)
151 0 4 if -l $file
152 0 4 if $self->is_ignored($file)
169 28 0 if length $sub->{'package'}
188 5 0 unless scalar @folders
189 0 5 unless scalar @folders
193 5 0 if (ref $function ne "IO::Async::Function")
211 0 0 unless path($path)->subsumes($file)
240 4 0 if ref $self->files->{$file}{'subs'} ne "ARRAY"
241 4 0 if ref $self->files->{$file}{'packages'} ne "ARRAY"
246 0 0 unless scalar @{$self->subs->{$ref};}
256 0 0 if ($package->{'uri'} eq 'URI::file'->new($file)->as_string) { }
266 0 0 unless scalar @{$self->packages->{$ref};}
280 0 0 if (ref $locations ne "ARRAY")
284 0 0 if ref $external eq "HASH"
303 0 0 unless ref $found eq "ARRAY"
307 0 0 if scalar @uris
318 0 0 if (ref $found ne "ARRAY")
322 0 0 if ref $external eq "HASH"
336 8 0 unless -f $plsignore and -r $plsignore
339 0 0 if length $self->{'ignore_files_mtimes'}{$plsignore} and $self->{'ignore_file_mtimes'}{$plsignore} >= $mtime
341 0 0 unless open my $fh, "<", $plsignore
362 0 0 if ref $self->packages ne "HASH"
370 0 0 if ref $self->subs_by_package ne "HASH"
390 8 0 unless scalar @ignore_files
394 0 0 if &any(sub {
395 0 0 if &any(sub {
404 0 0 unless scalar @folders
405 0 0 unless scalar @folders
412 0 0 if $self->is_ignored($File::Find::dir)
416 0 0 unless $self->is_perl_file($File::Find::name)
420 0 0 if &any(sub {
435 0 0 if -l $file
436 0 0 unless -f $file
437 0 0 if &any(sub {
438 0 0 if $file =~ /\.t$/
440 0 0 if $file =~ /\.p[lm]$/
441 0 0 unless open my $fh, "<", $file
444 0 0 if length $first_line and $first_line =~ /^\s*#!.*perl$/
480 0 0 $i + 1 <= $#{$line_offsets;} ? :
482 0 0 if ($current_offset <= $offset and !defined($next_offset) || $next_offset > $offset)
499 0 0 if -l $file
540 0 0 if -l $file
599 0 0 if (length $+{'params'})
614 0 0 if (substr($$text, 0, pos $$text) =~ /$package_rx/)
652 0 0 if (substr($$text, 0, pos $$text) =~ /$package_rx/)
704 0 0 if (substr($$text, 0, pos $$text) =~ /$package_rx/)