Branch Coverage

lib/Net/Statsite/Client.pm
Criterion Covered Total %
branch 13 26 50.0


line true false branch
50 4 0 unless defined $options{'host'}
51 2 2 unless defined $options{'port'}
52 4 0 unless defined $options{'prefix'}
53 2 2 unless defined $options{'proto'}
55 1 3 unless $options{'proto'} =~ /^(?:tcp|udp)$/
61 0 3 unless my $sock = 'IO::Socket::INET'->new('PeerAddr', $options{'host'}, 'PeerPort', $options{'port'}, 'Proto', $options{'proto'})
107 2 3 unless defined $delta
109 1 4 if (ref $stats eq 'ARRAY') { }
153 0 0 unless defined $sample_rate
156 0 0 if (defined $sample_rate and $sample_rate < 1) { }
158 0 0 if rand() <= $sample_rate
165 0 0 unless keys %$sampled_data
173 0 0 if ($self->{'prefix'})