]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blob - t/lib/Variable/Magic/TestDieRequired.pm
Fix and test segfaults and wrong "Unknown error" exceptions when dieing in require...
[perl/modules/Variable-Magic.git] / t / lib / Variable / Magic / TestDieRequired.pm
1 package Variable::Magic::TestDieRequired;
2
3 use Test::More;
4
5 use Variable::Magic qw/wizard cast/;
6
7 my $wiz;
8
9 BEGIN {
10  $wiz = wizard
11   data => sub { $_[1] },
12   free => sub { $_[1]->(); () };
13 }
14
15 sub hook (&) {
16  $^H |= 0x020000;
17  cast %^H, $wiz, shift;
18 }
19
20 BEGIN {
21  hook { pass 'in Variable::Magic::TestRequired hook' };
22  die 'turnip';
23 }
24
25 1;