Created
June 28, 2012 20:25
-
-
Save sirrobert/3013692 to your computer and use it in GitHub Desktop.
enum conflicts with sub
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
module Example; | |
our $VERSION = '0.1'; | |
enum Something <SOME THING>; | |
our sub SOME (Str $str) { | |
return "str: $str"; | |
} |
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
#!~/.perl6/bin/perl6 | |
use v6; | |
use lib '.'; | |
use Example; | |
say Example::SOME("thing"); | |
### | |
# Output: | |
# Something() | |
### | |
# Expected output: | |
# str: thing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment