6 use Test::More tests => 1;
8 use Variable::Magic qw/wizard cast getdata/;
10 # Inspired by B::Hooks::EndOfScope
11 # This test is better be left at the beginning of the file, since problems
12 # happen at UNITCHECK time
17 $wiz = wizard data => sub { $_[1] }, free => sub { $_[1]->(); () };
19 cast %^H, $wiz, sub { die "harmless" };
22 pass 'die in free callback in BEGIN didn\'t segfault';