Created
March 23, 2013 21:53
-
-
Save tobyink/5229512 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| package Local::Overloaded { | |
| use overload | |
| '&{}' => sub { sub { print "ok\n" } }, | |
| fallback => 1; | |
| } | |
| package Local::Class { | |
| use Moo; | |
| has a => (is => "ro", isa => bless([], "Local::Overloaded")); | |
| } | |
| Local::Class->new(a => 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment