Changeset 8726 for lib

Show
Ignore:
Timestamp:
01/17/06 14:08:41 (3 years ago)
Author:
audreyt
Message:

* Pugs.Run.Args: When the arg list parser encounters the script

file name, treat everything after it (even -options) as arguments.

So these two forms are now identical:

pugs foo.p6 --help
pugs foo.p6 -- --help

(t/pugsrun/12-script-args.t now passes because of this.)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lib/pugs/run.pod

    r7871 r8726  
    2424WRITEME 
    2525 
    26 =head2 Flags separation 
    27  
    28 Pugs uses C<--> to separate flags of Pugs itself and arguments to the program. 
    29 For example, this will print C<--help>: 
    30  
    31     $ pugs -e 'say @ARGS' -- --help 
    32  
    33 But this will show the help message of Pugs: 
    34  
    35     $ pugs -e 'say @ARGS' --help 
    36  
    37 For the same reason, to use Pugs in the Unix C<#!> line, add an extra C<--> 
    38 after it: 
    39  
    40     #!/usr/bin/pugs -- 
    41     say 'Hello, ', @ARGS, '!'; 
    42  
    4326=head2 Command line options 
    4427