Branch Coverage

blib/lib/Cisco/Reconfig.pm
Criterion Covered Total %
branch 207 304 68.0


line true false branch
25 0 9 $@ ? :
66 0 1 unless $iostrings
75 9 0 ref $file ? :
87 0 93 if $ddata
101 81 809 if ($in > $indent) { }
90 719 elsif ($in < $indent) { }
102 79 2 if ($last) { }
105 78 1 if $line
112 0 2 if ($indent + 1 == $in and $allow_plus_one_indent and $line =~ /^\s*$allow_plus_one_indent/)
116 0 2 if ($indent != 0 or $prev ne "!\n" and not $prev =~ /^!.*$/)
117 0 0 if ($bad_indent_policy eq 'IGNORE') { }
0 0 elsif ($bad_indent_policy eq 'WARN') { }
129 2 88 if ($ciscobug and $in == 0) { }
5 83 elsif ($last and $indent - 1 == $in and $allow_minus_one_indent and $line =~ /^\s*$allow_minus_one_indent/) { }
132 0 5 unless $$last{$seqn}
135 5 0 if $line
140 6 718 if /^$/
141 165 553 if /^\s*!/
149 15 538 if (not @x) { }
0 538 elsif (defined $$context{$x[0]}) { }
156 8 7 unless $$context{$dupl}
158 0 15 $ddata ? :
173 0 1473 unless defined $x
174 0 1473 unless defined $dseq
175 1 1472 unless defined $line
176 0 1473 $ddata ? :
186 0 553 if $$context{$cntx}
191 553 0 unless ($nonext)
192 393 160 if ($last) { }
203 8 545 if ($line and ($line =~ /(\^C)/ and not $line =~ /\^C.*\^C/) or $line =~ /banner [a-z\-]+ ((?!\^C).+)/)
212 0 8 unless defined $1
222 0 48 unless $line
223 0 48 $ddata ? :
232 8 40 if $line =~ /${sep}[\r]?$/
234 0 8 unless $line and $line =~ /${sep}[\r]?$/
243 0 13451 unless $_[0]{$seqn} or $_[0]->endpt->{$seqn}
244 81 145 unless $_[0]{$subs} or $_[0]->zoom->{$subs}
245 5 23 unless $_[0]{$next} or $_[0]->zoom->{$next}
248 360 78023 $_[0]{$debg} ? :
258 25 17 if defined $$self{$text}
260 1 16 if @p > 1
261 0 16 unless @p
268 0 15 unless $self
270 12 3 unless @p
277 165 240 if defined $$self{$text}
279 166 74 if @p > 1
280 0 74 unless @p
287 0 37172 unless $self
289 11630 25542 if defined $$self{$text} and not @p
290 0 25542 unless @p
298 11 419 unless $self
299 133 286 if (defined $$self{$text})
300 0 133 $debug_text ? :
305 10 276 if (@p > 1) { }
6 270 elsif ($$self{$dupl}) { }
313 0 6 if $debug_text
317 0 270 unless @p
325 100 184 if (defined $$self{$text})
326 0 100 $debug_text ? :
330 1 283 if (exists $$self{$dupl})
333 0 1 $debug_text ? :
336 190 94 if (@p)
343 16 78 if $all and $$self{$subs}
345 94 0 if @t
346 0 0 unless @p
353 1 5 unless $self
370 55 0 if defined $o and not $o =~ /\n$/
373 0 16 unless wantarray
384 0 9 unless wantarray
395 0 11 unless wantarray
401 115 12 defined $_[0]{$cntx} ? :
415 0 74 if $debug_context
416 10 64 unless ($self->block)
417 0 10 if $debug_context
420 0 74 if $debug_context
425 36 38 if $x
437 0 27 if $debug_context
438 0 27 if $debug_context
469 0 16 if $debug_set
470 0 16 unless $self
473 0 16 if $debug_set
475 7 9 if $self->subs
477 0 16 if $debug_set
488 10 6 if (@designators) { }
494 0 16 if $debug_set
496 11 5 if ($lines[0] =~ /^(\s+)/)
499 0 51 unless substr($_, 0, length $ls) eq $ls
500 11 0 if $m
507 4 52 if /^\s*!\s*$/
510 0 16 if $debug_set
513 1 15 unless $old
515 1 15 if (not $old) { }
5 10 elsif (not $designator || looks_like_a_block($desig, @lines)) { }
4 6 elsif ($old->teql($desig)) { }
516 0 1 if $debug_set
520 2 3 if ($self->block and $self->context) { }
526 0 3 if $debug_set
533 0 3 if grep /^$indent\s/, @lines
540 22 1 if ($t{$l}) { }
549 2 1 if @o
553 0 4 if $debug_set
556 0 6 if $debug_set
558 5 1 if (defined $designator) { }
565 6 10 if (@lines)
566 5 0 if ($old and not @o and $old->subs and $old->subs->next)
567 0 5 if $debug_set
570 0 5 if $debug_set
572 2 17 if $l =~ /^\s*exit\s*$/
573 15 2 if $f->teql($l)
574 0 2 if $debug_set
579 0 17 if $debug_set
581 2 3 if (not $ok or $f)
587 3 3 if @o
590 11 5 if @o
592 16 0 unless wantarray
600 1 5 unless defined $last
601 0 5 if grep /^\S/, @l
602 5 0 if $first =~ /^\s/
603 0 0 if $last =~ /^\s/
610 0 10 unless @l
612 1 9 unless defined $_
613 9 0 unless s/^\s*no /$indent/
615 0 10 unless wantarray
623 3 6 if $regex
631 1 153 if wantarray and @designators > 1
634 0 153 if $debug_get
637 0 153 unless $self
639 81 72 if $zoom
641 0 153 if $debug_get
647 0 176 if $debug_get
650 0 275 if $debug_get
651 14 261 unless $$self{$d}
653 0 261 if $debug_get
655 139 23 unless @designators
656 23 0 if ($self->single) { }
658 0 23 if $debug_get
660 0 0 if $debug_get
664 0 139 if $debug_get
665 15 124 if (wantarray)
668 15 0 if @k
682 23 3 unless wantarray
693 0 36 unless wantarray
702 0 0 if $self->single and $self->single->{$text} and $self->subs->undefined
705 0 0 if $self->context->undefined
708 0 0 if wantarray
725 1 14 if (@designators > 1) { }
727 0 1 if $debug_mget
732 0 14 if $debug_mget
733 0 14 if $debug_mget
737 0 14 if $debug_mget
744 0 14 if $debug_mget
748 0 14 if $debug_mget