Condition Coverage

blib/lib/PPIx/EditorTools.pm
Criterion Covered Total %
condition 50 93 53.7


and 3 conditions

line !l l&&!r l&&r condition
52 41 0 10 $self->ppi and $self->ppi->isa('PPI::Document')
58 1 0 40 $self->ppi and $self->ppi->isa('PPI::Document')
74 0 2 1 $_[1]->start and $_[1]->finish
115 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'
163 0 2 0 $elems[4]->isa('PPI::Token::Symbol') and $type eq 'my' || $type eq 'our'
213 0 17 0 defined $document and $document->isa('PPI::Document')
1 16 0 defined $document and $document->isa('PPI::Document') and defined $location
0 16 0 defined $document and $document->isa('PPI::Document') and defined $location and ref $location eq 'ARRAY'
226 565 75 16 $$loc[0] == $$location[0] and $$loc[1] > $$location[1]
245 0 10 0 $cursor and $cursor->isa('PPI::Token')
273 4 0 0 $cursor->parent->isa('PPI::Statement::Expression') and $cursor->parent->parent->parent->isa('PPI::Statement::Variable')
282 4 0 2 $cursor->isa('PPI::Statement::Compound') and $cursor->type =~ /^for/
290 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'
327 12 2 2 $elem->isa('PPI::Token::Word') and $elem->content =~ /^(?:my|our)$/
331 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
131 0 0 $$target_type{$var} ||= []
148 0 0 $package{$var} ||= []
176 0 2 $$target_type{$var} ||= []

or 3 conditions

line l !l&&r !l&&!r condition
102 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')
115 0 2 0 $decl->type eq 'for' || $decl->type eq 'foreach'
163 2 0 0 $type eq 'my' || $type eq 'our'
226 0 0 656 $$loc[0] > $$location[0] or $$loc[0] == $$location[0] and $$loc[1] > $$location[1]
282 5 1 6 $cursor->isa('PPI::Structure::Block') or $cursor == $document
313 4 0 2 $declaration or $cursor == $document
331 0 0 2 $nelem->symbol eq $varname || $nelem->content eq $token_str
340 0 0 2 $declaration or $cursor == $document