Branch Coverage

lib/App/Tel.pm
Criterion Covered Total %
branch 58 192 30.2


line true false branch
65 0 0 if $session->pid
115 0 1 $self->{'opts'}{'t'} ? :
121 1 0 if ($self->{'title_stack'} > 0)
125 0 1 if ($hard) { }
156 1 2 if ($#_ < 2) { }
176 0 2 unless @configs
177 0 2 if defined $ENV{'TELRC'}
182 1 1 if (-r $conf)
189 1 1 unless (defined $config->{'telrc_file'})
218 0 9 unless (defined $hostname)
225 2 7 if ($hostname =~ qr"(ssh|telnet)://\[([a-zA-Z0-9\-\.\:]+)\](?::(\d+))?") { }
2 5 elsif ($hostname =~ qr"(ssh|telnet)://([a-zA-Z0-9\-\.]+)(?::(\d+))?") { }
2 3 elsif ($hostname =~ /\[(\S+)\](?::(\d+))?/) { }
1 3 elsif ($hostname =~ tr/:// < 2 and $hostname =~ /(\S+):(\d+)$/) { }
226 1 1 if $3
230 1 1 if $3
234 1 1 if $2
235 1 1 if $2
248 0 9 if (defined $self->profile->{'hostname'})
249 0 0 if (ref $self->profile->{'hostname'} eq 'CODE') { }
281 6 1 if (@_) { }
0 1 elsif (defined $self->{'methods'}) { }
0 1 elsif ($self->{'opts'}{'m'}) { }
1 0 elsif (defined $self->{'profile'}{'method'}) { }
298 0 1 if $self->{'banners'}
326 1 0 if ($host =~ /$h2/i or check_hostrange($h2, $host))
334 0 10 if (defined $profile->{'profile'})
362 12 2 unless defined $profile_arg
364 2 0 if ($replace)
373 0 2 if ($profile->{'handlers'})
379 0 2 if ($profile->{'syntax'})
399 0 0 if $@
423 0 2 if $type ne 'password' and $type ne 'enable'
425 2 0 if (defined $profile->{$type} and $profile->{$type} ne '')
431 0 0 if ($type eq 'enable' and ($profile->{$type} eq '' and $profile->{'password'} ne ''))
437 0 0 if ($pass ne '')
469 1 1 if not $renew and defined $self->{'session'}
472 0 1 if $session and $session->pid
520 1 5 if ($status)
539 1 0 if ($profile->{'enablecmd'})
578 1 0 if (defined $App::Tel::rtr->{'sshoptions'} and scalar $App::Tel::rtr->{'sshoptions'} > 0)
583 0 1 $App::Tel::rtr->{'ciphertype'} ? :
590 0 1 if (defined $App::Tel::rtr->{'prompt'})
609 0 1 if ($_ eq 'ssh') { }
0 1 elsif ($_ eq 'telnet') { }
1 0 elsif ($_ eq 'exec') { }
632 0 0 unless $allied_shit
634 0 1 if ($allied_shit) { }
645 0 0 if ($App::Tel::rtr->{'hostsearch'} and not $App::Tel::rtr->{'hostsearched'}) { }
671 0 1 unless $self->connected
688 0 0 if -f "/tmp/$file.log"
715 0 0 if defined $escape_sequence
737 0 0 unless (@old_group)
773 0 0 if ($Expect::Debug)
789 0 0 unless (do { *$handle }->{'exp_Manual_Stty'})
794 0 0 if do { *$handle }->{'exp_Debug'}
798 0 0 unless (do { *$write_handle }->{'exp_Manual_Stty'})
802 0 0 if do { *$handle }->{'exp_Debug'}
808 0 0 if $Expect::Debug
820 0 0 if exists do { *$read_handle }->{'exp_Pid'} and do { *$read_handle }->{'exp_Pid'}
821 0 0 if (exists do { *$read_handle }->{'exp_Pid'} and do { *$read_handle }->{'exp_Pid'} and not kill(0, do { *$read_handle }->{'exp_Pid'}))
827 0 0 if do { *$read_handle }->{'exp_Debug'}
829 0 0 unless defined do { ${*$read_handle;}{'exp_Function'} }->{'EOF'}
832 0 0 unless &{do { ${*$read_handle;}{'exp_Function'} }->{'EOF'};}(@{${${*$read_handle;}{'exp_Parameters'};}{'EOF'};})
839 0 0 if $_winch_it
840 0 0 if not defined $nfound or $nfound < 1
848 0 0 if ($bits[$read_handle->fileno])
864 0 0 if ($read_handle->fileno != $self->{'stdin_fileno'})
870 0 0 unless defined $nread
872 0 0 if do { *$read_handle }->{'exp_Debug'} > 1
876 0 0 unless defined $escape_character_buffer
881 0 0 if do { *$read_handle }->{'exp_Debug'} > 1
887 0 0 if do { *$read_handle }->{'exp_Max_Accum'}
888 0 0 if ($escape_character_buffer =~ /($escape_sequence)/)
890 0 0 if (do { *$read_handle }->{'exp_Debug'})
909 0 0 if (do { *$read_handle }->{'exp_Pty_Buffer'} =~ /([\w\W]*)($escape_sequence)/) { }
924 0 0 unless &{do { ${*$read_handle;}{'exp_Function'} }->{$escape_sequence};}(@{${${*$read_handle;}{'exp_Parameters'};}{$escape_sequence};})
927 0 0 unless defined $nread
930 0 0 if defined do { *$read_handle }->{'exp_Pid'} and do { *$read_handle }->{'exp_Pid'}
931 0 0 if ($nread == 0)
933 0 0 if do { *$read_handle }->{'exp_Debug'}
935 0 0 unless defined do { ${*$read_handle;}{'exp_Function'} }->{'EOF'}
938 0 0 unless &{do { ${*$read_handle;}{'exp_Function'} }->{'EOF'};}(@{${${*$read_handle;}{'exp_Parameters'};}{'EOF'};})
940 0 0 if $nread < 0
946 0 0 unless (do { *$handle }->{'exp_Manual_Stty'})
950 0 0 unless (do { *$write_handle }->{'exp_Manual_Stty'})
977 0 0 if $opts->{'s'}
1003 0 0 if ($opts->{'a'}) { }
1013 0 0 if $opts->{'c'}
1015 0 0 if ($opts->{'x'})
1017 0 0 unless open my $X, '<', $_
1023 0 0 if (@args) { }
1025 0 0 if (ref $pagercmd eq 'CODE') { }
0 0 elsif ($pagercmd) { }
1033 0 0 unless POSIX::isatty($self->{'stdin'})
1034 0 0 if ($autocmds)