From: Vincent Pit Date: Wed, 11 Feb 2009 23:23:12 +0000 (+0100) Subject: Prefer using VMG_OP_INFO_* constants in t/35-stash.t X-Git-Tag: v0.30~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=d95ead7a2c4369d918a1fa20286cdeb4150a59ee Prefer using VMG_OP_INFO_* constants in t/35-stash.t --- diff --git a/t/35-stash.t b/t/35-stash.t index 54c6b16..13336f7 100644 --- a/t/35-stash.t +++ b/t/35-stash.t @@ -5,7 +5,7 @@ use warnings; use Test::More; -use Variable::Magic qw/wizard cast dispell VMG_UVAR/; +use Variable::Magic qw/wizard cast dispell VMG_UVAR VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT/; my $run; if (VMG_UVAR) { @@ -114,7 +114,7 @@ CB $code .= ', data => sub { +{ guard => 0 } }'; -$wiz = eval $code . ', op_info => 1'; +$wiz = eval $code . ', op_info => ' . VMG_OP_INFO_NAME; diag $@ if $@; { @@ -128,14 +128,14 @@ eval q{ meh(); }; -is $@, "ok\n", 'stash: function call with op_info 1 compiled fine'; +is $@, "ok\n", 'stash: function call with op name compiled fine'; { no strict 'refs'; dispell %{"Hlagh::"}, $wiz; } -$wiz = eval $code . ', op_info => 2'; +$wiz = eval $code . ', op_info => ' . VMG_OP_INFO_OBJECT; diag $@ if $@; { @@ -149,7 +149,7 @@ eval q{ wat(); }; -is $@, "ok\n", 'stash: function call with op_info 2 compiled fine'; +is $@, "ok\n", 'stash: function call with op object compiled fine'; { no strict 'refs';