X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FMoose.pm;fp=t%2Flib%2FTestApp%2FController%2FMoose.pm;h=c03829a762655f0bbc106db9ae6dcb5b9e5194e9;hb=cf37d21a258273df337d7c3d9214b286713ec9ca;hp=d80102ea9722ae17baf474ce4b410226963b922f;hpb=ca926e765a9c0c8f2debe5ccda2c15a2c6354da2;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/Moose.pm b/t/lib/TestApp/Controller/Moose.pm index d80102e..c03829a 100644 --- a/t/lib/TestApp/Controller/Moose.pm +++ b/t/lib/TestApp/Controller/Moose.pm @@ -5,6 +5,10 @@ use Moose; use namespace::clean -except => 'meta'; BEGIN { extends qw/Catalyst::Controller/; } +use MooseX::MethodAttributes; # FIXME - You need to say this if you have + # modifiers so that you get the correct + # method metaclass, why does the modifier + # on MODIFY_CODE_ATTRIBUTES not work. has attribute => ( is => 'ro', @@ -16,4 +20,9 @@ sub get_attribute : Local { $c->response->body($self->attribute); } +before get_attribute => sub { + my ($self, $c) = @_; + $c->response->header( 'X-Catalyst-Test-Before' => 'before called' ); +}; + 1;