Branch Coverage

blib/lib/Net/Domain.pm
Criterion Covered Total %
branch 17 76 22.3


line true false branch
32 0 1 if defined $host
35 0 1 if ($^O eq 'MSWin32') { }
0 1 elsif ($^O eq 'MacOS') { }
0 1 elsif ($^O eq 'VMS') { }
41 0 0 if defined $host
43 0 0 if (defined $host and index($host, ".") > 0)
53 0 0 if defined $ENV{'UCX$INET_HOST'}
54 0 0 if defined $ENV{'MULTINET_HOST_NAME'}
55 0 0 if (index($host, ".") > 0)
72 0 0 syscall(&main::SYS_gethostname, $tmp, 256) == 0 ? :
0 1 if eval { do { package main; require "syscall.ph"; defined &main::SYS_gethostname } } or eval { do { package main; require "sys/syscall.ph"; defined &main::SYS_gethostname } }
102 0 0 unless eval { do { my $tmp = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; $host = syscall(&main::SYS_gethostname, $tmp, 256) == 0 ? $tmp : undef if eval { do { package main; require "syscall.ph"; defined &main::SYS_gethostname } } or eval { do { package main; require "sys/syscall.ph"; defined &main::SYS_gethostname } } } } or eval { do { require POSIX; $host = (POSIX::uname())[1] } } or eval { do { chop($host = `(hostname) 2>/dev/null`) } } or eval { do { chop($host = `uname -n 2>/dev/null`) } } or eval { do { $host = (split(/[:. ]/, `/com/host`, 6))[0] } }
117 0 1 if defined $domain
123 0 1 if defined $Net::Domain::NetConfig{'inet_domain'}
132 1 0 if (open my $res, "<", "/etc/resolv.conf")
134 1 5 if /\A\s*(?:domain|search)\s+(\S+)/
139 1 0 if defined $domain
150 0 0 unless (defined $host and $host =~ /\./)
158 0 0 syscall(&main::SYS_getdomainname, $tmp, 256) == 0 ? :
0 0 if eval { do { package main; require "syscall.ph" } } or eval { do { package main; require "sys/syscall.ph" } }
168 0 0 if ($^O eq "VMS")
173 0 0 unless defined $dom or $^O =~ /^(?:cygwin|MSWin32|android)/
176 0 0 if (defined $dom)
181 0 0 unless $dom =~ s/^[^.]+.+//
192 0 0 unless @info
196 0 0 if (rindex($site, ".") > 0)
210 0 0 if (defined $domain)
222 2 1 if defined $fqdn
229 0 1 if ($^O eq "darwin" and $host =~ /\.local$/)
240 1 0 if defined $host and defined $domain and not $host =~ /\./ and $domain =~ /\./
247 0 0 if defined $host and $host =~ /^\d+(\.\d+){3}$/
249 0 0 defined $host ? :
250 0 0 defined $domain ? :
262 0 0 if ((gethostbyname $tmp)[0])
269 0 0 unless shift @d
272 0 0 if (@fqdn) { }
293 0 5 unless defined $host
300 0 5 unless defined $domain