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
64 delete_by_prefix('Attribute::Handlers');# we test this, and we have demos
68 exists $Config{$use} &&
69 defined $Config{$use} &&
70 $Config{$use} eq 'define';
73 unless (using_feature('threads') && has_extension('Thread')) {
74 delete_by_name('Thread');
75 delete_by_prefix('Thread::');
78 unless (has_extension('NDBM_File')) {
79 delete_by_name('Memoize::NDBM_File');
82 delete_by_prefix('unicode::');
83 add_by_name('unicode::distinct'); # put this back
85 # Delete all modules which have their own tests.
86 # This makes this test a lot faster.
87 foreach my $mod (<DATA>) {
92 # Okay, this is the list.
94 my @Core_Modules = sort keys %Core_Modules;
96 print "1..".@Core_Modules."\n";
100 foreach my $module (@Core_Modules) {
101 print "# $module compile failed\nnot " unless compile_module($module);
102 print "ok $test_num\n";
106 # We do this as a separate process else we'll blow the hell
107 # out of our namespace.
109 my ($module) = $_[0];
111 return scalar `$^X "-Ilib" t/lib/compmod.pl $module` =~ /^ok/;
114 # Add here modules that have their own test scripts and therefore
115 # need not be test-compiled by 1_compile.t.
163 File::Spec::Functions