Changeset 22569

Show
Ignore:
Timestamp:
10/10/08 18:53:21 (6 weeks ago)
Author:
lwall
Message:

[viv] change MAIN to take @ARGV args as arguments

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/perl6/viv

    r22567 r22569  
    1717sub MAIN { 
    1818    my $output = 'ast'; 
    19     while (@ARGV) { 
    20         last unless $ARGV[0] =~ /^--/; 
    21         my $switch = shift @ARGV; 
     19    while (@_) { 
     20        last unless $_[0] =~ /^--/; 
     21        my $switch = shift @_; 
    2222        if ($switch eq '--ast') { 
    2323            $output = 'ast'; 
     
    3636        } 
    3737    } 
    38     my $r = STD->parsefile($ARGV[0])->item; 
     38    my $r = STD->parsefile($_[0])->item; 
    3939    if ($output eq 'ast') { 
    4040        print Dump($r); 
     
    233233 
    234234if ($0 eq __FILE__) { 
    235     ::MAIN(); 
     235    ::MAIN(@ARGV); 
    236236} 
    237237