Branch Coverage

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


line true false branch
26 2 1 if (my $data = $self->data) { }
1 0 elsif (my $file = $self->file) { }
28 0 2 if ($self->file)
35 1 1 if (ref $data) { }
37 0 1 unless print {$fh;} $encoder->encode($data)
41 0 1 unless print {$fh;} $data
51 0 1 unless (-r $file)
65 0 5 unless ($env->{'REQUEST_URI'} eq "/.well-known/traffic-advice")
69 1 4 unless ($env->{'REQUEST_METHOD'} =~ /^(GET|HEAD)$/)
77 0 4 unless open my $fh, "<:raw", $file