Branch Coverage

blib/lib/Exception/SEH.pm
Criterion Covered Total %
branch 75 84 89.2


line true false branch
47 4 1 if (exists $$cur_opts{$_}) { }
73 0 132 if ((my $token = $parser->get_word) ne 'try')
79 0 132 if ($parser->get_symbols(2) eq '=>')
85 101 30 unless $OPTS{Devel::Declare::get_curstash_name()}{'-noret'} or $return_hook_id
97 157 63 if ($return_hook_id and --$hook_nested_level <= 0)
111 95 125 if ($token eq 'catch') { }
26 99 elsif ($token eq 'finally') { }
124 4 22 if ($prev_item_type == 2)
137 0 95 if ($prev_item_type == 2)
147 66 29 if ($parser->get_symbols(1) eq '(') { }
150 63 3 if (length $args) { }
154 5 58 if ($type and not $err_var)
158 26 32 if ($type) { }
165 10 48 if ($where_present and not $where =~ /^{.*}$/)
169 9 39 if ($where) { }
175 4 44 if (pos $args != length $args)
188 58 18 unless $OPTS{Devel::Declare::get_curstash_name()}{'-noret'} or $return_hook_id
194 38 32 if $err_var
201 1 127 if $$opts{'-nosig'}
206 104 24 if (not defined EVAL() or EVAL() != CALLER(2))
212 102 26 scalar @_ % 3 == 0 ? :
216 104 24 $is_top_try ? :
217 1 127 $$opts{'-noret'} ? :
221 0 128 if ($context) { }
60 68 elsif (defined $context) { }
230 44 84 if $err
232 31 13 if ($err and scalar @_)
243 29 19 if (not $type or $err_blessed and $err->isa($type))
250 9 20 if (defined $where)
252 3 4 unless &$where()
262 0 24 if ($context) { }
2 22 elsif (defined $context) { }
270 4 20 unless (eval { do { $@ = $err; if ($context) { @_result = &$handler(@$params); } elsif (defined $context) { $_result[0] = &$handler(@$params); } else { &$handler(@$params); } ; 1 } })
275 0 24 if ($need_unwind) { }
284 2 29 unless (eval { do { my $err_blessed = blessed $err; my $pos = -3; while ($pos + 3 < scalar @_) { $pos += 3; my($type, $where, $handler) = @_[$pos .. $pos + 2]; if (not $type or $err_blessed and $err->isa($type)) { if (defined $where) { local $_ = $err; next unless &$where(); } ; $exception_caught = 1; my $_need_unwind = $need_unwind; $need_unwind = 0; my @_result; unless (eval { do { $@ = $err; if ($context) { @_result = &$handler(@$params); } elsif (defined $context) { $_result[0] = &$handler(@$params); } else { &$handler(@$params); } ; 1 } }) { $err = $@; $catch_fail = 1; } ; if ($need_unwind) { @result = @_result; } else { $need_unwind = $_need_unwind; } ; last; } ; } ; 1 } })
290 26 102 if (defined $finally)
295 21 103 if ($catch_fail or not $exception_caught || $$opts{'-safetry'})
300 99 4 if ($$opts{'-noret'} or not $need_unwind) { }
4 0 elsif ($need_unwind) { }
303 0 99 wantarray ? :
306 3 1 if $is_top_try
307 0 4 $context ? :