Branch Coverage

blib/lib/Net/Telnet/Netgear.pm
Criterion Covered Total %
branch 34 92 36.9


line true false branch
36 10 5 if (@_ > 1) { }
0 5 elsif (@_ == 1) { }
42 14 0 if (/^-? # Match keys starting with '-', optionally. ( # Match either keys that begin with 'packet_' and packet_( # are one of the following, mac|username|password|content|base64|instance|wait_timeout|delay|send_mode )| # Or keys that do not start with 'packet_' and are one of the following. host|fhopen )$ /xi) { }
0 0 elsif (/^-?(netgear_defaults|exit_on_destroy)$/i) { }
55 14 0 defined $2 ? :
71 2 8 if (exists $packetinfo{'instance'}) { }
3 5 elsif (exists $packetinfo{'mac'}) { }
1 4 elsif (exists $packetinfo{'content'}) { }
1 3 elsif (exists $packetinfo{'base64'}) { }
73 1 1 unless defined &Scalar::Util::blessed($packetinfo{'instance'}) and $packetinfo{'instance'}->isa('Net::Telnet::Netgear::Packet')
96 1 8 if (exists $packetinfo{'send_mode'})
113 6 7 defined $packet && $packet->can('get_packet') ? :
121 0 11 if (exists $removed_keys{'fhopen'}) { }
0 11 elsif (exists $removed_keys{'host'}) { }
123 0 0 unless $self->fhopen($removed_keys{'fhopen'})
128 0 0 unless $self->open
139 1 11 if $self->exit_on_destroy
148 0 0 if (caller)[0] eq 'Net::Telnet::Netgear' and @_ > 0 and $_[0] eq -'callparent'
160 0 0 if (caller)[0] eq 'Net::Telnet::Netgear' and @_ > 0 and $_[0] eq -'callparent'
170 2 2 if @_ > 1
173 14 0 if defined $NETGEAR_DEFAULTS{$k} and $self->can($k)
220 38 28 if (exists $conf{'new'} and defined $conf{'new'})
222 36 2 if (exists $conf{'sanitizer'})
236 4 25 unless /^-?\d+(?:\.\d+)?$/
246 2 1 unless grep {$_ eq $val;} 'auto', 'tcp', 'udp'
263 0 0 if ($$net_telnet{'select_supported'}) { }
271 0 0 $nfound ? :
0 0 !defined($nfound) || $nfound < 0 ? :
281 0 0 $DIE_ON_SELECT_UNAVAILABLE ? :
286 0 0 if $DIE_ON_SELECT_UNAVAILABLE
287 0 0 if not $DIE_ON_SELECT_UNAVAILABLE and $should_warn and warnings::enabled()
309 0 0 unless $sock->send($$s{'packet'})
323 0 0 if (defined $$s{'packet'})
327 0 0 if ($self->packet_send_mode eq 'auto') { }
0 0 elsif ($self->packet_send_mode eq 'udp') { }
337 0 0 if (@params == 1) { }
0 0 elsif (@params >= 2) { }
346 0 0 if (/^-?(host|port)$/i)
366 0 0 unless defined $$s{'packet'}
367 0 0 if ($v and $self->packet_send_mode ne 'udp') { }
0 0 elsif ($$s{'packet_send_mode'} eq 'auto') { }
372 0 0 if ($can_read == 0) { }
0 0 elsif ($can_read == -1) { }
381 0 0 unless $self->$method(@params)
383 0 0 if _can_read($self, $$s{'timeout'}, -'nowarnings') != 1
403 0 0 if $v and $$s{'netgear_defaults'}