[Catalyst-commits] r11868 - in
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib:
Catalyst Catalyst/TraitFor Catalyst/TraitFor/Context TestApp
TestAppDoubleAutoBug
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Tue Nov 17 16:11:04 GMT 2009
Author: zby
Date: 2009-11-17 16:11:03 +0000 (Tue, 17 Nov 2009)
New Revision: 11868
Added:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/Catalyst/TraitFor/
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/Catalyst/TraitFor/Context/
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/Catalyst/TraitFor/Context/TestHeaders.pm
Modified:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp/Context.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppDoubleAutoBug/Context.pm
Log:
TraitFor headers
Added: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/Catalyst/TraitFor/Context/TestHeaders.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/Catalyst/TraitFor/Context/TestHeaders.pm (rev 0)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/Catalyst/TraitFor/Context/TestHeaders.pm 2009-11-17 16:11:03 UTC (rev 11868)
@@ -0,0 +1,11 @@
+package Catalyst::TraitFor::Context::TestHeaders;
+
+use Moose::Role;
+
+after prepare_action => sub{
+ my $c = shift;
+ $c->res->header( 'X-Catalyst-Action' => $c->req->action );
+};
+
+1;
+
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp/Context.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp/Context.pm 2009-11-17 15:21:01 UTC (rev 11867)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp/Context.pm 2009-11-17 16:11:03 UTC (rev 11868)
@@ -1,6 +1,7 @@
package TestApp::Context;
use Moose;
extends 'Catalyst::Context';
+with 'Catalyst::TraitFor::Context::TestHeaders';
if (eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) {
with 'CatalystX::LeakChecker';
@@ -51,10 +52,5 @@
return $c->SUPER::execute(@_);
}
-after prepare_action => sub{
- my $c = shift;
- $c->res->header( 'X-Catalyst-Action' => $c->req->action );
-};
-
1;
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppDoubleAutoBug/Context.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppDoubleAutoBug/Context.pm 2009-11-17 15:21:01 UTC (rev 11867)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppDoubleAutoBug/Context.pm 2009-11-17 16:11:03 UTC (rev 11868)
@@ -51,10 +51,5 @@
return $c->SUPER::execute(@_);
}
-after prepare_action => sub{
- my $c = shift;
- $c->res->header( 'X-Catalyst-Action' => $c->req->action );
-};
-
1;
More information about the Catalyst-commits
mailing list