From: Vincent Pit Date: Mon, 23 Mar 2009 13:57:26 +0000 (+0100) Subject: There's no need to disable strict refs for getting the stash of a package whose name... X-Git-Tag: v0.33~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=e04f9f5ebfb94be8e4ced1b5fd58071e05fd4fa4;p=perl%2Fmodules%2FVariable-Magic.git There's no need to disable strict refs for getting the stash of a package whose name is known at compile time --- diff --git a/t/35-stash.t b/t/35-stash.t index c20a6f0..a1b6a7d 100644 --- a/t/35-stash.t +++ b/t/35-stash.t @@ -34,10 +34,7 @@ $code .= ', data => sub { +{ guard => 0 } }'; my $wiz = eval $code; diag $@ if $@; -{ - no strict 'refs'; - cast %{"Hlagh::"}, $wiz; -} +cast %Hlagh::, $wiz; { local %mg; @@ -95,10 +92,7 @@ END { is_deeply \%mg, { }, 'stash: magic that remains at END time' if $run; } -{ - no strict 'refs'; - dispell %{"Hlagh::"}, $wiz; -} +dispell %Hlagh::, $wiz; $code = 'wizard ' . join (', ', map { < ' . VMG_OP_INFO_NAME; diag $@ if $@; -{ - no strict 'refs'; - cast %{"Hlagh::"}, $wiz; -} +cast %Hlagh::, $wiz; eval q{ die "ok\n"; @@ -130,18 +121,12 @@ eval q{ is $@, "ok\n", 'stash: function call with op name compiled fine'; -{ - no strict 'refs'; - dispell %{"Hlagh::"}, $wiz; -} +dispell %Hlagh::, $wiz; $wiz = eval $code . ', op_info => ' . VMG_OP_INFO_OBJECT; diag $@ if $@; -{ - no strict 'refs'; - cast %{"Hlagh::"}, $wiz; -} +cast %Hlagh::, $wiz; eval q{ die "ok\n"; @@ -151,7 +136,4 @@ eval q{ is $@, "ok\n", 'stash: function call with op object compiled fine'; -{ - no strict 'refs'; - dispell %{"Hlagh::"}, $wiz; -} +dispell %Hlagh::, $wiz;