Created
October 13, 2016 19:07
-
-
Save zoffixznet/3605a2f8e953dfe6cc37da8768276071 to your computer and use it in GitHub Desktop.
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 :$foo is copy where { .defined and $foo = Filename.new: :value($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