Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make invocations of enums much more robust, and a bit more magic.
fixes RT #112906
  • Loading branch information
moritz committed May 13, 2012
1 parent 2ac5691 commit 32b1731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Enumeration.pm
Expand Up @@ -34,8 +34,8 @@ my role Enumeration {
self.value.Int
}

method postcircumfix:<( )>($x) {
self.^enum_from_value($x)
method postcircumfix:<( )>($ ($x)) {
$x ~~ ::?CLASS ?? $x !! self.^enum_from_value($x)
}
}

Expand Down

0 comments on commit 32b1731

Please sign in to comment.