In Command line interface§
See primary documentation in context for %*SUB-MAIN-OPTS
It's possible to alter how arguments are processed before they're passed to sub MAIN {}
by setting options in the %*SUB-MAIN-OPTS
hash. Due to the nature of dynamic variables, it is required to set up the %*SUB-MAIN-OPTS
hash and fill it with the appropriate settings. For instance:
my %*SUB-MAIN-OPTS = :named-anywhere, # allow named variables at any location :bundling, # allow bundling of named arguments :coerce-allomorphs-to(Int), # coerce allomorphic arguments to given type :allow-no, # allow --no-foo as alternative to --/foo :numeric-suffix-as-value, # allow -j2 as alternative to --j=2 ; sub MAIN ($a, $b, :$c, :$d) { say "Accepted!" }
Available options are: