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::');
84 # Delete all modules which have their own tests.
85 # This makes this test a lot faster.
86 foreach my $mod (<DATA>) {
91 # Okay, this is the list.
93 my @Core_Modules = sort keys %Core_Modules;
95 print "1..".@Core_Modules."\n";
99 foreach my $module (@Core_Modules) {
100 print "$module compile failed\nnot " unless compile_module($module);
101 print "ok $test_num\n";
105 # We do this as a separate process else we'll blow the hell
106 # out of our namespace.
108 my ($module) = $_[0];
110 my $out = scalar `$^X "-Ilib" t/lib/compmod.pl $module`;
112 return $out =~ /^ok/;
115 # Add here modules that have their own test scripts and therefore
116 # need not be test-compiled by 1_compile.t.
164 File::Spec::Functions