Branch Coverage

blib/lib/Plack/Middleware/Statsd.pm
Criterion Covered Total %
branch 30 46 65.2


line true false branch
33 5 0 if (my $client = $self->client)
41 1 14 if defined $self->$attr
43 1 13 unless defined $method
47 0 49 unless defined $method
54 3 0 if (my $logger = $env->{'psgix.logger'}) { }
67 1 4 if (my $attr = &first(sub { not XXX; } , "histogram", "increment", "set_add"))
71 1 3 if (my $catch = $self->catch_errors)
73 1 0 unless (XXX)
78 1 0 if (my $logger = $env->{'psgix.logger'}) { }
102 1 5 if (my $catch = $self->catch_errors) { }
117 0 6 unless $client
123 0 6 if defined $rate and $rate >= 1
133 6 0 if (defined $env->{'CONTENT_LENGTH'})
140 6 0 if (my $method = $env->{'REQUEST_METHOD'})
144 1 5 if (my $type = _mime_type_to_metric($env->{'CONTENT_TYPE'}))
149 6 0 if $env->{'REMOTE_ADDR'}
160 0 6 if ($h->exists($xsendfile))
164 6 0 if ($h->exists("Content-Length"))
169 6 0 if (my $type = _mime_type_to_metric($h->get("Content-Type")))
175 0 6 $env->{'psgix.harakiri.supported'} ? :
0 6 if ($env->{'psgix.harakiri.supported'} ? $env->{'psgix.harakiri'} : $env->{'psgix.harakiri.commit'})
184 0 6 if $client->can("flush")
193 5 7 unless my $type = $_[0]