4 use Test::More tests => 3;
24 local $_in_destroy = 1;
34 my $o = bless {}, 'WithCatch';
37 if $_[0] =~ /A try\(\) may not be followed by multiple catch\(\) blocks/;
43 is $?, 0, 'nested try in cleanup after fork does not maintain outer catch block';
50 my $o = bless {}, 'WithFinally';
54 is $?, 0, 'nested try in cleanup after fork does not maintain outer finally block';
56 finally { exit 1 if $WithFinally::_in_destroy };
58 pass("Didn't just exit");