9 +TestApp::Plugin::FullyQualified
13 our $VERSION = '0.01';
15 TestApp->config( name => 'TestApp', root => '/some/dir' );
20 my ( $self, $c ) = @_;
21 $c->res->body('root index');
24 sub global_action : Private {
25 my ( $self, $c ) = @_;
26 $c->forward('TestApp::View::Dump::Request');
31 my $class = ref( $c->component( $_[0] ) ) || $_[0];
36 if ( $action =~ /->(\w+)$/ ) {
39 elsif ( $action =~ /\/(\w+)$/ ) {
42 elsif ( $action =~ /^(\w+)$/ ) {
46 if ( $class && $method && $method !~ /^_/ ) {
47 my $executed = sprintf( "%s->%s", $class, $method );
48 my @executed = $c->response->headers->header('X-Catalyst-Executed');
49 push @executed, $executed;
50 $c->response->headers->header(
51 'X-Catalyst-Executed' => join ', ',
56 return $c->SUPER::execute(@_);
59 # Replace the very large HTML error page with
60 # useful info if something crashes during a test
64 $c->NEXT::finalize_error(@_);
67 $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
70 sub class_forward_test_method :Private {
71 my ( $self, $c ) = @_;
72 $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
75 sub class_go_test_method :Private {
76 my ( $self, $c ) = @_;
77 $c->response->headers->header( 'X-Class-Go-Test-Method' => 1 );
80 sub loop_test : Local {
81 my ( $self, $c ) = @_;
84 $c->forward( 'class_forward_test_method' );
88 sub recursion_test : Local {
89 my ( $self, $c ) = @_;
90 $c->forward( 'recursion_test' );
94 no warnings 'redefine';
95 sub Catalyst::Log::error { }
98 # Make sure we can load Inline plugins.
100 package Catalyst::Plugin::Test::Inline;
104 use base qw/Catalyst::Base Class::Data::Inheritable/;