4 if (-d '../pod' && -d '../t') {
6 my ($v,$d,$f) = File::Spec->splitpath($^X);
7 $^X = File::Spec->catfile(File::Spec->curdir, $f)
8 if $^X eq File::Spec->catfile(File::Spec->updir, $f);
21 unless (open(MANIFEST, "MANIFEST")) {
22 die "$0: failed to open 'MANIFEST': $!\n";
26 $Core_Modules{$_[0]}++;
30 if (m!^(lib)/(\S+?)\.pm\s!) {
31 # Collecting modules names from under ext/ would be
32 # rather painful since the mapping from filenames
33 # to module names is not 100%.
34 my ($dir, $module) = ($1, $2);
37 } elsif (m!^(lib|ext)/(\S+?)(?:\.t|/test.pl)\s!) {
38 my ($dir, $test) = ($1, $2);
39 $test =~ s!(\w+)/\1$!$1! if $dir eq 'ext';
40 $test =~ s!/t/[^/]+$!!;
48 # Delete stuff that can't be tested here.
51 delete $Core_Modules{$_[0]};
55 $Config{extensions} =~ /\b$_[0]\b/i;
58 sub delete_unless_has_extension {
59 delete $Core_Modules{$_[0]} unless has_extension($_[0]);
62 foreach my $known_extension (split(' ', $Config{known_extensions})) {
63 delete_unless_has_extension($known_extension);
66 sub delete_by_prefix {
67 for my $match (grep { /^$_[0]/ } keys %Core_Modules) {
68 delete_by_name($match);
72 delete_by_name('CGI::Fast'); # won't load without FCGI
74 delete_by_prefix('ExtUtils::MM_'); # ExtUtils::MakeMaker's domain
76 delete_by_prefix('File::Spec::'); # File::Spec's domain
77 add_by_name('File::Spec::Functions'); # put this back
79 delete_by_prefix('Attribute::Handlers');# we test this, and we have demos
83 exists $Config{$use} &&
84 defined $Config{$use} &&
85 $Config{$use} eq 'define';
88 unless (using_feature('threads') && has_extension('Thread')) {
89 delete_by_name('Thread');
90 delete_by_prefix('Thread::');
93 unless (has_extension('NDBM_File')) {
94 delete_by_name('Memoize::NDBM_File');
97 if (ord('A') == 193) {
98 delete_by_prefix('Net::') unless eval { require Convert::EBCDIC };
101 # Delete all modules which have their own tests.
102 # This makes this test a lot faster.
103 foreach my $mod (sort keys %Test) {
104 delete_by_name($mod);
106 foreach my $mod (<DATA>) {
108 print "### $mod has a test but is in DATA of $0\n" if exists $Test{$mod};
109 delete_by_name($mod);
112 # Okay, this is the list.
114 my @Core_Modules = sort keys %Core_Modules;
116 print "1..".@Core_Modules."\n";
120 foreach my $module (@Core_Modules) {
121 print "$module compile failed\nnot " unless compile_module($module);
122 print "ok $test_num\n";
126 # We do this as a separate process else we'll blow the hell
127 # out of our namespace.
129 my ($module) = $_[0];
131 my $out = scalar `$^X "-Ilib" t/lib/compmod.pl $module`;
133 return $out =~ /^ok/;
136 # Add here modules that have their own test scripts and therefore
137 # need not be test-compiled by 1_compile.t.
190 Pod::Text::Overstrike