]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/30-scalar.t
Tweak some optional module loading in tests
[perl/modules/Variable-Magic.git] / t / 30-scalar.t
index caf76c9c558b3a411c895d7cac1cbfa02166b8eb..c92b1869b2c33e09f2b42d0086808028ff441e3c 100644 (file)
@@ -105,11 +105,13 @@ watch { $h{b} = 4 } { }, 'hash element: set after delete';
 SKIP: {
  my $SKIP;
 
unless (MGf_COPY) {
if (!MGf_COPY) {
   $SKIP = 'No copy magic for this perl';
  } else {
-  eval "use Tie::Array";
-  $SKIP = 'Tie::Array required to test clear magic on tied array values' if $@;
+  local $@;
+  unless (eval { require Tie::Array; 1 }) {
+   $SKIP = 'Tie::Array required to test clear magic on tied array values';
+  }
  }
 
  skip $SKIP => 3 if $SKIP;