# New Ticket Created by  Andy Dougherty 
# Please include the string:  [perl #42135]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42135 >


Many of the examples in examples/shootout specify preferred flags.  For 
example, ack.pir starts with

    #!./parrot -Oc -Cj

I don't know what -Oc does.  docs/running.pod doesn't say.  It refers to
the non-existent F<imcc/docs/operation.pod> for more details.  I found
what I presume is that file in F<docs/imcc/operation.pod>, but that
doesn't say anything about -Oc either.  Oh well.  

Ignoring that for the moment, the second set of flags is the problem.
On a system with neither -C nor -j, t/examples/shootout.t would leave
the second argument there as a plain '-'.  Parrot would then sit waiting
forever for stdin, and the test suite would hang.

This patch fixes that.

--- parrot-current/t/examples/shootout.t        Tue Feb 20 19:15:45 2007
+++ parrot-andy/t/examples/shootout.t   Tue Mar 27 08:23:38 2007
@@ -84,10 +84,11 @@
     }
     unless ( $PConfig{cg_flag} =~ /HAVE/ ) {
         $args =~ s/-Cj/-j/;
-        $args =~ s/C//;
+        # Remove any plain -C option.
+        $args =~ s/(^|\s)-C(\s|$)/$1$2/;
+        # Remove any extra Cs still floating around
+        $args =~ s/C//; 
     }
-
-    $args eq '-' and $args = '';
 
     # look for input files
     my $input = "$file$INPUT_EXT";

-- 
    Andy Dougherty              [EMAIL PROTECTED]


Reply via email to