Branch Coverage

blib/lib/CGI/Application/Plugin/RateLimit.pm
Criterion Covered Total %
branch 0 44 0.0


line true false branch
34 0 0 if $$cgi_app{'__rate_limit_obj'}
59 0 0 unless $limits
68 0 0 if ($self->check_violation('action', $action, 'limits', $limits))
72 0 0 if ($self->violation_mode) { }
86 0 0 unless $$self{$name}
91 0 0 unless $$self{'violation_mode'} or $$self{'violation_callback'}
103 0 0 unless $digits and $modifier
107 0 0 if $modifier eq 's'
108 0 0 if $modifier eq 'm'
109 0 0 if $modifier eq 'h'
114 0 0 unless @_ > 1
121 0 0 unless @_ > 1
132 0 0 unless keys %$limits == 2
146 0 0 unless $user_id
151 0 0 unless $self->record_hit_sth($dbh)->execute($user_id, $args{'action'}, $timestamp)
167 0 0 unless my $last_hit = $$self{'last_hit'}
171 0 0 unless $sth->execute($$last_hit{'user_id'}, $$last_hit{'action'}, $$last_hit{'timestamp'})
186 0 0 unless $user_id
193 0 0 if ($args{'limits'}) { }
199 0 0 unless $limits
211 0 0 if ($count > $$limits{'max_hits'})
214 0 0 if ($is_mode) { }