Branch Coverage

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


line true false branch
235 90 0 $self->{'ptr'} ? :
239 4298 0 unless $self->{'debug'}
240 0 0 $self->{'ptr'} ? :
241 0 0 $self->{'ptr'} ? :
249 94 2 defined $out ? :
256 40 135 if ref $input eq 'SCALAR' and not $$input =~ /;\s*$/
259 1 174 unless $doc
260 2 172 unless $doc->complete
265 16 154 unless ref $rv
267 40 114 if @rv
278 172 7 if ($param{'outer'}) { }
279 0 172 unless $block->isa('PPI::Document')
281 7 0 if ($block->isa('PPI::Token::Word') and $block->literal eq 'do')
283 0 7 unless $block->isa('PPI::Structure::Block')
289 329 177 $stmt->snext_sibling ? :
291 4 0 if ($stmt->isa('PPI::Statement::Compound') and $stmt->schildren == 1 and $stmt->schild(0)->isa('PPI::Token::Label'))
296 496 6 $param{'outer'} ? :
436 65 if (ref(my $rv1 = $self->_handle_assignment($param{'outer'} ? ('outer', 1) : ()))) { }
61 4 elsif ($stmt->class eq 'PPI::Statement') { }
298 0 435 if ($self->{'ptr'} and !$self->{'ptr'}->isa('PPI::Token::Structure') || !$self->{'ptr'}->content eq ';' || $self->{'ptr'}->snext_sibling)
300 112 323 unless $self->{'ctx'} eq 'scalar-void'
306 0 43 if ref $rv2 and $self->{'ptr'} and !$self->{'ptr'}->isa('PPI::Token::Structure') || !$self->{'ptr'}->content eq ';' || $self->{'ptr'}->snext_sibling
307 48 12 if (ref $rv2) { }
309 3 45 if ($self->{'ctx'} eq 'scalar-void') { }
310 2 1 if &$rv2()
315 12 0 $param{'outer'} ? :
337 69 433 if ($as and $as->class eq 'PPI::Statement::Variable') { }
339 1 68 unless $as->type eq 'our' or $as->type eq 'my'
342 1 1 unless $as->type eq 'our' or $as->type eq 'my' and $param{'outer'}
347 46 387 if not $as or $as->class ne 'PPI::Statement' or $as->schildren < 3
355 439 15 if ($self->{'ptr'}->isa('PPI::Token::Symbol')) { }
9 6 elsif ($self->{'ptr'}->isa('PPI::Structure::List')) { }
357 5 433 unless ref $sym
365 1 8 unless ref $l
372 4 437 unless $self->{'ptr'}->isa('PPI::Token::Operator') and $self->{'ptr'}->content eq '='
376 389 48 $lhs_scalar ? :
378 1 436 unless ref $rv
384 1 441 if (not defined $l) { }
399 42 elsif ($l->{'atype'} eq '$') { }
27 15 elsif ($l->{'atype'} eq '@') { }
15 0 elsif ($l->{'atype'} eq '%') { }
389 25 2 if (not defined ${$$l{'ref'};}) { }
396 13 2 if (not defined ${$$l{'ref'};}) { }
420 0 176 unless $outerlist->isa('PPI::Structure::List') or $outerlist->isa('PPI::Structure::Constructor')
423 0 176 if wantarray
425 0 176 if $param{'is_lhs'} and not $outerlist->isa('PPI::Structure::List')
426 9 167 $param{'is_lhs'} ? :
427 24 152 unless ($outerlist->schildren)
433 0 152 unless $outerlist->schildren == 1 and $act_list->isa('PPI::Statement::Expression') || $act_list->class eq 'PPI::Statement'
441 411 261 if ($expect eq 'item') { }
261 0 elsif ($expect eq 'separator') { }
444 15 396 if ($param{'is_lhs'}) { }
445 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') { }
447 0 13 unless ref $sym
461 32 364 if ($fat_comma_next and $self->{'ptr'}->isa('PPI::Token::Word') and $self->{'ptr'}->literal =~ /^\w+$/) { }
470 0 364 unless ref $val
472 7 357 if $self->{'ctx'} =~ /^scalar\b/
480 0 261 unless $self->{'ptr'}->isa('PPI::Token::Operator') and $self->{'ptr'}->content eq ',' || $self->{'ptr'}->content eq '=>'
490 3 148 if not $param{'is_lhs'} and $self->{'ctx'} =~ /^scalar\b/
504 0 500 unless $sym and $sym->isa('PPI::Token::Symbol')
509 25 475 if ($temp_ptr and $temp_ptr->isa('PPI::Structure::Subscript')) { }
511 6 18 unless ref $ss
513 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 '{}') { }
529 29 537 if ($temp_ptr and $temp_ptr->isa('PPI::Token::Operator') and $temp_ptr->content eq '->') { }
48 489 elsif ($temp_ptr and $temp_ptr->isa('PPI::Structure::Subscript')) { }
536 0 48 unless ref $ss
537 27 21 if ($ss->{'braces'} eq '[]') { }
21 0 elsif ($ss->{'braces'} eq '{}') { }
539 0 27 unless ref ${$rsym{'ref'};} eq 'ARRAY'
544 0 21 unless ref ${$rsym{'ref'};} eq 'HASH'
566 0 73 unless $subscr->isa('PPI::Structure::Subscript')
569 0 73 unless @sub_ch == 1 and $sub_ch[0]->isa('PPI::Statement::Expression')
572 6 67 unless @subs == 1
576 8 59 if ($subscr->braces eq '{}' and $subs[0]->isa('PPI::Token::Word')) { }
582 0 58 unless ref $v
596 0 921 unless $val
597 332 589 if ($val->isa('PPI::Token::Number')) { }
1 588 elsif ($val->isa('PPI::Token::Word') and $val->literal eq 'undef') { }
4 584 elsif ($val->isa('PPI::Token::Word') and $val->literal =~ /^-\w+$/) { }
334 250 elsif ($val->isa('PPI::Token::Quote')) { }
48 202 elsif ($val->isa('PPI::Token::Symbol')) { }
128 74 elsif ($val->isa('PPI::Structure::Constructor')) { }
7 67 elsif ($val->isa('PPI::Token::Word') and $val->literal eq 'do' and $val->snext_sibling and $val->snext_sibling->isa('PPI::Structure::Block')) { }
39 28 elsif ($val->isa('PPI::Structure::List')) { }
25 3 elsif ($val->isa('PPI::Token::QuoteLike::Words')) { }
617 204 130 if ($val->isa('PPI::Token::Quote::Single') or $val->isa('PPI::Token::Quote::Literal')) { }
130 0 elsif ($val->isa('PPI::Token::Quote::Double') or $val->isa('PPI::Token::Quote::Interpolate')) { }
623 1 129 if $str =~ /\$$/
627 1 128 if $str =~ /(?
640 5 43 unless ref $sym
642 30 13 if ($sym->{'atype'} eq '$') { }
6 7 elsif ($sym->{'atype'} eq '@') { }
6 1 elsif ($sym->{'atype'} eq '%') { }
648 0 4 unless wantarray
650 2 4 $self->{'ctx'} =~ /^scalar\b/ ? :
654 0 3 unless wantarray
656 1 5 $self->{'ctx'} =~ /^scalar\b/ ? :
662 0 128 unless ref $l
664 52 76 if ($val->braces eq '[]') { }
76 0 elsif ($val->braces eq '{}') { }
677 0 39 unless ref $l
681 0 34 unless wantarray
683 5 34 $self->{'ctx'} =~ /^scalar\b/ ? :
690 0 24 unless wantarray
692 1 24 $self->{'ctx'} =~ /^scalar\b/ ? :
699 5 14 if $what =~ /^[0-7]{1,3}$/
700 1 13 if $what =~ /^x([0-9A-Fa-f]{2})$/
701 12 1 if exists $_backsl_tbl{$what}
708 10 2 if exists $self->{'out'}{$var} and defined $self->{'out'}{$var}