6 use Test::More tests => 2 * 4 + 2 + 1;
8 use Variable::Magic qw/cast/;
11 use Variable::Magic::TestWatcher;
13 my $wiz = init 'get', 'get';
15 my $n = int rand 1000;
18 check { cast $a, $wiz } { }, 'cast';
20 my $b = check { $a } { get => 1 }, 'assign to';
21 is $b, $n, 'get: assign to correctly';
23 $b = check { "X${a}Y" } { get => 1 }, 'interpolate';
24 is $b, "X${n}Y", 'get: interpolate correctly';