5 use Test::More skip_all => 'stuff relating to RT#24678 that I have not fixed yet';
7 use Test::Exception tests => 12;
9 sub A1::DESTROY {eval{}}
10 dies_ok { my $x = bless [], 'A1'; die } q[Unlocalized $@ for eval{} during DESTROY];
12 sub A2::DESTROY {die 43 }
13 throws_ok { my $x = bless [], 'A2'; die 42} qr/42.+43/s, q[Died with the primary and secondar errors];
15 sub A2a::DESTROY { die 42 }
16 throws_ok { my $obj = bless [], 'A2a'; die 43 } qr/43/,
17 q[Of multiple failures, the "primary" one is returned];
21 dies_ok { my $x = bless [], 'A3'; 1 } q[Death during destruction for success is noticed];
25 sub A4::DESTROY {delete$SIG{__DIE__};eval{}}
26 dies_ok { my $x = bless [], 'A4'; die } q[Unlocalized $@ for eval{} during DESTROY];
28 sub A5::DESTROY {delete$SIG{__DIE__};die 43 }
29 throws_ok { my $x = bless [], 'A5'; die 42} qr/42.+43/s, q[Died with the primary and secondar errors];
32 our $TODO = q[No clue how to solve this one.];
33 sub A6::DESTROY {delete$SIG{__DIE__};die}
34 dies_ok { my $x = bless [], 'A6'; 1 } q[Death during destruction for success is noticed];
38 dies_ok { die bless [], 0 } q[Died with a "false" exception class];
39 dies_ok { die bless [], "\0" } q[Died with a "false" exception class];
42 use overload bool => sub { 0 }, '0+' => sub { 0 }, '""' => sub { '' }, fallback => 1;
44 dies_ok { die bless [], 'A7' } q[False overloaded exceptions are noticed];
47 $main::{'0::'} = $main::{'A7::'};
48 dies_ok { die bless [], 0 } q[Died a false death];
52 use overload bool => sub {eval{};0}, '0+' => sub{eval{};0}, '""' => sub { eval{}; '' }, fallback => 1;
54 dies_ok { die bless [], 'A8' } q[Evanescent exceptions are noticed];
59 dies_ok{ my $foo = Foo->new; die "Fatal Error" };
60 lives_ok{ my $foo = Foo->new; die "Fatal Error" };
63 # Code died, but appeared to live because $@ was reset
64 # unexpectedly by a DESTROY method called during cleanup
66 # Code died, but appeared to live because $@ was reset
67 # unexpectedly by a DESTROY method called during cleanup