whitespace cleanup
[catagits/Catalyst-Runtime.git] / t / lib / Catalyst / Plugin / Test / Headers.pm
CommitLineData
dd4e6fd2 1package Catalyst::Plugin::Test::Headers;
2
3use strict;
951bab6b 4use MRO::Compat;
dd4e6fd2 5
6sub prepare {
7 my $class = shift;
8
dbb2d5cd 9 my $c = $class->next::method(@_);
dd4e6fd2 10
11 $c->response->header( 'X-Catalyst-Engine' => $c->engine );
12 $c->response->header( 'X-Catalyst-Debug' => $c->debug ? 1 : 0 );
88e5a8b0 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;
dbb2d5cd 30 $c->next::method(@_);
dd4e6fd2 31 $c->res->header( 'X-Catalyst-Action' => $c->req->action );
32}
33
341;