use Variable::Magic qw/wizard gensig getsig cast dispell MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR/;
-my $args = 7;
+my $args = 8;
++$args if MGf_COPY;
++$args if MGf_DUP;
++$args if MGf_LOCAL;
-$args += 4 if VMG_UVAR;
+$args += 5 if VMG_UVAR;
for (0 .. 20) {
next if $_ == $args;
eval { Variable::Magic::_wizard(('hlagh') x $_) };
ok($res, 're-cast is valid');
$res = eval { dispell $a, gensig };
-is($@, '', 're-dispell from wrong sig doesn\'t croak');
+like($@, qr/Invalid\s+wizard\s+object\s+at\s+\Q$0\E/, 're-dispell from wrong sig croaks');
is($res, undef, 're-dispell from wrong sig doesn\'t return anything');
$res = eval { dispell $a, undef };