6 use lib qw{blib/arch blib/lib};
7 use Variable::Magic qw/wizard cast dispell/;
9 sub foo { print STDERR "got ${$_[0]}!\n" }
10 my $bar = sub { ++${$_[0]}; print STDERR "now set to ${$_[0]}!\n"; };
14 my $wiz = wizard get => \&foo,
16 free => sub { print STDERR "deleted!\n"; };
17 cast $a, $wiz, qw/a b c/;
18 ++$a; # "got 1!", "now set to 3!"
24 my $b = $a; # "got 3!"
25 $a = 3; # "now set to 4!"