4 chdir '..' if -d '../pod' && -d '../t';
14 unless (open(MANIFEST, "MANIFEST")) {
15 die "$0: failed to open 'MANIFEST': $!\n";
19 $Core_Modules{$_[0]}++;
23 next unless m!^lib/(\S+?)\.pm!;
31 # Delete stuff that can't be tested here.
34 delete $Core_Modules{$_[0]};
38 $Config{extensions} =~ /\b$_[0]\b/i;
41 sub delete_unless_has_extension {
42 delete $Core_Modules{$_[0]} unless has_extension($_[0]);
45 foreach my $known_extension (split(' ', $Config{known_extensions})) {
46 delete_unless_has_extension($known_extension);
49 sub delete_by_prefix {
50 for my $match (grep { /^$_[0]/ } keys %Core_Modules) {
51 delete_by_name($match);
55 delete_by_name('CGI::Fast'); # won't load without FCGI
57 delete_by_name('Devel::DProf'); # needs to be run as -d:DProf
59 delete_by_prefix('ExtUtils::MM_'); # ExtUtils::MakeMaker's domain
61 delete_by_prefix('File::Spec::'); # File::Spec's domain
62 add_by_name('File::Spec::Functions'); # put this back
66 exists $Config{$use} &&
67 defined $Config{$use} &&
68 $Config{$use} eq 'define';
71 unless (using_feature('threads') && has_extension('Thread')) {
72 delete_by_name('Thread');
73 delete_by_prefix('Thread::');
76 delete_by_prefix('unicode::');
77 add_by_name('unicode::distinct'); # put this back
80 # Delete all modules which have their own tests. This makes
81 # this test a lot faster.
82 foreach my $mod (<DATA>) {
87 # Okay, this is the list.
89 my @Core_Modules = sort keys %Core_Modules;
91 print "1..".@Core_Modules."\n";
95 foreach my $module (@Core_Modules) {
96 print "# $module compile failed\nnot " unless compile_module($module);
97 print "ok $test_num\n";
101 # We do this as a separate process else we'll blow the hell
102 # out of our namespace.
104 my ($module) = $_[0];
106 return scalar `$^X "-Ilib" t/lib/compmod.pl $module` =~ /^ok/;
150 File::Spec::Functions