Created
June 17, 2013 19:58
-
-
Save rsimoes/5799805 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
package Foo; | |
use Moo::Role; | |
use MooX::ClassAttribute; | |
class_has 'foo' => ( | |
is => 'ro', | |
isa => sub { $_[0] == 1 or die 'not 1' } | |
); | |
package Bar; | |
use Moo; | |
use MooX::ClassAttribute; | |
with 'Foo'; | |
class_has '+foo' => ( | |
default => 1 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment