X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F16-huf.t;h=af9e74022a62ef2513bc2731c114f18ccd364f49;hb=b6b1a495f3d986ec4b8c2c02d685103e32cadb55;hp=0934219579ca9613d9955ceda412f0967ace69c0;hpb=e5e39f5e8bec67b3a08f861da63c5eb4cafed09f;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/16-huf.t b/t/16-huf.t index 0934219..af9e740 100644 --- a/t/16-huf.t +++ b/t/16-huf.t @@ -5,25 +5,27 @@ use warnings; use Test::More; -use Variable::Magic qw/wizard cast dispell VMG_UVAR/; +use Variable::Magic qw; if (!VMG_UVAR) { plan skip_all => 'No nice uvar magic for this perl'; } -eval "use Hash::Util::FieldHash"; -if ($@) { - plan skip_all => 'Hash::Util::FieldHash required for testing uvar interaction'; -} else { - plan tests => 2 * 5 + 7 + 1; - defined and diag "Using Hash::Util::FieldHash $_" +{ + local $@; + if (eval { require Hash::Util::FieldHash; 1 }) { + plan tests => 2 * 5 + 7 + 1; + defined and diag "Using Hash::Util::FieldHash $_" for $Hash::Util::FieldHash::VERSION; + } else { + plan skip_all => 'Hash::Util::FieldHash required for testing uvar interaction' + } } use lib 't/lib'; use Variable::Magic::TestWatcher; -my $wiz = init_watcher [ qw/fetch store/ ], 'huf'; +my $wiz = init_watcher [ qw ], 'huf'; ok defined($wiz), 'huf: wizard with uvar is defined'; is ref($wiz), 'SCALAR', 'huf: wizard with uvar is a scalar ref';