/Module-Math-Depends-0.02/t/99_pmv.t

# · Perl · 27 lines · 17 code · 6 blank · 4 comment · 1 complexity · 9827cb362cb7aefe36e3decc6cf0850f MD5 · raw file

  1. #!/usr/bin/perl
  2. # Test that our declared minimum Perl version matches our syntax
  3. use strict;
  4. BEGIN {
  5. $| = 1;
  6. $^W = 1;
  7. }
  8. my $MODULE = 'Test::MinimumVersion 0.008';
  9. # Don't run tests for installs
  10. use Test::More;
  11. unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
  12. plan( skip_all => "Author tests not required for installation" );
  13. }
  14. # Load the testing module
  15. eval "use $MODULE";
  16. if ( $@ ) {
  17. $ENV{RELEASE_TESTING}
  18. ? die( "Failed to load required release-testing module $MODULE" )
  19. : plan( skip_all => "$MODULE not available for testing" );
  20. }
  21. all_minimum_version_from_metayml_ok();