8 use Variable::Magic qw/wizard cast MGf_LOCAL/;
13 plan skip_all => 'No local magic for this perl';
17 my $wiz = wizard 'local' => sub { ++$c };
18 is($c, 0, 'local : create wizard');
20 local $a = int rand 1000;
21 my $res = cast $a, $wiz;
22 ok($res, 'local : cast succeeded');
23 is($c, 0, 'local : cast didn\'t triggered the callback');
27 is($c, 1, 'local : localized');
29 is($c, 1, 'local : end of local scope');