From: Ricardo SIGNES Date: Fri, 5 Dec 2008 01:19:47 +0000 (+0000) Subject: more specific X-Git-Tag: 0.19~140 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=17c2c4c196093c1dad3fe4ad49746959cf7827c8;hp=c217840932f794182884a5695d792666b734d51d;p=gitmo%2FMouse.git more specific --- diff --git a/t/017-default-reference.t b/t/017-default-reference.t index 304b55d..73c4c7c 100644 --- a/t/017-default-reference.t +++ b/t/017-default-reference.t @@ -51,7 +51,10 @@ is_deeply(Class->new->a, [1], "default of sub { reference } works"); do { package Class::Two; use Mouse; - has foo => (is => 'rw', default => sub { shift->default_foo }); + has foo => (is => 'rw', default => sub { + die unless $_[0]->isa('Class::Two'); + shift->default_foo; + }); sub default_foo { 1 }; };