Change 23615 by [EMAIL PROTECTED] on 2004/12/06 14:39:59

        sanity check the arguments to runperl(), to try to avoid it
        hanging waiting on STDIN for a script.

Affected files ...

... //depot/perl/t/test.pl#58 edit

Differences ...

==== //depot/perl/t/test.pl#58 (text) ====
Index: perl/t/test.pl
--- perl/t/test.pl#57~23208~    Mon Aug  9 11:28:33 2004
+++ perl/t/test.pl      Mon Dec  6 06:39:59 2004
@@ -412,6 +412,12 @@
         }
     } elsif (defined $args{progfile}) {
        $runperl .= qq( "$args{progfile}");
+    } else {
+       # You probaby didn't want to be sucking in from the upstream stdin
+       die "test.pl:runperl(): none of prog, progs, progfile, args, "
+           . " switches or stdin specified"
+           unless defined $args{args} or defined $args{switches}
+               or defined $args{stdin};
     }
     if (defined $args{stdin}) {
        # so we don't try to put literal newlines and crs onto the
@@ -455,6 +461,8 @@
 }
 
 sub runperl {
+    die "test.pl:runperl() does not take a hashref"
+       if ref $_[0] and ref $_[0] eq 'HASH';
     my $runperl = &_create_runperl;
     my $result = `$runperl`;
     $result =~ s/\n\n/\n/ if $is_vms; # XXX pipes sometimes double these
End of Patch.

Reply via email to