]> git.vpit.fr Git - perl/modules/Lexical-Types.git/blobdiff - t/22-magic.t
Port module loading in magic tests to VPIT::TestHelpers
[perl/modules/Lexical-Types.git] / t / 22-magic.t
index 350cbe17d4fb5dbb8607c81c051b74633ebc617c..cc8e497b30892328dd65509421cf6f0c6c9323b6 100644 (file)
@@ -5,15 +5,17 @@ use warnings;
 
 use Test::More;
 
+use lib 't/lib';
+use VPIT::TestHelpers;
+
 BEGIN {
- plan skip_all => 'Variable::Magic required to test magic'
-                                      unless eval "use Variable::Magic; 1";
+ load_or_skip('Variable::Magic', undef, [ ], 'required to test magic');
 }
 
 {
  package Lexical::Types::Test::Str;
 
- use Variable::Magic qw/wizard cast/;
+ use Variable::Magic qw<wizard cast>;
 
  our $wiz;
  BEGIN {
@@ -29,7 +31,6 @@ BEGIN {
 
 BEGIN {
  plan tests => 2 * 8;
- defined and diag "Using Variable::Magic $_" for $Variable::Magic::VERSION;
 }
 
 use Lexical::Types as => 'Lexical::Types::Test';
@@ -40,7 +41,8 @@ sub check (&$$;$) {
  my $want = wantarray;
  my @ret;
  {
-  local @{$got}{qw/get set/}; delete @{$got}{qw/get set/};
+  local @{$got}{qw<get set>};
+  delete @{$got}{qw<get set>};
   if ($want) {
    @ret = eval { $test->() };
   } elsif (defined $want) {