converting the engines. i had to add use NEXT to some of the test files to make it...
[catagits/Catalyst-Runtime.git] / t / lib / Catalyst / Plugin / Test / Headers.pm
CommitLineData
dd4e6fd2 1package Catalyst::Plugin::Test::Headers;
2
3use strict;
7fa2c9c1 4use NEXT;
dd4e6fd2 5
6sub prepare {
7 my $class = shift;
8
9 my $c = $class->NEXT::prepare(@_);
10
11 $c->response->header( 'X-Catalyst-Engine' => $c->engine );
12 $c->response->header( 'X-Catalyst-Debug' => $c->debug ? 1 : 0 );
7fa2c9c1 13
dd4e6fd2 14 {
a4def412 15 my $components = join( ', ', sort keys %{ $c->components } );
16 $c->response->header( 'X-Catalyst-Components' => $components );
dd4e6fd2 17 }
18
19 {
20 no strict 'refs';
836e1134 21 my $plugins = join ', ', $class->registered_plugins;
a4def412 22 $c->response->header( 'X-Catalyst-Plugins' => $plugins );
dd4e6fd2 23 }
24
25 return $c;
26}
27
28sub prepare_action {
29 my $c = shift;
30 $c->NEXT::prepare_action(@_);
31 $c->res->header( 'X-Catalyst-Action' => $c->req->action );
32}
33
341;