3 while (@ARGV and $ARGV[0] =~ /^-/) {
9 die "Unrecognized switch: -$switch";
17 my $top = "/home/larry/src/p55";
20 open(FILE, $file) or die "Can't open $file: $!\n";
27 $switches = $1 if $text =~ /^#!.*?\s(-.*)/;
28 $switches =~ s/\s+-[-*].*//;
29 $switches =~ s/\s+#.*//;
31 #if ($text =~ s/\bexit\b/DUMMYEXIT/g) {
32 # $infile = "$file.tmp";
33 # open FILE, ">$infile";
38 unlink "$file.xml", "$file.msg", "$file.err", "$file.diff", "$file.p5";
39 print "PERL_XMLDUMP='$file.xml' $top/perl $switches -I lib $infile 2>$file.err\n";
40 system "PERL_XMLDUMP='$file.xml' $top/perl $switches -I lib $infile 2>$file.err";
43 print "Exit status $?\n";
44 system "cat $file.err";
48 if (not -s "$file.xml") {
49 die "Didn't produce an xml file!?!\n"
53 system "$top/nomad -Y $file.xml";
57 system "$top/nomad $file.xml >$file.p5 2>$file.msg";
60 print "Oops!\n" unless -s "$file.msg";
61 system "cat $file.msg";
65 system "diff -u $file $file.p5 >$file.diff";
66 if (-s "$file.diff") {
67 system "cat $file.diff";