Created
June 21, 2019 21:55
-
-
Save treyharris/78a2e0db94597ed592346570bec95c77 to your computer and use it in GitHub Desktop.
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