X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F28-uvar.t;h=4c6d9024f8770ec97af40eb9c7dad94598af859a;hb=HEAD;hp=acc761f24f795fa0880585fe15a05ce9e452d1a2;hpb=e5e39f5e8bec67b3a08f861da63c5eb4cafed09f;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/28-uvar.t b/t/28-uvar.t index acc761f..4c6d902 100644 --- a/t/28-uvar.t +++ b/t/28-uvar.t @@ -5,7 +5,10 @@ use warnings; use Test::More; -use Variable::Magic qw/wizard cast dispell VMG_UVAR/; +use lib 't/lib'; +use VPIT::TestHelpers; + +use Variable::Magic qw; if (VMG_UVAR) { plan tests => 2 * 15 + 12 + 14 + (4 * 2 * 2 + 1 + 1) + 1; @@ -17,7 +20,7 @@ use lib 't/lib'; use Variable::Magic::TestWatcher; use Variable::Magic::TestValue; -my $wiz = init_watcher [ qw/fetch store exists delete/ ], 'uvar'; +my $wiz = init_watcher [ qw ], 'uvar'; my %h = (a => 1, b => 2, c => 3); @@ -51,9 +54,7 @@ $x = watch { $h{a} } { fetch => 1 }, 'fetch directly with also non uvar magic'; is $x, 1, 'uvar: fetch directly with also non uvar magic correctly'; SKIP: { - eval "use Tie::Hash"; - skip 'Tie::Hash required to test uvar magic on tied hashes' => 2 * 5 + 4 if $@; - defined and diag "Using Tie::Hash $_" for $Tie::Hash::VERSION; + load_or_skip('Tie::Hash', undef, undef, 2 * 5 + 4); tie my %h, 'Tie::StdHash'; %h = (x => 7, y => 8);