3 use Test::More tests => 10;
5 use Variable::Magic qw/wizard cast dispell/;
11 for (0 .. 4) { return 0 unless $c[$_] == $x[$_]; }
16 my $wiz = wizard get => sub { ++$c[0] },
17 set => sub { ++$c[1] },
18 len => sub { ++$c[2] },
19 clear => sub { ++$c[3] },
20 free => sub { ++$c[4] };
21 ok(check(), 'code : create wizard');
28 ok(check(), 'code : cast');
32 ok(check(), 'code : assign to');
36 ok(check(), 'code : interpolate');
39 ok(check(), 'code : reference');
43 ok(check(), 'code : assign');
46 ok(check(), 'code : call');
53 ok(check(), 'code : scope end');
57 ok(check(), 'code : undef');
60 ok(check(), 'code : dispell');