Skip to content

Instantly share code, notes, and snippets.

@tbrowder
Last active June 29, 2025 20:17
Show Gist options
  • Save tbrowder/04ddfc92449367f6fefbb29b2de17582 to your computer and use it in GitHub Desktop.
Save tbrowder/04ddfc92449367f6fefbb29b2de17582 to your computer and use it in GitHub Desktop.
multi MAIN examples
# Contrived examples:
# Is there any way to eliminate the need to copy/paste the two common named options
# by putting the common signature parts in a SUB-MAIN?
multi MAIN(
:$query1, #= # uses sub 1
:$lang = "en", #= # two-character language code
:$region = "US", #= # two-character country code
) {}
multi MAIN(
:$query2, #= # uses sub 2
:$lang = "en", #= # two-character language code
:$region = "US", #= # two-character country code
) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment