X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp.pm;h=d339f6e90f954aa03465c3883f43b150f5babcbc;hb=950c7852982926188a3e716dcb52c3e1a9510936;hp=6cd199f307bb2b7fe5e2e820e4d280fcfb81c79e;hpb=17affec101cad8696baedd2e4b568e8ef7428e7c;p=catagits%2FCatalyst-Runtime.git 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 );