]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
Code cleanups in Variable::Magic::TestGlobalDestruction::import
authorVincent Pit <vince@profvince.com>
Tue, 10 Mar 2015 19:10:36 +0000 (16:10 -0300)
committerVincent Pit <vince@profvince.com>
Tue, 10 Mar 2015 19:12:45 +0000 (16:12 -0300)
t/lib/Variable/Magic/TestGlobalDestruction.pm

index 3299bf30c8bfe70071d0f81016c94227ea6ecbaf..83f88bbfe1fb9ee726c2486385ef2a8f151e99aa 100644 (file)
@@ -74,13 +74,13 @@ sub import {
  my $env_level = int($ENV{PERL_DESTRUCT_LEVEL} || 0);
  if ($env_level >= $level) {
   my $is_debugging = is_debugging_perl();
  my $env_level = int($ENV{PERL_DESTRUCT_LEVEL} || 0);
  if ($env_level >= $level) {
   my $is_debugging = is_debugging_perl();
-  require Test::More;
+
   if ($is_debugging) {
    _diag("Global destruction level $env_level set by PERL_DESTRUCT_LEVEL (debugging perl)");
    return 1;
   if ($is_debugging) {
    _diag("Global destruction level $env_level set by PERL_DESTRUCT_LEVEL (debugging perl)");
    return 1;
-  } else {
-   _diag("PERL_DESTRUCT_LEVEL is set to $env_level, but this perl doesn't seem to have debugging enabled");
   }
   }
+
+  _diag("PERL_DESTRUCT_LEVEL is set to $env_level, but this perl doesn't seem to have debugging enabled");
  }
 
  my $has_perl_destruct_level = do {
  }
 
  my $has_perl_destruct_level = do {
@@ -91,6 +91,7 @@ sub import {
    1;
   }
  };
    1;
   }
  };
+
  if ($has_perl_destruct_level) {
   _diag("Global destruction level $level set by Perl::Destruct::Level");
   return 1;
  if ($has_perl_destruct_level) {
   _diag("Global destruction level $level set by Perl::Destruct::Level");
   return 1;