Hi,
On 06/28/2015 12:39 AM, Tom Browder wrote:
> I'm trying to take advantage of the MAIN suroutine to handle most all of
> my routine command line arg handling. One idiom I use a lot is for the
> user to choose only one of two args, but one must be chosen.
So since it's not optional, you might consider not making it an option
(prefixed with "--"), but rather a simple command:
$ cat door
#!/usr/bin/env perl6
multi MAIN('open') {
say "Opening door";
}
multi MAIN('close') {
say "Closing door";
}
$ ./door
Usage:
./door open
./door close
$ ./door open
Opening door
Cheers,
Moritz