Created
June 22, 2012 19:52
-
-
Save mstratman/2974741 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 Test::More; | |
use MooseChild; | |
is(MooseChild->new->who, 'MooseChild'); | |
done_testing; |
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 MooParent; | |
use Moo; | |
has who => ( | |
is => 'ro', | |
default => sub { 'MooParent' }, | |
); | |
1; |
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 MooseChild; | |
use Moose; | |
extends 'MooParent'; | |
has '+who' => (default => 'MooseChild'); | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment