5 Test::MangleDollarUnderScore
10 +TestApp::Plugin::FullyQualified
11 +TestApp::Plugin::AddDispatchTypes
16 our $VERSION = '0.01';
18 TestApp->config( name => 'TestApp', root => '/some/dir' );
23 my ( $self, $c ) = @_;
24 $c->res->body('root index');
27 sub global_action : Private {
28 my ( $self, $c ) = @_;
29 $c->forward('TestApp::View::Dump::Request');
34 my $class = ref( $c->component( $_[0] ) ) || $_[0];
35 my $action = $_[1]->reverse;
39 if ( $action =~ /->(\w+)$/ ) {
42 elsif ( $action =~ /\/(\w+)$/ ) {
45 elsif ( $action =~ /^(\w+)$/ ) {
49 if ( $class && $method && $method !~ /^_/ ) {
50 my $executed = sprintf( "%s->%s", $class, $method );
51 my @executed = $c->response->headers->header('X-Catalyst-Executed');
52 push @executed, $executed;
53 $c->response->headers->header(
54 'X-Catalyst-Executed' => join ', ',
59 return $c->SUPER::execute(@_);
62 # Replace the very large HTML error page with
63 # useful info if something crashes during a test
70 $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
73 sub class_forward_test_method :Private {
74 my ( $self, $c ) = @_;
75 $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
78 sub loop_test : Local {
79 my ( $self, $c ) = @_;
82 $c->forward( 'class_forward_test_method' );
86 sub recursion_test : Local {
87 my ( $self, $c ) = @_;
88 $c->forward( 'recursion_test' );
92 no warnings 'redefine';
93 sub Catalyst::Log::error { }
96 # Make sure we can load Inline plugins.
98 package Catalyst::Plugin::Test::Inline;
102 use base qw/Class::Data::Inheritable/;