Branch Coverage

blib/lib/Net/Telnet/Cisco.pm
Criterion Covered Total %
branch 0 262 0.0


line true false branch
62 0 0 if (@_ == 1) { }
69 0 0 if (/^-?always_waitfor_prompt$/i) { }
0 0 elsif (/^-?autopage$/i) { }
0 0 elsif (/^-?ignore_warnings$/i) { }
0 0 elsif (/^-?more_prompt$/i) { }
0 0 elsif (/^-?normalize_cmd$/i) { }
0 0 elsif (/^-?send_wakeup$/i) { }
0 0 elsif (/^-?waitfor_pause$/i) { }
0 0 elsif (/^-?warnings$/i) { }
0 0 elsif (/^-?prompt$/i) { }
103 0 0 unless $self = $class->SUPER::new(%ntparams)
108 0 0 if (/^-?always_waitfor_prompt$/i) { }
0 0 elsif (/^-?autopage$/i) { }
0 0 elsif (/^-?ignore_warnings$/i) { }
0 0 elsif (/^-?more_prompt$/i) { }
0 0 elsif (/^-?normalize_cmd$/i) { }
0 0 elsif (/^-?send_wakeup$/i) { }
0 0 elsif (/^-?waitfor_pause$/i) { }
151 0 0 if (@_ == 2) { }
0 0 elsif (@_ > 2) { }
152 0 0 unless defined $prompt
189 0 0 if (@_ == 1) { }
0 0 elsif (@_ >= 2) { }
195 0 0 if (/^-?string$/i) { }
0 0 elsif (/^-?normalize_cmd$/i) { }
0 0 elsif (/^-?output$/i) { }
204 0 0 if (defined $output_ref and ref $output_ref eq 'ARRAY')
220 0 0 if ($need_more) { }
230 0 0 if ($normalize) { }
246 0 0 if (substr($$out[$i], 0, 1) eq '%')
247 0 0 if ($$out[$i] =~ /'\^' marker/) { }
275 0 0 if ($self->autopage and $self->last_prompt =~ /$more_re/) { }
282 0 0 if (defined $output_ref)
283 0 0 if (ref $output_ref eq 'SCALAR') { }
0 0 elsif (ref $output_ref eq 'HASH') { }
290 0 0 wantarray ? :
298 0 0 unless @_
313 0 0 if (@_ >= 2) { }
0 0 elsif (@_ == 1) { }
316 0 0 if ($k =~ /^-?[Ss]tring$/) { }
0 0 elsif ($k =~ /^-?[Mm]atch$/) { }
334 0 0 if ($self->always_waitfor_prompt and index($all_re, $prompt_re) == -1)
335 0 0 if @_ == 1
344 0 0 if ($self->autopage and index($all_re, $more_re) == -1)
345 0 0 if @_ == 1
352 0 0 unless $all_prompts or @literals
362 0 0 if ($match)
364 0 0 if (index $match, $_)
365 0 0 wantarray ? :
369 0 0 if ($match =~ /($all_re)/m)
371 0 0 wantarray ? :
374 0 0 wantarray ? :
402 0 0 if $self->eof
406 0 0 if $Net::Telnet::Cisco::DEBUG
411 0 0 if (@_ == 3) { }
420 0 0 if (/^-?name$/i) { }
0 0 elsif (/^-?passw/i) { }
0 0 elsif (/^-?passcode/i) { }
0 0 elsif (/^-?prompt$/i) { }
0 0 elsif (/^-?timeout$/i) { }
438 0 0 if $Net::Telnet::Cisco::DEBUG
459 0 0 if ($self->timed_out) { }
0 0 elsif ($self->eof) { }
471 0 0 if ($self->send_wakeup eq 'connect')
490 0 0 unless ($_)
491 0 0 if $self->eof
495 0 0 if ($sent_wakeup == 0 and $self->send_wakeup eq 'timeout')
513 0 0 if (not defined $_) { }
0 0 elsif (/sername|ogin/) { }
0 0 elsif (/[Pp]assw/) { }
0 0 elsif (/(?i:Passcode)/) { }
0 0 elsif (/($cmd_prompt_re)/) { }
516 0 0 unless $self->print($username)
517 0 0 if $seen{'login'}++
519 0 0 unless $self->print($password)
520 0 0 if $seen{'passwd'}++
522 0 0 unless $self->print($passcode)
523 0 0 if $seen{'passcode'}++
541 0 0 if ($self->ignore_warnings)
544 0 0 if $errmsg =~ /$warnings_re/
559 0 0 if (@_ == 1) { }
565 0 0 if (/^-?name$|^-?login$|^-?user/i) { }
0 0 elsif (/^-?passw/i) { }
0 0 elsif (/^-?passc/i) { }
0 0 elsif (/^-?level$/i) { }
583 0 0 if ($self->timed_out) { }
0 0 elsif ($self->eof) { }
610 0 0 unless (my($prematch, $match) = $self->waitfor('-match', '/[Ll]ogin[:\\s]*$/', '-match', '/[Uu]sername[:\\s]*$/', '-match', '/[Pp]assw(?:or)?d[:\\s]*$/', '-match', '/(?i:Passcode)[:\\s]*$/', '-match', "/$old_prompt/"))
611 0 0 if $self->eof
616 0 0 if (not defined $match) { }
0 0 elsif ($match =~ /sername|ogin/) { }
0 0 elsif ($match =~ /[Pp]assw/) { }
0 0 elsif ($match =~ /(?i:Passcode)/) { }
0 0 elsif ($match =~ /$old_prompt/) { }
619 0 0 unless $self->print($en_username)
620 0 0 if $seen{'login'}++
624 0 0 unless $self->print($en_password)
625 0 0 if $seen{'passwd'}++
629 0 0 unless $self->print($en_passcode)
630 0 0 if $seen{'passcode'}++
641 0 0 if ($en_level eq '' or $en_level =~ /^[1-9]/) { }
643 0 0 $self->is_enabled ? :
654 0 0 $self->is_enabled ? :
682 0 0 exists $stream->{'last_prompt'} ? :
689 0 0 exists $stream->{'last_cmd'} ? :
697 0 0 $_[0]->last_prompt =~ /\#|enable|config/ ? :
703 0 0 if defined $arg
711 0 0 if defined $arg
719 0 0 if defined $arg
727 0 0 if defined $arg
735 0 0 if defined $arg
743 0 0 if defined $arg
751 0 0 if (defined $arg)
761 0 0 if (defined $arg)
776 0 0 unless @_
779 0 0 if $Net::Telnet::Cisco::DEBUG
781 0 0 if ($orig)
782 0 0 if ($self->_match_check($orig))
784 0 0 unless $orig
789 0 0 if $Net::Telnet::Cisco::DEBUG
790 0 0 if ($self->_match_check($_))
793 0 0 unless ($re)
798 0 0 $orig ? :
802 0 0 if $Net::Telnet::Cisco::DEBUG
810 0 0 unless $str
826 0 0 wantarray ? :
832 0 0 unless $code
837 0 0 if $Net::Telnet::Cisco::DEBUG
847 0 0 if ($@) { }
0 0 elsif (@warns) { }
871 0 0 if ref $self