5 Test::MangleDollarUnderScore
10 +TestApp::Plugin::FullyQualified
11 +TestApp::Plugin::AddDispatchTypes
18 use namespace::autoclean;
20 our $VERSION = '0.01';
22 TestApp->config( name => 'TestApp', root => '/some/dir' );
24 TestApp->context_class( 'TestApp::Context' );
29 my $class = ref( $c->component( $_[0] ) ) || $_[0];
30 my $action = $_[1]->reverse;
34 if ( $action =~ /->(\w+)$/ ) {
37 elsif ( $action =~ /\/(\w+)$/ ) {
40 elsif ( $action =~ /^(\w+)$/ ) {
44 if ( $class && $method && $method !~ /^_/ ) {
45 my $executed = sprintf( "%s->%s", $class, $method );
46 my @executed = $c->response->headers->header('X-Catalyst-Executed');
47 push @executed, $executed;
48 $c->response->headers->header(
49 'X-Catalyst-Executed' => join ', ',
53 no warnings 'recursion';
54 return $c->SUPER::execute(@_);
57 # Replace the very large HTML error page with
58 # useful info if something crashes during a test
65 $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
69 no warnings 'redefine';
70 sub Catalyst::Log::error { }
73 # Make sure we can load Inline plugins.
75 package Catalyst::Plugin::Test::Inline;
79 use base qw/Class::Data::Inheritable/;