8 +TestApp::Plugin::FullyQualified
12 our $VERSION = '0.01';
14 TestApp->config( name => 'TestApp', root => '/some/dir' );
19 my ( $self, $c ) = @_;
20 $c->res->body('root index');
23 sub global_action : Private {
24 my ( $self, $c ) = @_;
25 $c->forward('TestApp::View::Dump::Request');
30 my $class = ref( $c->component( $_[0] ) ) || $_[0];
35 if ( $action =~ /->(\w+)$/ ) {
38 elsif ( $action =~ /\/(\w+)$/ ) {
41 elsif ( $action =~ /^(\w+)$/ ) {
45 if ( $class && $method && $method !~ /^_/ ) {
46 my $executed = sprintf( "%s->%s", $class, $method );
47 my @executed = $c->response->headers->header('X-Catalyst-Executed');
48 push @executed, $executed;
49 $c->response->headers->header(
50 'X-Catalyst-Executed' => join ', ',
55 return $c->SUPER::execute(@_);
58 # Replace the very large HTML error page with
59 # useful info if something crashes during a test
63 $c->NEXT::finalize_error(@_);
66 $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
69 sub class_forward_test_method :Private {
70 my ( $self, $c ) = @_;
71 $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
74 sub loop_test : Local {
75 my ( $self, $c ) = @_;
78 $c->forward( 'class_forward_test_method' );
82 sub recursion_test : Local {
83 my ( $self, $c ) = @_;
84 $c->forward( 'recursion_test' );
88 no warnings 'redefine';
89 sub Catalyst::Log::error { }