+foreach my $file (@testitems) {
+ $file =~ s/\s.*$//; # nuke everything after the first space (#comment)
+ next if !$file; # skip null entries
+
+ open (FILE,$file);
+ my $bang = <FILE>;
+ close (FILE);
+ my $T = "";
+ $T = "T" if $bang =~ m/#!\S*perl\s+-.*T/;
+
+ if (-l $file) {
+ ok(1, "$file is a symlink");
+ } else {
+ push @to_compile, [ $file, $T ];
+ }
+}
+
+my $pool = Thread::Pool::Simple->new(
+ min => 2,
+ max => Sys::CPU::cpu_count() + 1,
+ do => [ \&test_compile_file ],
+ passid => 0,
+);
+
+$pool->add($_) for @to_compile;
+
+$pool->join;
+