X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp.pm;h=25203e1f82752ad96f7ccd736ea238cdb3bca801;hp=3391a225801412e1a9aa84a947f4485f5233c73a;hb=bf7c9c87ac809f8370ee21db7effef130ea6e058;hpb=85a351e52f553c6fa5129c773863ab69e8b3f213 diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm index 3391a22..25203e1 100644 --- a/t/lib/TestApp.pm +++ b/t/lib/TestApp.pm @@ -1,5 +1,4 @@ package TestApp; - use strict; use Catalyst qw/ Test::MangleDollarUnderScore @@ -16,9 +15,42 @@ 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, + 'Controller::Action::Action' => { + action_args => { + action_action_nine => { another_extra_arg => 13 } + } + } +); # Test bug found when re-adjusting the metaclass compat code in Moose # in 292360. Test added to Moose in 4b760d6, but leave this attribute