Branch Coverage

blib/lib/Device/Router/RTX.pm
Criterion Covered Total %
branch 0 94 0.0


line true false branch
19 0 0 unless (-f $configfile)
26 0 0 unless open my $input, '<', $configfile
28 0 0 if $line =~ /^#/
29 0 0 if ($line =~ /^(\w+):\s*(.*?)\s*$/) { }
38 0 0 unless close $input
48 0 0 if ($args{'config'})
51 0 0 if (not $args{'store'}) { }
0 0 elsif (not -d $args{'store'}) { }
60 0 0 if (not $args{'address'}) { }
66 0 0 if (defined $args{'password'}) { }
72 0 0 if (defined $args{'admin_password'}) { }
86 0 0 if (not $rtx or ref $rtx ne 'Device::Router::RTX')
89 0 0 if (not $rtx->{'address'})
103 0 0 if ($rtx->{'password'})
107 0 0 if ($stuff =~ /Error: Other user logged in by telnet./) { }
113 0 0 if ($telnet_connection->eof)
127 0 0 unless $filename
131 0 0 if (-f $filename)
136 0 0 if ($rtx->{'admin_password'}) { }
0 0 elsif ($rtx->{'password'}) { }
146 0 0 if ($rtx->{'verbose'})
150 0 0 if ($tftp->error)
153 0 0 unless -f $filename
205 0 0 unless $filename
206 0 0 unless -f $filename
207 0 0 unless open my $input, '<', $filename
213 0 0 if $line =~ /^\s*$/
214 0 0 if ($line =~ /#\s+RTX1000\s+Rev\.([\d.]+)/)
218 0 0 if ($line =~ /mac address\s*:\s*($mac_re)\s*,\s*($mac_re)\s*,\s*($mac_re)/i)
225 0 0 if ($line =~ /tftp\s+host\s+($ip_address|any|none)/)
229 0 0 if ($line =~ /no\s+tftp\s+host/)
237 0 0 if ($line =~ /(administrator|login)\s+password\s+([[:graph:]]+)/)
241 0 0 if ($line =~ m[ip\s+lan(\d)\s+address\s+($ip_address)/(\d+)])
247 0 0 if ($line =~ /nat\s+descriptor\s+type\s+(\d+)\s+(masquerade)/)
254 0 0 if ($line =~ /nat\s+descriptor\s+masquerade\s+(static)\s+(\d+)\s+(\d+)\s+($ip_address)\s+($protocol_re)\s+(?:($port_re)=)?($port_re)/)
271 0 0 if ($line =~ /dhcp\s+scope\s+(\d+)\s+$ip_range_re/)
277 0 0 if ($line =~ /dhcp\s+scope\s+bind\s+(\d+)\s+($ip_address)\s+(ethernet\s+)?($mac_re)/i)
280 0 0 if (not $scope_hash) { }
293 0 0 if $line =~ /^#/
297 0 0 unless close $input
307 0 0 unless $rtx->{'telnet_connection'}
311 0 0 if $retval =~ /Error:/
323 0 0 unless $retval =~ /Saving.*Done/
330 0 0 if $rtx->{'admin'}
347 0 0 unless $mac =~ /$mac_re/i
367 0 0 if ($line =~ /LAN(\d)\s+($ip_address)\s+($mac_re)\s+(\d+)/)
376 0 0 if (@arp)