Branch Coverage

blib/lib/Plack/Middleware/TrafficAdvice.pm
Criterion Covered Total %
branch 13 20 65.0


line true false branch
24 2 1 if (my $data = $self->data) { }
1 0 elsif (my $file = $self->file) { }
26 0 2 if ($self->file)
33 1 1 if (ref $data) { }
35 0 1 unless print {$fh;} $encoder->encode($data)
39 0 1 unless print {$fh;} $data
49 0 1 unless (-r $file)
63 0 5 unless ($env->{'REQUEST_URI'} eq "/.well-known/traffic-advice")
67 1 4 unless ($env->{'REQUEST_METHOD'} =~ /^(GET|HEAD)$/u)
75 0 4 unless open my $fh, "<:raw", $file