I'm experimenting with Raku and trying to figure out how I might write a program with subcommands. When I run, ./this_program blah:
#! /usr/bin/env raku
use v6;
sub MAIN($cmd, *@subcommands) {
$cmd.EVAL;
}
sub blah() { say 'running blah'; };
I get running blah output.
But this is as far as I got. I've tried various things, but I see no obvious way to pass @subscommands down to the blah function.
I'm not even sure if EVAL is the way to go either, but I couldn't find any other solution.