6 use Test::More tests => 13;
8 use Variable::Magic qw/wizard cast dispell/;
14 is join(':', map { (defined) ? $_ : 'u' } @c[0 .. 11]),
15 join(':', map { (defined) ? $_ : 'u' } @x[0 .. 11]),
20 my $wiz = wizard get => sub { ++$c[0] },
21 set => sub { ++$c[1] },
22 len => sub { ++$c[2] },
23 clear => sub { ++$c[3] },
24 free => sub { ++$c[4] },
25 copy => sub { ++$c[5] },
26 dup => sub { ++$c[6] },
27 local => sub { ++$c[7] },
28 fetch => sub { ++$c[8] },
29 store => sub { ++$c[9] },
30 'exists' => sub { ++$c[10] },
31 'delete' => sub { ++$c[11] };
32 check('scalar : create wizard');
34 my $n = int rand 1000;
38 check('scalar : cast');
42 check('scalar : assign to');
46 check('scalar : interpolate');
49 check('scalar : reference');
53 check('scalar : assign');
57 check('scalar : increment');
61 check('scalar : decrement');
65 check('scalar : multiply');
69 check('scalar : divide');
76 check('scalar : scope end');
80 check('scalar : undef');
83 check('scalar : dispell');