Skip to content

Instantly share code, notes, and snippets.

@mstratman
Created June 22, 2012 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mstratman/2974741 to your computer and use it in GitHub Desktop.
Save mstratman/2974741 to your computer and use it in GitHub Desktop.
use Test::More;
use MooseChild;
is(MooseChild->new->who, 'MooseChild');
done_testing;
package MooParent;
use Moo;
has who => (
is => 'ro',
default => sub { 'MooParent' },
);
1;
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