X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp.pm;fp=t%2Flib%2FTestApp.pm;h=3bd3763d006cd32dbd2e99613f8550a8b9b2dc48;hp=3391a225801412e1a9aa84a947f4485f5233c73a;hb=9cdb85d28dad6a60a5b5d3241c0073567d6983b8;hpb=85a351e52f553c6fa5129c773863ab69e8b3f213 diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm index 3391a22..3bd3763 100644 --- a/t/lib/TestApp.pm +++ b/t/lib/TestApp.pm @@ -16,9 +16,33 @@ use Catalyst::Utils; use Moose; use namespace::autoclean; +# ----------- +# t/aggregate/unit_core_ctx_attr.t pukes until lazy is true +package Greeting; +use Moose; +sub hello_notlazy { 'hello there' } +sub hello_lazy { 'hello there' } + +package TestApp; +has 'my_greeting_obj_notlazy' => ( + is => 'ro', + isa => 'Greeting', + default => sub { Greeting->new() }, + handles => [ qw( hello_notlazy ) ], + lazy => 0, +); +has 'my_greeting_obj_lazy' => ( + is => 'ro', + isa => 'Greeting', + default => sub { Greeting->new() }, + handles => [ qw( hello_lazy ) ], + lazy => 1, +); +# ----------- + our $VERSION = '0.01'; -TestApp->config( name => 'TestApp', root => '/some/dir' ); +TestApp->config( name => 'TestApp', root => '/some/dir', use_request_uri_for_path => 1 ); # Test bug found when re-adjusting the metaclass compat code in Moose # in 292360. Test added to Moose in 4b760d6, but leave this attribute