Condition Coverage

blib/lib/Net/Dogstatsd.pm
Criterion Covered Total %
condition 40 44 90.9


and 3 conditions

line !l l&&!r l&&r condition
167 314 1 1 defined $value and $value =~ /^[01]$/
526 16 0 2 defined $args{'value'} && $args{'value'} ne ''
561 58 6 36 defined $args{'tags'} and scalar @{$args{'tags'};} != 0
638 1 41 15 defined $args{'tags'} and scalar @{$args{'tags'};} != 0

or 2 conditions

line l !l condition
197 8 0 'IO::Socket::INET'->new('PeerAddr', $$self{'host'}, 'PeerPort', $$self{'port'}, 'Proto', 'udp') || die('Could not open UDP connection to' . $$self{'host'} . ':' . $$self{'port'} . "\n")

or 3 conditions

line l !l&&r !l&&!r condition
298 2 1 38 not defined $args{$arg} or $args{$arg} eq ''
349 2 1 38 not defined $args{$arg} or $args{$arg} eq ''
402 3 1 67 not defined $args{$arg} or $args{$arg} eq ''
416 1 17 1 $args{'unit'} eq 's' or $args{'unit'} eq 'sec'
465 2 1 36 not defined $args{$arg} or $args{$arg} eq ''
512 2 0 44 not defined $args{$arg} or $args{$arg} eq ''
519 8 0 2 not $args{'value'} =~ /^\d+$/ or $args{'value'} <= 0
588 18 6 6 not Data::Validate::Type::is_number($args{'sample_rate'}, 'strictly_positive', 1) or $args{'sample_rate'} > 1
612 4 1 176 not defined $args{$arg} or $args{$arg} eq ''
662 49 3 4 $args{'sample_rate'} == 1 or rand() < $args{'sample_rate'}