Branch Coverage

blib/lib/Plack/Middleware/CSRFBlock.pm
Criterion Covered Total %
branch 33 40 82.5


line true false branch
23 3 1 unless defined $self->parameter_name
24 2 2 unless defined $self->token_length
25 4 0 unless defined $self->session_key
48 4 46 unless defined $self->logger
55 0 50 unless ($session)
57 0 0 unless $session
61 28 22 if ($request->method =~ /^post$/i)
66 8 20 unless $token
73 1 19 $found ? :
76 19 1 unless ($found)
79 19 0 $found ? :
82 0 20 unless $found
85 3 17 if $self->onetime
91 24 7 unless ($ct =~ m[^text/html]i or $ct =~ m[^application/xhtml[+]xml]i)
110 1 131 if ($tag eq 'head' and $self->meta_tag)
119 112 20 unless $tag eq 'form' and $$attr{'method'} =~ /post/i
121 16 4 unless ($$attr{'action'} =~ m[^https?://([^/:]+)[/:]] and $1 ne $http_host)
137 0 36 if $done
139 18 18 if (defined(my $chunk = shift())) { }
156 2 6 if (my $app_for_blocked = $self->blocked) { }