5 eval "use Symbol qw/gensym/";
7 plan skip_all => "Symbol::gensym required for testing magic for globs";
12 use Variable::Magic qw/wizard cast dispell/;
18 for (0 .. 4) { return 0 unless $c[$_] == $x[$_]; }
23 my $wiz = wizard get => sub { ++$c[0] },
24 set => sub { ++$c[1] },
25 len => sub { ++$c[2] },
26 clear => sub { ++$c[3] },
27 free => sub { ++$c[4] };
28 ok(check(), 'glob : create wizard');
33 ok(check(), 'glob : cast');
36 ok(check(), 'glob : assign to');
40 ok(check(), 'glob : assign');
46 ok(check(), 'glob : scope end');
49 ok(check(), 'glob : undef');
52 ok(check(), 'glob : dispell');