line |
true |
false |
branch |
28
|
0 |
3 |
if (ref $user_name and ref $user_name eq 'SCALAR') { } |
|
0 |
6 |
elsif (ref $user_name and ref $user_name eq 'HASH') { } |
29
|
0 |
0 |
unless (ref $password and ref $password eq 'SCALAR') |
38
|
0 |
3 |
if (exists $params->{'timeout'}) |
39
|
0 |
0 |
if ($params->{'timeout'} and $params->{'timeout'} =~ /^\d+$/msx) { } |
48
|
0 |
3 |
if (exists $params->{'user_agent'}) |
49
|
0 |
0 |
if ($params->{'user_agent'} and $params->{'user_agent'} =~ /\S/msx) |
64
|
2 |
1 |
if ($user_name and $password) |
89
|
0 |
3 |
unless (eval {
do {
local $SIG{'ALRM'} = sub {
Carp::croak("Timeout when retrieving $uri");
}
;
alarm $ua->timeout;
$response = $ua->request($request);
alarm 0;
1
}
}) |
99
|
0 |
1 |
if (ref $proto) { } |
115
|
0 |
1 |
unless (eval {
do {
$response = $self->_get($check_ip_uri)
}
}) |
121
|
0 |
1 |
if ($user_name and $password) |
125
|
0 |
1 |
if ($network_error) |
136
|
0 |
1 |
if (exists $params->{'protocol'}) |
137
|
0 |
0 |
if (defined $params->{'protocol'} and $params->{'protocol'}) { } |
139
|
0 |
0 |
if ($params->{'protocol'} ne 'http' and $params->{'protocol'} ne 'https') |
153
|
0 |
1 |
if ($protocol eq 'https') |
154
|
0 |
0 |
unless (eval {
do {
require Net::HTTPS
}
}) |
164
|
1 |
0 |
if ($response->is_success) { } |
166
|
1 |
0 |
if ($content =~ /Current\sIP\sAddress:\s(\d+.\d+.\d+.\d+)/msx) { } |
176
|
0 |
0 |
if ($content =~ /Can't\sconnect\sto\s$self->{'check_ip'}/msx) { } |
192
|
0 |
2 |
unless ($self->update_allowed) |
197
|
0 |
2 |
unless ($user_name and $password) |
200
|
0 |
2 |
unless ($hostnames) |
203
|
0 |
2 |
unless ($hostnames =~ /^(?:(?:[[:alpha:]\d\-]+[.])+[[:alpha:]\d\-]+,?)+$/msx) |
213
|
1 |
1 |
if (ref $params and ref $params eq 'HASH') { } |
|
0 |
1 |
elsif ($params) { } |
218
|
1 |
0 |
if (exists $params->{'protocol'}) { } |
234
|
1 |
1 |
if (defined $ip_address) |
236
|
0 |
1 |
if (scalar @bytes != NUMBER_OF_OCTETS_IN_IP_ADDRESS()) |
240
|
0 |
4 |
unless ($byte =~ /^\d+$/msx) |
243
|
0 |
4 |
if ($byte >= MAXIMUM_VALUE_OF_AN_OCTET() or $byte < 0) |
247
|
0 |
1 |
if ($bytes[0] == 0 or $bytes[0] == LOCALHOST_RANGE() or $bytes[0] == FIRST_BYTE_OF_10_PRIVATE_RANGE() or $bytes[0] == FIRST_BYTE_OF_172_16_PRIVATE_RANGE() and $bytes[1] == SECOND_BYTE_OF_172_16_PRIVATE_RANGE() or $bytes[0] == FIRST_BYTE_OF_192_168_PRIVATE_RANGE() and $bytes[1] == SECOND_BYTE_OF_192_168_PRIVATE_RANGE() or $bytes[0] >= MULTICAST_RESERVED_LOWEST_RANGE()) |
271
|
1 |
0 |
if (exists $params->{'wildcard'}) |
272
|
1 |
0 |
if (defined $params->{'wildcard'} and $params->{'wildcard'}) { } |
274
|
0 |
0 |
if ($params->{'wildcard'} ne 'ON' and $params->{'wildcard'} ne 'OFF' and $params->{'wildcard'} ne 'NOCHG') |
293
|
1 |
0 |
if (exists $params->{'mx'}) { } |
294
|
1 |
0 |
if (defined $params->{'mx'} and $params->{'mx'}) { } |
295
|
0 |
1 |
if (not $params->{'mx'} =~ /^(?:(?:[[:alpha:]\d\-]+[.])+[[:alpha:]\d\-]+,?)+$/msx) |
312
|
0 |
0 |
if (exists $params->{'backmx'}) |
322
|
1 |
0 |
if (exists $params->{'backmx'}) |
323
|
1 |
0 |
if (defined $params->{'backmx'} and $params->{'backmx'}) { } |
325
|
0 |
1 |
if ($params->{'backmx'} ne 'YES' and $params->{'backmx'} ne 'NO') |
340
|
1 |
0 |
if (exists $params->{'offline'}) |
341
|
1 |
0 |
if (defined $params->{'offline'} and $params->{'offline'}) { } |
343
|
0 |
1 |
if ($params->{'offline'} ne 'YES' and $params->{'offline'} ne 'NO') |
359
|
1 |
0 |
if (defined $params->{'protocol'} and $params->{'protocol'}) { } |
361
|
0 |
1 |
if ($params->{'protocol'} ne 'http' and $params->{'protocol'} ne 'https') |
377
|
3 |
0 |
if (exists $self->{'update_allowed'} and $self->{'update_allowed'}) |
380
|
4 |
2 |
if (defined $allowed) |
409
|
0 |
2 |
if (ref $ip_address and ref $ip_address eq 'HASH') |
416
|
1 |
1 |
if ($params->{'protocol'}) |
419
|
1 |
1 |
if ($protocol eq 'https') |
420
|
0 |
1 |
unless (eval {
do {
require Net::HTTPS
}
}) |
426
|
1 |
1 |
if (defined $ip_address) |
429
|
1 |
1 |
if (exists $params->{'wildcard'}) |
432
|
1 |
1 |
if (exists $params->{'mx'}) |
435
|
1 |
1 |
if (exists $params->{'backmx'}) |
438
|
1 |
1 |
if (exists $params->{'offline'}) |
452
|
2 |
1 |
if ($line =~ /
( \S + ) # response code
\s+
(\S.*) $ # ip address (possible)
/msx) { } |
|
1 |
0 |
elsif ($line =~ /
^ ( \S + ) $ # if this line of the response is a single code word
/msx) { } |
461
|
2 |
0 |
if ($code eq 'good' or $code eq 'nochg' or $code eq '200') { } |
468
|
1 |
1 |
if ($result) { } |
469
|
0 |
1 |
if ($result ne $additional) |