X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F001_mouse%2F060-threads.t;h=c6dd87629dc007877cfc83c0bef0ea2a916eaf4d;hb=c4988b3300fbb4dff84f22384ec1f532563938de;hp=051a9260b5b86cd3ce918ad3e1d963117fcff3bf;hpb=95637edb1de318b764f8ec2fc8b5c5c8d4430010;p=gitmo%2FMouse.git diff --git a/t/001_mouse/060-threads.t b/t/001_mouse/060-threads.t index 051a926..c6dd876 100644 --- a/t/001_mouse/060-threads.t +++ b/t/001_mouse/060-threads.t @@ -20,6 +20,12 @@ use if $Test::More::VERSION >= 2.00, 'Test::More', is => 'rw', isa => 'Foo', ); + has bar => ( + is => 'rw', + + lazy => 1, + default => sub { 42 }, + ); package Foo; use Mouse; @@ -50,6 +56,8 @@ threads->create(sub{ $x->foo(Foo->new(value => 20)); is $x->foo->value, 20; + + is $x->bar, 42, 'callback for default'; })->join(); is $o->foo->value, 42;