[Catalyst-commits] r11866 - Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib

zby at dev.catalyst.perl.org zby at dev.catalyst.perl.org
Tue Nov 17 15:00:01 GMT 2009


Author: zby
Date: 2009-11-17 14:59:57 +0000 (Tue, 17 Nov 2009)
New Revision: 11866

Modified:
   Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppDoubleAutoBug.pm
Log:
fixed test app for t/aggregate/custom_live_component_controller_action_auto_doublebug.t

Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppDoubleAutoBug.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppDoubleAutoBug.pm	2009-11-17 14:54:07 UTC (rev 11865)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppDoubleAutoBug.pm	2009-11-17 14:59:57 UTC (rev 11866)
@@ -9,41 +9,13 @@
     Test::Plugin
 /;
 
+use TestApp::Context;
+
 our $VERSION = '0.01';
 
 __PACKAGE__->config( name => 'TestAppDoubleAutoBug', root => '/some/dir' );
-
+__PACKAGE__->context_class( 'TestApp::Context' );
 __PACKAGE__->setup;
 
-sub execute {
-    my $c      = shift;
-    my $class  = ref( $c->component( $_[0] ) ) || $_[0];
-    my $action = $_[1]->reverse();
-
-    my $method;
-
-    if ( $action =~ /->(\w+)$/ ) {
-        $method = $1;
-    }
-    elsif ( $action =~ /\/(\w+)$/ ) {
-        $method = $1;
-    }
-    elsif ( $action =~ /^(\w+)$/ ) {
-        $method = $action;
-    }
-
-    if ( $class && $method && $method !~ /^_/ ) {
-        my $executed = sprintf( "%s->%s", $class, $method );
-        my @executed = $c->response->headers->header('X-Catalyst-Executed');
-        push @executed, $executed;
-        $c->response->headers->header(
-            'X-Catalyst-Executed' => join ', ',
-            @executed
-        );
-    }
-
-    return $c->SUPER::execute(@_);
-}
-
 1;
 




More information about the Catalyst-commits mailing list