Branch Coverage

blib/lib/Config/Perl.pm
Criterion Covered Total %
branch 183 222 82.4


line true false branch
229 70 0 $self->{'ptr'} ? :
233 3229 0 unless $self->{'debug'}
234 0 0 $self->{'ptr'} ? :
235 0 0 $self->{'ptr'} ? :
243 94 2 defined $out ? :
250 44 110 if ref $input eq 'SCALAR' and not $$input =~ /;\s*$/
253 1 153 unless $doc
254 2 151 unless $doc->complete
259 16 133 unless ref $rv
261 20 113 if @rv
272 151 7 if ($param{'outer'}) { }
273 0 151 unless $block->isa('PPI::Document')
275 7 0 if ($block->isa('PPI::Token::Word') and $block->literal eq 'do')
277 0 7 unless $block->isa('PPI::Structure::Block')
283 203 156 $stmt->snext_sibling ? :
285 4 0 if ($stmt->isa('PPI::Statement::Compound') and $stmt->schildren == 1 and $stmt->schild(0)->isa('PPI::Token::Label'))
290 349 6 $param{'outer'} ? :
309 45 if (ref(my $rv1 = $self->_handle_assignment($param{'outer'} ? ('outer', 1) : ()))) { }
41 4 elsif ($stmt->class eq 'PPI::Statement') { }
292 0 308 if ($self->{'ptr'} and !$self->{'ptr'}->isa('PPI::Token::Structure') || !$self->{'ptr'}->content eq ';' || $self->{'ptr'}->snext_sibling)
294 111 197 unless $self->{'ctx'} eq 'scalar-void'
300 0 23 if ref $rv2 and $self->{'ptr'} and !$self->{'ptr'}->isa('PPI::Token::Structure') || !$self->{'ptr'}->content eq ';' || $self->{'ptr'}->snext_sibling
301 28 12 if (ref $rv2) { }
303 3 25 if ($self->{'ctx'} eq 'scalar-void') { }
304 2 1 if &$rv2()
309 12 0 $param{'outer'} ? :
331 69 286 if ($as and $as->class eq 'PPI::Statement::Variable') { }
333 1 68 unless $as->type eq 'our' or $as->type eq 'my'
336 1 1 unless $as->type eq 'our' or $as->type eq 'my' and $param{'outer'}
341 26 260 if not $as or $as->class ne 'PPI::Statement' or $as->schildren < 3
349 312 15 if ($self->{'ptr'}->isa('PPI::Token::Symbol')) { }
9 6 elsif ($self->{'ptr'}->isa('PPI::Structure::List')) { }
351 5 306 unless ref $sym
359 1 8 unless ref $l
366 4 310 unless $self->{'ptr'}->isa('PPI::Token::Operator') and $self->{'ptr'}->content eq '='
370 262 48 $lhs_scalar ? :
372 1 309 unless ref $rv
378 1 314 if (not defined $l) { }
272 42 elsif ($l->{'atype'} eq '$') { }
27 15 elsif ($l->{'atype'} eq '@') { }
15 0 elsif ($l->{'atype'} eq '%') { }
383 25 2 if (not defined ${$$l{'ref'};}) { }
390 13 2 if (not defined ${$$l{'ref'};}) { }
414 0 147 unless $outerlist->isa('PPI::Structure::List') or $outerlist->isa('PPI::Structure::Constructor')
417 0 147 if wantarray
419 0 147 if $param{'is_lhs'} and not $outerlist->isa('PPI::Structure::List')
420 9 138 $param{'is_lhs'} ? :
421 20 127 unless ($outerlist->schildren)
427 0 127 unless $outerlist->schildren == 1 and $act_list->isa('PPI::Statement::Expression') || $act_list->class eq 'PPI::Statement'
435 353 228 if ($expect eq 'item') { }
228 0 elsif ($expect eq 'separator') { }
438 15 338 if ($param{'is_lhs'}) { }
439 13 2 if ($self->{'ptr'}->isa('PPI::Token::Symbol')) { }
1 1 elsif (not $fat_comma_next and $self->{'ptr'}->isa('PPI::Token::Word') and $self->{'ptr'}->literal eq 'undef') { }
441 0 13 unless ref $sym
455 29 309 if ($fat_comma_next and $self->{'ptr'}->isa('PPI::Token::Word') and $self->{'ptr'}->literal =~ /^\w+$/) { }
464 0 309 unless ref $val
466 7 302 if $self->{'ctx'} =~ /^scalar\b/
474 0 228 unless $self->{'ptr'}->isa('PPI::Token::Operator') and $self->{'ptr'}->content eq ',' || $self->{'ptr'}->content eq '=>'
484 3 123 if not $param{'is_lhs'} and $self->{'ctx'} =~ /^scalar\b/
498 0 367 unless $sym and $sym->isa('PPI::Token::Symbol')
503 25 342 if ($temp_ptr and $temp_ptr->isa('PPI::Structure::Subscript')) { }
505 6 18 unless ref $ss
507 11 7 if ($sym->raw_type eq '$' and $sym->symbol_type eq '@' and $ss->{'braces'} eq '[]') { }
3 4 elsif ($sym->raw_type eq '$' and $sym->symbol_type eq '%' and $ss->{'braces'} eq '{}') { }
523 25 400 if ($temp_ptr and $temp_ptr->isa('PPI::Token::Operator') and $temp_ptr->content eq '->') { }
44 356 elsif ($temp_ptr and $temp_ptr->isa('PPI::Structure::Subscript')) { }
530 0 44 unless ref $ss
531 23 21 if ($ss->{'braces'} eq '[]') { }
21 0 elsif ($ss->{'braces'} eq '{}') { }
533 0 23 unless ref ${$rsym{'ref'};} eq 'ARRAY'
538 0 21 unless ref ${$rsym{'ref'};} eq 'HASH'
560 0 69 unless $subscr->isa('PPI::Structure::Subscript')
563 0 69 unless @sub_ch == 1 and $sub_ch[0]->isa('PPI::Statement::Expression')
566 6 63 unless @subs == 1
570 8 55 if ($subscr->braces eq '{}' and $subs[0]->isa('PPI::Token::Word')) { }
576 0 54 unless ref $v
590 0 715 unless $val
591 227 488 if ($val->isa('PPI::Token::Number')) { }
1 487 elsif ($val->isa('PPI::Token::Word') and $val->literal eq 'undef') { }
4 483 elsif ($val->isa('PPI::Token::Word') and $val->literal =~ /^-\w+$/) { }
268 215 elsif ($val->isa('PPI::Token::Quote')) { }
42 173 elsif ($val->isa('PPI::Token::Symbol')) { }
100 73 elsif ($val->isa('PPI::Structure::Constructor')) { }
7 66 elsif ($val->isa('PPI::Token::Word') and $val->literal eq 'do' and $val->snext_sibling and $val->snext_sibling->isa('PPI::Structure::Block')) { }
38 28 elsif ($val->isa('PPI::Structure::List')) { }
25 3 elsif ($val->isa('PPI::Token::QuoteLike::Words')) { }
611 162 106 if ($val->isa('PPI::Token::Quote::Single') or $val->isa('PPI::Token::Quote::Literal')) { }
106 0 elsif ($val->isa('PPI::Token::Quote::Double') or $val->isa('PPI::Token::Quote::Interpolate')) { }
617 1 105 if $str =~ /\$$/
621 1 104 if $str =~ /(?
634 5 37 unless ref $sym
636 24 13 if ($sym->{'atype'} eq '$') { }
6 7 elsif ($sym->{'atype'} eq '@') { }
6 1 elsif ($sym->{'atype'} eq '%') { }
642 0 4 unless wantarray
644 2 4 $self->{'ctx'} =~ /^scalar\b/ ? :
648 0 3 unless wantarray
650 1 5 $self->{'ctx'} =~ /^scalar\b/ ? :
656 0 100 unless ref $l
658 41 59 if ($val->braces eq '[]') { }
59 0 elsif ($val->braces eq '{}') { }
671 0 38 unless ref $l
675 0 33 unless wantarray
677 5 33 $self->{'ctx'} =~ /^scalar\b/ ? :
684 0 24 unless wantarray
686 1 24 $self->{'ctx'} =~ /^scalar\b/ ? :
693 5 14 if $what =~ /^[0-7]{1,3}$/
694 1 13 if $what =~ /^x([0-9A-Fa-f]{2})$/
695 12 1 if exists $_backsl_tbl{$what}
702 10 2 if exists $self->{'out'}{$var} and defined $self->{'out'}{$var}