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';
21 check { $b = $a } { get => 1 }, 'assign to';
22 is $b, $n, 'get: assign to correctly';
24 check { $b = "X${a}Y" } { get => 1 }, 'interpolate';
25 is $b, "X${n}Y", 'get: interpolate correctly';