| 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 |
2 |
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') |
|
159
|
1 |
0 |
if ($response->is_success) { } |
|
161
|
1 |
0 |
if ($content =~ /Current\sIP\sAddress:\s(\d+.\d+.\d+.\d+)/msx) { } |
|
171
|
0 |
0 |
if ($content =~ /Can't\sconnect\sto\s$self->{'check_ip'}/msx) { } |
|
187
|
0 |
1 |
unless ($self->update_allowed) |
|
192
|
0 |
1 |
unless ($user_name and $password) |
|
195
|
0 |
1 |
unless ($hostnames) |
|
198
|
0 |
1 |
unless ($hostnames =~ /^(?:(?:[[:alpha:]\d\-]+[.])+[[:alpha:]\d\-]+,?)+$/msx) |
|
208
|
0 |
1 |
if (ref $params and ref $params eq 'HASH') { } |
|
|
0 |
1 |
elsif ($params) { } |
|
213
|
0 |
0 |
if (exists $params->{'protocol'}) { } |
|
229
|
0 |
1 |
if (defined $ip_address) |
|
231
|
0 |
0 |
if (scalar @bytes != NUMBER_OF_OCTETS_IN_IP_ADDRESS()) |
|
235
|
0 |
0 |
unless ($byte =~ /^\d+$/msx) |
|
238
|
0 |
0 |
if ($byte >= MAXIMUM_VALUE_OF_AN_OCTET() or $byte < 0) |
|
242
|
0 |
0 |
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()) |
|
266
|
0 |
0 |
if (exists $params->{'wildcard'}) |
|
267
|
0 |
0 |
if (defined $params->{'wildcard'} and $params->{'wildcard'}) { } |
|
269
|
0 |
0 |
if ($params->{'wildcard'} ne 'ON' and $params->{'wildcard'} ne 'OFF' and $params->{'wildcard'} ne 'NOCHG') |
|
288
|
0 |
0 |
if (exists $params->{'mx'}) { } |
|
289
|
0 |
0 |
if (defined $params->{'mx'} and $params->{'mx'}) { } |
|
290
|
0 |
0 |
if (not $params->{'mx'} =~ /^(?:(?:[[:alpha:]\d\-]+[.])+[[:alpha:]\d\-]+,?)+$/msx) |
|
307
|
0 |
0 |
if (exists $params->{'backmx'}) |
|
317
|
0 |
0 |
if (exists $params->{'backmx'}) |
|
318
|
0 |
0 |
if (defined $params->{'backmx'} and $params->{'backmx'}) { } |
|
320
|
0 |
0 |
if ($params->{'backmx'} ne 'YES' and $params->{'backmx'} ne 'NO') |
|
335
|
0 |
0 |
if (exists $params->{'offline'}) |
|
336
|
0 |
0 |
if (defined $params->{'offline'} and $params->{'offline'}) { } |
|
338
|
0 |
0 |
if ($params->{'offline'} ne 'YES' and $params->{'offline'} ne 'NO') |
|
354
|
0 |
0 |
if (defined $params->{'protocol'} and $params->{'protocol'}) { } |
|
356
|
0 |
0 |
if ($params->{'protocol'} ne 'http' and $params->{'protocol'} ne 'https') |
|
372
|
2 |
0 |
if (exists $self->{'update_allowed'} and $self->{'update_allowed'}) |
|
375
|
4 |
1 |
if (defined $allowed) |
|
404
|
0 |
1 |
if (ref $ip_address and ref $ip_address eq 'HASH') |
|
411
|
0 |
1 |
if ($params->{'protocol'}) |
|
416
|
0 |
1 |
if (defined $ip_address) |
|
419
|
0 |
1 |
if (exists $params->{'wildcard'}) |
|
422
|
0 |
1 |
if (exists $params->{'mx'}) |
|
425
|
0 |
1 |
if (exists $params->{'backmx'}) |
|
428
|
0 |
1 |
if (exists $params->{'offline'}) |
|
442
|
0 |
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) { } |
|
451
|
0 |
0 |
if ($code eq 'good' or $code eq 'nochg' or $code eq '200') { } |
|
458
|
0 |
0 |
if ($result) { } |
|
459
|
0 |
0 |
if ($result ne $additional) |