X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F16-huf.t;h=024a39c9bb32ad90c71d2e6d571213b3cb8c01e0;hb=93df7812b9a0da8cdfa57a107eb2f8f4b4744b49;hp=af9e74022a62ef2513bc2731c114f18ccd364f49;hpb=788d90465f0c4180f7b27d63f355bbf260ecb972;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/16-huf.t b/t/16-huf.t index af9e740..024a39c 100644 --- a/t/16-huf.t +++ b/t/16-huf.t @@ -5,24 +5,18 @@ use warnings; use Test::More; -use Variable::Magic qw; +use lib 't/lib'; +use VPIT::TestHelpers; -if (!VMG_UVAR) { - plan skip_all => 'No nice uvar magic for this perl'; -} +use Variable::Magic qw; -{ - 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' - } +if (VMG_UVAR) { + load_or_skip_all('Hash::Util::FieldHash', undef, [ ]); + plan tests => 2 * 5 + 7 + 1; +} else { + skip_all 'No nice uvar magic for this perl'; } -use lib 't/lib'; use Variable::Magic::TestWatcher; my $wiz = init_watcher [ qw ], 'huf';