Skip to content

Instantly share code, notes, and snippets.

@yappo
Created January 27, 2009 04:28
Show Gist options
  • Save yappo/53179 to your computer and use it in GitHub Desktop.
Save yappo/53179 to your computer and use it in GitHub Desktop.
package X;
use Moose;
has foo => (
is => 'rw',
);
package A;
use Moose;
extends 'X';
has foo => (
default => 'foo',
);
package main;
use strict;
use warnings;
use Test::More qw(no_plan);
is(A->new->foo, 'foo');
is(A->new->foo('bar'), 'bar');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment