00-load.t 707 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!perl -T
  2. # vi: set tabstop=4 expandtab shiftwidth=4:
  3. use strict;
  4. use warnings;
  5. use ExtUtils::Manifest qw/maniread/;
  6. use Test::More;
  7. delete $ENV{PATH};
  8. my @modules;
  9. BEGIN {
  10. my $manifest = maniread();
  11. die 'Unable to read MANIFEST' unless $manifest;
  12. foreach my $file (keys %$manifest) {
  13. if ($file =~ m/^lib\/.*\.pm$/x) {
  14. my $module = $file;
  15. $module =~ s/^lib\///x;
  16. $module =~ s/\.pm$//x;
  17. $module =~ s/\//::/gx;
  18. push @modules, ($module);
  19. }
  20. }
  21. }
  22. plan(tests => scalar @modules);
  23. foreach my $module (sort @modules) {
  24. use_ok($module) || die "Bail out!\n";
  25. }
  26. diag( "Testing CMS $CMS::VERSION, Perl $], $^X" );