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=d339f6e90f954aa03465c3883f43b150f5babcbc;hp=6cd199f307bb2b7fe5e2e820e4d280fcfb81c79e;hb=950c7852982926188a3e716dcb52c3e1a9510936;hpb=7aba3b2defff97a59aebafc5fc6f422a9d4f5439 diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm index 6cd199f..d339f6e 100644 --- a/t/lib/TestApp.pm +++ b/t/lib/TestApp.pm @@ -16,6 +16,30 @@ 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', use_request_uri_for_path => 1 );