Created
June 22, 2017 17:44
-
-
Save MattOates/eaa7d6bd06616d92b80c1176c9c9cd71 to your computer and use it in GitHub Desktop.
Demo of --help and help options to a command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub help { | |
say "help me!"; | |
} | |
multi sub MAIN('help') { | |
help() | |
} | |
multi sub MAIN(:$help) { | |
help() if $help; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment