1 package Catalyst::Plugin::Test::Plugin;
7 use base qw/Catalyst::Base Class::Data::Inheritable/;
9 __PACKAGE__->mk_classdata('ran_setup');
19 my $c = $class->next::method(@_);
20 $c->response->header( 'X-Catalyst-Plugin-Setup' => $c->ran_setup );
25 # Note: This is horrible, but Catalyst::Plugin::Server forces the body to
26 # be parsed, by calling the $c->req->body method in prepare_action.
27 # We need to test this, as this was broken by 5.80. See also
28 # t/aggregate/live_engine_request_body.t. Better ways to test this
29 # appreciated if you have suggestions :)
31 my $have_req_body = 0;
34 $have_req_body++ if $c->req->body;
37 sub have_req_body_in_prepare_action : Local {
39 $c->res->body($have_req_body);