Branch Coverage

lib/App/ipchgmon.pm
Criterion Covered Total %
branch 56 86 65.1


line true false branch
70 0 0 if $opt_debug
71 0 0 if defined $opt_email and scalar @$opt_email
72 0 0 if defined $opt_mailport or defined $opt_mailserver
75 0 0 unless (online())
81 0 0 if -e $opt_file
83 0 0 if $ip4 and $opt_4 || !$opt_6
85 0 0 if $ip6 and $opt_6 || !$opt_4
87 0 0 if $opt_dnsname
95 4 2 if ($opt_4 == $opt_6) { }
1 1 elsif ($opt_4) { }
104 8 2 if (not $latest or $overdue)
105 8 0 if defined $opt_email and scalar @$opt_email
114 4 2 if not $latest
122 2 18 unless defined $aoaref
126 18 12 if (valid4($line->[0]) and $v4 or valid6($line->[0]) and not $v4)
133 8 10 if ($lastip eq $ip) { }
146 1 6 unless open my $fh, ">>:encoding(utf8)", $opt_file
153 0 6 unless close $fh
154 0 0 if defined $opt_email and scalar @$opt_email
184 0 0 unless is_email($address)
189 0 0 if defined $opt_mailport and not defined $opt_mailserver
205 0 9 if defined $opt_mailserver
213 0 9 if defined $transport
214 9 0 if ($opt_singleemail or 1 == scalar @$opt_email) { }
229 1 63 if is_unroutable_ipv4($ip)
230 1 62 if is_private_ipv4($ip)
231 1 61 if is_loopback_ipv4($ip)
232 1 60 if is_linklocal_ipv4($ip)
233 1 59 if is_testnet_ipv4($ip)
234 1 58 if is_anycast_ipv4($ip)
235 1 57 if is_multicast_ipv4($ip)
236 27 30 if is_ipv4($ip)
241 1 29 if is_private_ipv6($ip)
242 1 28 if is_loopback_ipv6($ip)
243 1 27 if is_linklocal_ipv6($ip)
244 1 26 if is_multicast_ipv6($ip)
245 1 25 if is_ipv4_mapped_ipv6($ip)
246 1 24 if is_discard_ipv6($ip)
247 1 23 if is_special_ipv6($ip)
248 1 22 if is_documentation_ipv6($ip)
249 22 0 if is_ipv6($ip)
275 8 0 if (valid4($ip1)) { }
283 0 12 if (defined $opt_versions)