]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/16-huf.t
Update how author tests load their dependencies
[perl/modules/Variable-Magic.git] / t / 16-huf.t
index 32f767770749e8bd8fe41f33397652d8ffff6c77..0f9215c689a217f38af86d135a516ae8ed3bc179 100644 (file)
@@ -7,20 +7,17 @@ use Test::More;
 
 use Variable::Magic qw<wizard cast dispell VMG_UVAR>;
 
-if (!VMG_UVAR) {
- plan skip_all => 'No nice uvar magic for this perl';
-}
+use lib 't/lib';
+use VPIT::TestHelpers;
 
-eval "use Hash::Util::FieldHash";
-if ($@) {
- plan skip_all => 'Hash::Util::FieldHash required for testing uvar interaction';
-} else {
+if (VMG_UVAR) {
+ load_or_skip('Hash::Util::FieldHash', undef, [ ],
+              'required for testing uvar interaction');
  plan tests => 2 * 5 + 7 + 1;
- defined and diag "Using Hash::Util::FieldHash $_"
                                           for $Hash::Util::FieldHash::VERSION;
+} else {
skip_all 'No nice uvar magic for this perl';
 }
 
-use lib 't/lib';
 use Variable::Magic::TestWatcher;
 
 my $wiz = init_watcher [ qw<fetch store> ], 'huf';