Branch Coverage

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


line true false branch
39 0 0 unless grep /^-?prompt$/i, @_
44 0 0 unless $self = $class->SUPER::new(@_)
71 0 0 if (@_ == 2) { }
0 0 elsif (@_ > 2) { }
79 0 0 if /^-?errmode$/i
85 0 0 if (/^-?always_waitfor_prompt$/i) { }
0 0 elsif (/^-?waitfor_pause$/i) { }
0 0 elsif (/^-?more_prompt$/i) { }
0 0 elsif (/^-?autopage$/i) { }
0 0 elsif (/^-?normalize_cmd$/i) { }
0 0 elsif (/^-?send_wakeup$/i) { }
127 0 0 if (@_ == 2) { }
0 0 elsif (@_ > 2) { }
128 0 0 unless defined $prompt
160 0 0 if (@_ == 1) { }
0 0 elsif (@_ >= 2) { }
165 0 0 if $k =~ /^-?[Ss]tring$/
166 0 0 if $k =~ /^-?[Nn]ormalize_cmd$/
177 0 0 if ($need_more) { }
187 0 0 if ($self->normalize_cmd) { }
203 0 0 if (substr($out[$i], 0, 1) eq '%')
204 0 0 if ($out[$i] =~ /'\^' marker/) { }
232 0 0 if ($self->autopage and $self->last_prompt =~ /$more_re/) { }
239 0 0 wantarray ? :
247 0 0 unless @_
262 0 0 if (@_ >= 2) { }
0 0 elsif (@_ == 1) { }
265 0 0 if ($k =~ /^-?[Ss]tring$/) { }
0 0 elsif ($k =~ /^-?[Mm]atch$/) { }
283 0 0 if ($self->always_waitfor_prompt and index($all_re, $prompt_re) == -1)
284 0 0 if @_ == 1
293 0 0 if ($self->autopage and index($all_re, $more_re) == -1)
294 0 0 if @_ == 1
301 0 0 unless $all_prompts or @literals
311 0 0 if ($match)
313 0 0 if (index $match, $_)
314 0 0 wantarray ? :
318 0 0 if ($match =~ /($all_re)/m)
320 0 0 wantarray ? :
323 0 0 wantarray ? :
351 0 0 if $self->eof
355 0 0 if $Net::Telnet::Cisco::DEBUG
360 0 0 if (@_ == 3) { }
369 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) { }
387 0 0 if $Net::Telnet::Cisco::DEBUG
408 0 0 if ($self->timed_out) { }
0 0 elsif ($self->eof) { }
420 0 0 if ($self->send_wakeup eq 'connect')
439 0 0 unless ($_)
440 0 0 if $self->eof
444 0 0 if ($sent_wakeup == 0 and $self->send_wakeup eq 'timeout')
462 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)/) { }
465 0 0 unless $self->print($username)
466 0 0 if $seen{'login'}++
468 0 0 unless $self->print($password)
469 0 0 if $seen{'passwd'}++
471 0 0 unless $self->print($passcode)
472 0 0 if $seen{'passcode'}++
490 0 0 if ($self->ignore_warnings)
493 0 0 if $errmsg =~ /$warnings_re/
508 0 0 if (@_ == 1) { }
514 0 0 if (/^-?name$|^-?login$|^-?user/i) { }
0 0 elsif (/^-?passw/i) { }
0 0 elsif (/^-?passc/i) { }
0 0 elsif (/^-?level$/i) { }
532 0 0 if ($self->timed_out) { }
0 0 elsif ($self->eof) { }
559 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/"))
560 0 0 if $self->eof
565 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/) { }
568 0 0 unless $self->print($en_username)
569 0 0 if $seen{'login'}++
573 0 0 unless $self->print($en_password)
574 0 0 if $seen{'passwd'}++
578 0 0 unless $self->print($en_passcode)
579 0 0 if $seen{'passcode'}++
590 0 0 if (not defined $en_level or $en_level =~ /^[1-9]/) { }
592 0 0 $self->is_enabled ? :
603 0 0 $self->is_enabled ? :
622 0 0 exists $$stream{'last_prompt'} ? :
629 0 0 exists $$stream{'last_cmd'} ? :
637 0 0 $_[0]->last_prompt =~ /\#|enable|config/ ? :
643 0 0 if defined $arg
651 0 0 if defined $arg
659 0 0 if defined $arg
667 0 0 if defined $arg
675 0 0 if defined $arg
683 0 0 if defined $arg
691 0 0 if (defined $arg)
702 0 0 unless @_
705 0 0 if $Net::Telnet::Cisco::DEBUG
707 0 0 if ($orig)
708 0 0 if ($self->_match_check($orig))
710 0 0 unless $orig
715 0 0 if $Net::Telnet::Cisco::DEBUG
716 0 0 if ($self->_match_check($_))
719 0 0 unless ($re)
724 0 0 $orig ? :
728 0 0 if $Net::Telnet::Cisco::DEBUG
736 0 0 unless $str
756 0 0 wantarray ? :
762 0 0 unless $code
767 0 0 if $Net::Telnet::Cisco::DEBUG
777 0 0 if ($@) { }
0 0 elsif (@warns) { }
801 0 0 if ref $self