Created
October 13, 2016 18:33
-
-
Save ajs/80ceb7fe672cfe2fd35ecf40ecf93e69 to your computer and use it in GitHub Desktop.
Perl 6 MAIN meta-variables
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
use v6; | |
class Filename is Str { | |
# Do some filename type stuff, here... | |
} | |
sub MAIN( | |
Filename(Str) :$foo | |
#= A filename argument. | |
) { | |
say $foo.IO.basename; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment