Condition Coverage

blib/lib/PPIx/EditorTools.pm
Criterion Covered Total %
condition 52 93 55.9


and 3 conditions

line !l l&&!r l&&r condition
26 41 0 10 $self->ppi and $self->ppi->isa('PPI::Document')
32 1 0 40 $self->ppi and $self->ppi->isa('PPI::Document')
48 0 2 1 $_[1]->start and $_[1]->finish
88 2 1 0 $decl->isa('PPI::Statement::Include') and $decl->module eq 'vars'
3 0 0 $decl->isa('PPI::Statement::Include') and $decl->module eq 'vars' and $decl->type eq 'use'
1 2 0 $decl->isa('PPI::Statement::Compound') and $decl->type eq 'for' || $decl->type eq 'foreach'
136 0 2 0 $elems[4]->isa('PPI::Token::Symbol') and $type eq 'my' || $type eq 'our'
186 0 1 16 defined $document and $document->isa('PPI::Document')
1 0 16 defined $document and $document->isa('PPI::Document') and defined $location
0 0 16 defined $document and $document->isa('PPI::Document') and defined $location and ref $location eq 'ARRAY'
199 565 75 16 $loc->[0] == $location->[0] and $loc->[1] > $location->[1]
218 0 0 10 $cursor and $cursor->isa('PPI::Token')
246 4 0 0 $cursor->parent->isa('PPI::Statement::Expression') and $cursor->parent->parent->parent->isa('PPI::Statement::Variable')
255 4 0 2 $cursor->isa('PPI::Statement::Compound') and $cursor->type =~ /^for/
263 37 2 4 $elem->isa('PPI::Statement::Variable') and grep {$_ eq $varname;} $elem->variables
37 2 0 $elem->isa('PPI::Statement::Include') and $elem->module eq 'vars'
39 0 0 $elem->isa('PPI::Statement::Include') and $elem->module eq 'vars' and $elem->type eq 'use'
300 12 2 2 $elem->isa('PPI::Token::Word') and $elem->content =~ /^(?:my|our)$/
304 0 0 2 defined $nelem and $nelem->isa('PPI::Token::Symbol')
0 2 0 defined $nelem and $nelem->isa('PPI::Token::Symbol') and $nelem->symbol eq $varname || $nelem->content eq $token_str

or 2 conditions

line l !l condition
104 0 0 $target_type->{$var} ||= []
121 0 0 $package{$var} ||= []
149 0 2 $target_type->{$var} ||= []

or 3 conditions

line l !l&&r !l&&!r condition
75 0 1 54 $_[1]->isa('PPI::Statement::Variable') or $_[1]->isa('PPI::Statement::Include')
1 2 52 $_[1]->isa('PPI::Statement::Variable') or $_[1]->isa('PPI::Statement::Include') or $_[1]->isa('PPI::Statement::Compound')
88 0 2 0 $decl->type eq 'for' || $decl->type eq 'foreach'
136 2 0 0 $type eq 'my' || $type eq 'our'
199 0 16 640 $loc->[0] > $location->[0] or $loc->[0] == $location->[0] and $loc->[1] > $location->[1]
255 5 1 6 $cursor->isa('PPI::Structure::Block') or $cursor == $document
286 4 0 2 $declaration or $cursor == $document
304 0 0 2 $nelem->symbol eq $varname || $nelem->content eq $token_str
313 0 0 2 $declaration or $cursor == $document