8 eval "use Symbol qw/gensym/";
10 plan skip_all => "Symbol::gensym required for testing magic for globs";
15 use Variable::Magic qw/wizard cast dispell/;
21 for (0 .. 11) { return 0 unless $c[$_] == $x[$_]; }
26 my $wiz = wizard get => sub { ++$c[0] },
27 set => sub { ++$c[1] },
28 len => sub { ++$c[2] },
29 clear => sub { ++$c[3] },
30 free => sub { ++$c[4] },
31 copy => sub { ++$c[5] },
32 dup => sub { ++$c[6] },
33 local => sub { ++$c[7] },
34 fetch => sub { ++$c[8] },
35 store => sub { ++$c[9] },
36 'exists' => sub { ++$c[10] },
37 'delete' => sub { ++$c[11] };
38 ok(check(), 'glob : create wizard');
43 ok(check(), 'glob : cast');
46 ok(check(), 'glob : assign to');
50 ok(check(), 'glob : assign');
56 ok(check(), 'glob : scope end');
59 ok(check(), 'glob : undef');
62 ok(check(), 'glob : dispell');