Branch Coverage

blib/lib/Schedule/AdaptiveThrottler.pm
Criterion Covered Total %
branch 45 68 66.1


line true false branch
30 0 8 unless blessed $client and $client->can('set') and $client->can('get')
34 2 6 unless blessed $self
42 2 4 if (@_ == 1) { }
43 1 1 if (not blessed($_[0])) { }
54 4 2 if $$params{'memcached_client'}
66 54 20 if (@_ < 3) { }
71 16 4 if @_ % 2
74 43 31 blessed $self ? :
85 74 0 if (exists $params{$condition_type_tmp} and reftype($params{$condition_type_tmp}) eq 'HASH')
89 0 74 unless %conditions
98 0 296 unless $$condition_params{$condition_param_key}
101 0 296 if $condition_param_key eq 'max' || $condition_param_key eq 'ttl' and not $$condition_params{$condition_param_key} =~ /^[1-9][0-9]*$/
110 0 74 unless $condition_type
116 0 74 if defined $lockout and not $lockout =~ /^[1-9][0-9]*$/
120 0 74 if not defined $identifier or length $identifier < 1
136 3 71 if length $memcached_key > 249
140 59 15 if (defined $record) { }
146 8 51 if ($record eq 'block') { }
51 0 elsif (reftype $record eq 'ARRAY') { }
148 0 8 if $DEBUG
154 0 51 if $DEBUG
157 0 51 if $DEBUG
164 0 51 if $DEBUG
174 0 51 if $DEBUG
180 11 40 if (@$record >= $$condition{'max'}) { }
181 0 11 if $DEBUG
183 11 0 if ($lockout)
184 0 11 if $DEBUG
199 0 40 if $DEBUG
213 0 15 if $DEBUG
223 0 74 if ($conditions_unknown and not $QUIET)
232 0 74 if ($condition_type eq 'either') { }
233 0 0 @$messages_notok > 0 ? :
238 19 55 $conditions_ok == 0 ? :