[STDeco] Tie up a loose end from the pad->lex rename
[pugs.git] / examples / ppt / yes.pl
blob08a5f5fddb955d56ba856d7fe0424cec8906a678
1 use v6;
3 my $VERSION = '0.1';
5 for @*ARGS {
6 when <--version> { version() };
7 when <--help> { help() };
8 when <--> { shift @*ARGS; last };
11 @*ARGS = <y> unless @*ARGS;
13 loop { say @*ARGS.join(" ") };
15 sub version {
16 say "$*PROGRAM_NAME (Perl6 Power Tools) $VERSION";
17 exit;
20 sub help {
21 #say qq:to/EOF/;
22 $_ = "
23 $*PROGRAM_NAME [OPTION] [STRING...]
25 Repeatedly print its arguments, or 'y'.
27 Options:
28 --version: Print version number, then exit.
29 --help: Print usage, then exit.
30 --: Stop parsing options.
32 say;
33 #EOF
34 exit;