Branch Coverage

blib/lib/Cisco/Reconfig.pm
Criterion Covered Total %
branch 206 304 67.7


line true false branch
25 9 0 $@ ? :
66 1 0 unless $iostrings
75 8 0 ref $file ? :
87 0 92 if $ddata
101 81 807 if ($in > $indent) { }
90 717 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 716 if /^$/
141 165 551 if /^\s*!/
149 15 536 if (not @x) { }
0 536 elsif (defined $$context{$x[0]}) { }
157 8 7 unless $context->{$dupl}
161 0 15 $ddata ? :
173 0 1468 unless defined $x
174 0 1468 unless defined $dseq
175 1 1467 unless defined $line
176 0 1468 $ddata ? :
186 0 551 if $context->{$cntx}
191 551 0 unless ($nonext)
192 392 159 if ($last) { }
203 8 543 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 11560 unless $_[0]{$seqn} or $_[0]->endpt->{$seqn}
244 80 28 unless $_[0]{$subs} or $_[0]->zoom->{$subs}
245 5 0 unless $_[0]{$next} or $_[0]->zoom->{$next}
248 357 77395 $_[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 235 if defined $self->{$text}
279 164 71 if @p > 1
280 0 71 unless @p
287 0 36864 unless $self
289 11572 25292 if defined $self->{$text} and not @p
290 0 25292 unless @p
298 11 418 unless $self
299 133 285 if (defined $self->{$text})
302 0 133 $debug_text ? :
305 9 276 if (@p > 1) { }
6 270 elsif ($self->{$dupl}) { }
313 0 6 if $debug_text
317 0 270 unless @p
325 98 184 if (defined $self->{$text})
328 0 98 $debug_text ? :
330 1 281 if (exists $self->{$dupl})
333 0 1 $debug_text ? :
336 190 92 if (@p)
344 16 33 if $all and $self->{$subs}
345 92 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
403 115 12 defined $_[0]{$cntx} ? :
415 0 74 if $debug_context
416 10 64 unless ($self->block)
417 0 10 if $debug_context
422 0 74 if $debug_context
427 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 152 if wantarray and @designators > 1
634 0 152 if $debug_get
637 0 152 unless $self
639 81 71 if $zoom
641 0 152 if $debug_get
647 0 175 if $debug_get
650 0 272 if $debug_get
651 14 258 unless $self->{$d}
653 0 258 if $debug_get
655 138 23 unless @designators
656 23 0 if ($self->single) { }
658 0 23 if $debug_get
660 0 0 if $debug_get
664 0 138 if $debug_get
665 15 123 if (wantarray)
668 15 0 if @k
682 23 3 unless wantarray
693 0 36 unless wantarray
703 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