Branch Coverage

blib/lib/Net/DHCP/Watch.pm
Criterion Covered Total %
branch 16 36 44.4


line true false branch
47 0 1 unless ($h = gethost($$self{'Server'}))
54 0 1 unless ($h = gethost($$self{'Client'}))
64 1 0 if ($$self{'Ether'} =~ /^([0-9a-f]{1,2}:)+[0-9a-f]{1,2}$/i) { }
0 0 elsif (scalar $$self{'Ether'} != 6) { }
73 1 0 if ($Net::DHCP::Watch::Config{'d_alarm'} eq 'define') { }
98 0 1 if ($$self{'Watcher'}) { }
102 0 1 unless $$self{'Watcher'} = 'IO::Socket::INET'->new('PeerAddr', $$self{'Server'}, 'PeerPort', 'bootps(67)', 'LocalAddr', inet_ntoa($$self{'Client'}), 'LocalPort', 'bootpc(68)', 'Proto', 'udp', 'Timeout', $$self{'TimeOut'})
121 0 1 unless $$self{'Watcher'}
122 0 1 unless $self->dhcp_query
138 0 1 unless ($$self{'Watcher'})
201 1 0 if $$self{'_Alarm'}
204 1 0 if $$self{'_Alarm'}
207 1 0 if $$self{'_Alarm'}
210 1 0 if $$self{'_Alarm'}
214 0 1 if ($@)
215 0 0 unless $@ =~ /alarm/i
220 0 1 if ($reply)
224 0 1 if ($ret_xid == $xid) { }