Created
June 21, 2019 21:55
Star
You must be signed in to star a gist
This is a unit package that works
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
| #!/usr/bin/env perl6 | |
| unit package My-Fourth-Modules-Script; | |
| our proto MAIN($) is export { * } | |
| multi MAIN($x) { | |
| say "This is the inside MAIN called with $x"; | |
| } | |
| # No output: | |
| # $ ./My-Fourth-Modules-Script.pm6 | |
| # $ ./My-Fourth-Modules-Script.pm6 242 | |
| # But, run correctly: | |
| # $ perl6 -M My-Fourth-Modules-Script -e ' ' | |
| # Usage: | |
| # -e '...' <x> | |
| # $ perl6 -M My-Fourth-Modules-Script -e ' ' 32 | |
| # This is the inside MAIN called with 32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment