- Timestamp:
- 06/20/05 16:14:05 (4 years ago)
- svk:copy_cache_prev:
- 6641
- Files:
-
- 1 modified
-
script/pugscc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
script/pugscc
r4851 r4872 11 11 12 12 if (!@ARGV || grep /^--help$/, @ARGV) { 13 die "Usage: $0 [--run] [--pugs|--haskell|--p arrot] [ source[.p6] | -e oneliner ]\n";13 die "Usage: $0 [--run] [--pugs|--haskell|--pir] [ source[.p6] | -e oneliner ]\n"; 14 14 } 15 15 … … 33 33 shift @ARGV; 34 34 } 35 elsif ($ARGV[0] =~ /^(?:-P|--p arrot)$/) {36 $backend = 'P arrot';35 elsif ($ARGV[0] =~ /^(?:-P|--pir|--parrot)$/) { 36 $backend = 'PIR'; 37 37 shift @ARGV; 38 38 } … … 56 56 } 57 57 58 if ($backend eq 'P arrot') {59 $out .= ".imc";58 if ($backend eq 'PIR') { 59 $out .= '.pir'; 60 60 } 61 61 else { … … 79 79 } 80 80 81 if ($backend eq 'P arrot') {81 if ($backend eq 'PIR') { 82 82 writeFile($out, $program); 83 83 chmod 0755, $out; … … 124 124 125 125 if ($run) { 126 if ($backend eq 'P arrot' and !-x '/usr/bin/env') {127 system( "parrot"=> $out);126 if ($backend eq 'PIR' and !-x '/usr/bin/env') { 127 system(parrot => $out); 128 128 } 129 129 else { … … 154 154 =head1 SYNOPSIS 155 155 156 % pugscc --runp ugs-e "'Hello, Parrot'.say"157 % pugscc --runp arrot -e "'Hello, Parrot'.say"156 % pugscc --runpir -e "'Hello, Parrot'.say" 157 % pugscc --runpugs -e "'Hello, Pugs'.say" 158 158 % pugscc --runhaskell -e "'Hello, Haskell'.say" 159 159 … … 191 191 =item Pugs - requires Pugs ;-) 192 192 193 =item P arrot- requires Parrot193 =item PIR - requires Parrot 194 194 195 195 L<http://search.cpan.org/~ltoetsch/parrot/>
