Branch Coverage

blib/lib/Try/ALRM.pm
Criterion Covered Total %
branch 37 44 84.0


line true false branch
24 5 54 if (defined $timeout)
33 1 50 if (defined $tries)
54 27 5 exists $spec->{'timeout'} ? :
55 30 2 exists $spec->{'tries'} ? :
93 10 24 if ($ok)
98 20 0 if (ref $eval_error and ref $eval_error eq "Try::ALRM::_Timeout" and builtin::refaddr($eval_error) == builtin::refaddr($alarm_token))
114 2 26 unless (eval { do { &$finally_block($attempts, $succeeded); 1 } })
118 4 24 if defined $error
119 1 23 if defined $finally_error
146 0 44 unless $frame
166 0 20 unless (@expired)
173 14 6 if (ref $frame->{'handler'} eq "CODE")
183 41 37 unless @ALARM_STACK
191 0 37 if ($remaining <= 0)
204 0 37 int $value == $value ? :
210 0 34 if @args % 2
217 1 59 unless $key eq "ALRM" or $key eq "finally" or $key eq "timeout" or $key eq "tries"
224 1 89 if exists $spec{$key}
226 31 58 if ($key eq "ALRM" or $key eq "finally")
227 0 31 unless ref $value eq "CODE"
240 2 35 unless defined $timeout and $timeout =~ /\A[1-9][0-9]*\z/
248 2 29 unless defined $tries and $tries =~ /\A[1-9][0-9]*\z/