Skip to content

Instantly share code, notes, and snippets.

@ajs
Created October 13, 2016 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajs/80ceb7fe672cfe2fd35ecf40ecf93e69 to your computer and use it in GitHub Desktop.
Save ajs/80ceb7fe672cfe2fd35ecf40ecf93e69 to your computer and use it in GitHub Desktop.
Perl 6 MAIN meta-variables
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