chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
- if ($Config{'osname'} eq 'VMS' or
- $Config{'osname'} eq 'OS2'); # "case-forgiving"
+ if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
# Change 1..1 below to 1..last_test_to_print .
# (It may become useful if the test is moved to ./t subdirectory.)
-BEGIN {print "1..1\n";}
+BEGIN { $| = 1; print "1..1\n"; }
END {print "not ok 1\n" unless $loaded;}
_END_
print EX <<_END_;
close(EX) || die "Can't close $ext$modpname/Changes: $!\n";
warn "Writing $ext$modpname/MANIFEST\n";
-system '/bin/ls > MANIFEST' or system 'ls > MANIFEST';
+open(MANI,'>MANIFEST') or die "Can't create MANIFEST: $!";
+@files = <*>;
+if (!@files) {
+ eval {opendir(D,'.');};
+ unless ($@) { @files = readdir(D); closedir(D); }
+}
+if (!@files) { @files = map {chomp && $_} `ls`; }
+print MANI join("\n",@files);
+close MANI;
!NO!SUBS!
close OUT or die "Can't close $file: $!";