[Catalyst-commits] r11349 - in Catalyst-Runtime/5.80/trunk: .
lib/Catalyst t t/aggregate t/author t/lib t/lib/ACLTestApp
t/lib/ACLTestApp/Controller t/lib/Catalyst/Plugin/Test
t/lib/PluginTestApp t/lib/PluginTestApp/Controller
t/lib/TestApp/Controller t/lib/TestAppDoubleAutoBug
t/lib/TestAppDoubleAutoBug/Controller
t/lib/TestAppNonMooseController
t/lib/TestAppNonMooseController/Controller
t/lib/TestAppPluginWithConstructor
t/lib/TestAppPluginWithConstructor/Controller
t/lib/TestAppStats t/lib/TestAppStats/Controller
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Thu Sep 10 02:13:05 GMT 2009
Author: t0m
Date: 2009-09-10 02:13:04 +0000 (Thu, 10 Sep 2009)
New Revision: 11349
Added:
Catalyst-Runtime/5.80/trunk/t/author/
Catalyst-Runtime/5.80/trunk/t/author/optional_http-server.t
Catalyst-Runtime/5.80/trunk/t/custom_exception_class_simple.t
Catalyst-Runtime/5.80/trunk/t/deprecated_appclass_action_warnings.t
Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp.pm
Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/
Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/DeprecatedActionsInAppClassTestApp.pm
Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/
Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/unit_controller_actions.t
Removed:
Catalyst-Runtime/5.80/trunk/t/author/
Catalyst-Runtime/5.80/trunk/t/author/optional_http-server.t
Catalyst-Runtime/5.80/trunk/t/custom_exception_class_simple.t
Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/unit_controller_actions.t
Modified:
Catalyst-Runtime/5.80/trunk/
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_auto.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_begin.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_chained.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_default.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_detach.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_forward.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_go.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_index.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_visit.t
Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_body.t
Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_action_for.t
Catalyst-Runtime/5.80/trunk/t/custom_live_component_controller_action_auto_doublebug.t
Catalyst-Runtime/5.80/trunk/t/lib/Catalyst/Plugin/Test/Plugin.pm
Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Root.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppPathBug.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats.pm
Catalyst-Runtime/5.80/trunk/t/unit_dispatcher_requestargs_restore.t
Log:
Blargh. Merge branch deprecate_appclass_actions manually, with svn merge http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/trunk http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/branches/deprecate_appclass_actions . after I forgot -l on svk push, but ctrl-C after the first rev meant svk had already committed a merge mark and re-merging did nothing, and removing it didn't do the right thing. Fail cake..
Property changes on: Catalyst-Runtime/5.80/trunk
___________________________________________________________________
Name: svk:merge
- 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/index_default_fuckage:10646
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/namespace_handling_refactor:10655
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
+ 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/index_default_fuckage:10646
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/namespace_handling_refactor:10655
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/trunk:11345
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -215,8 +215,12 @@
#this is still not correct for some reason.
my $namespace = $self->action_namespace($c);
+ # FIXME - fugly
if (!blessed($self) && $self eq $c && scalar(@methods)) {
- $c->log->warn("Action methods found defined in your application class, $self. This is deprecated, please move them into a Root controller.");
+ my @really_bad_methods = grep { ! /^_(DISPATCH|BEGIN|AUTO|ACTION|END)$/ } map { $_->name } @methods;
+ if (scalar(@really_bad_methods)) {
+ $c->log->warn("Action methods (" . join(', ', @really_bad_methods) . ") found defined in your application class, $self. This is deprecated, please move them into a Root controller.");
+ }
}
foreach my $method (@methods) {
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_auto.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_auto.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_auto.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -35,7 +35,7 @@
TestApp::Controller::Action::Auto->begin
TestApp::Controller::Action::Auto->auto
TestApp::Controller::Action::Auto->one
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -52,7 +52,7 @@
TestApp::Controller::Action::Auto->begin
TestApp::Controller::Action::Auto->auto
TestApp::Controller::Action::Auto->default
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -70,7 +70,7 @@
TestApp::Controller::Action::Auto->auto
TestApp::Controller::Action::Auto::Deep->auto
TestApp::Controller::Action::Auto::Deep->one
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -88,7 +88,7 @@
TestApp::Controller::Action::Auto->auto
TestApp::Controller::Action::Auto::Deep->auto
TestApp::Controller::Action::Auto::Deep->default
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_begin.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_begin.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_begin.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -30,7 +30,7 @@
TestApp::Controller::Action::Begin->begin
TestApp::Controller::Action::Begin->default
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_chained.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_chained.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_chained.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -815,7 +815,7 @@
my @expected = qw[
TestApp::Controller::Action::Chained::Root->rootsub
TestApp::Controller::Action::Chained::Root->endpointsub
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_default.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_default.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_default.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -29,7 +29,7 @@
TestApp::Controller::Action::Default->begin
TestApp::Controller::Action::Default->default
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -76,7 +76,7 @@
my @expected = qw[
TestApp::Controller::Action->begin
TestApp::Controller::Action->default
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_detach.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_detach.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_detach.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -30,7 +30,7 @@
TestApp::Controller::Action::Detach->one
TestApp::Controller::Action::Detach->two
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -57,7 +57,7 @@
TestApp::Controller::Action::Detach->path
TestApp::Controller::Action::Detach->two
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_forward.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_forward.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_forward.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -33,7 +33,7 @@
TestApp::Controller::Action::Forward->four
TestApp::Controller::Action::Forward->five
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -81,7 +81,7 @@
TestApp::Controller::Action::Forward->four
TestApp::Controller::Action::Forward->five
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -156,7 +156,7 @@
TestApp::Controller::Action::Forward->four
TestApp::Controller::Action::Forward->five
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -191,7 +191,7 @@
TestApp::Controller::Action::Forward->four
TestApp::Controller::Action::Forward->five
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_go.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_go.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_go.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -43,7 +43,7 @@
TestApp::Controller::Action::Go->four
TestApp::Controller::Action::Go->five
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
@expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -74,7 +74,7 @@
my @expected = qw[
TestApp::Controller::Action::Go->go_die
TestApp::Controller::Action::Go->args
- TestApp->end
+ TestApp::Controller::Root->end
];
@expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -165,7 +165,7 @@
TestApp::Controller::Action::Go->four
TestApp::Controller::Action::Go->five
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
@expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -200,7 +200,7 @@
TestApp::Controller::Action::Go->four
TestApp::Controller::Action::Go->five
TestApp::View::Dump::Request->process
- TestApp->end
+ TestApp::Controller::Root->end
];
@expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_index.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_index.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_index.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -27,8 +27,8 @@
# test root index
{
my @expected = qw[
- TestApp->index
- TestApp->end
+ TestApp::Controller::Root->index
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -45,7 +45,7 @@
{
my @expected = qw[
TestApp::Controller::Index->index
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -66,7 +66,7 @@
my @expected = qw[
TestApp::Controller::Action::Index->begin
TestApp::Controller::Action::Index->index
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
@@ -87,7 +87,7 @@
my @expected = qw[
TestApp::Controller::Action::Index->begin
TestApp::Controller::Action::Index->default
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_visit.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_visit.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_component_controller_action_visit.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -42,11 +42,11 @@
TestApp::Controller::Action::Visit->four
TestApp::Controller::Action::Visit->five
TestApp::View::Dump::Request->process
- TestApp->end
- TestApp->end
- TestApp->end
- TestApp->end
- TestApp->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
];
@expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -76,8 +76,8 @@
my @expected = qw[
TestApp::Controller::Action::Visit->visit_die
TestApp::Controller::Action::Visit->args
- TestApp->end
- TestApp->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
];
@expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -166,12 +166,12 @@
TestApp::Controller::Action::Visit->four
TestApp::Controller::Action::Visit->five
TestApp::View::Dump::Request->process
- TestApp->end
- TestApp->end
- TestApp->end
- TestApp->end
- TestApp->end
- TestApp->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
];
@expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -206,12 +206,12 @@
TestApp::Controller::Action::Visit->four
TestApp::Controller::Action::Visit->five
TestApp::View::Dump::Request->process
- TestApp->end
- TestApp->end
- TestApp->end
- TestApp->end
- TestApp->end
- TestApp->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
+ TestApp::Controller::Root->end
];
@expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -266,7 +266,7 @@
TestApp::Controller::Action::Chained->foo
TestApp::Controller::Action::Chained::Foo->spoon
TestApp::Controller::Action::Chained->end
- TestApp->end
+ TestApp::Controller::Root->end
];
my $expected = join( ", ", @expected );
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_body.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_body.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/live_engine_request_body.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -80,13 +80,13 @@
# 5.80 regression, see note in Catalyst::Plugin::Test::Plugin
{
my $request = GET(
- 'http://localhost/have_req_body_in_prepare_action',
+ 'http://localhost/dump/response',
'Content-Type' => 'text/plain',
'Content' => 'x' x 100_000
);
ok( my $response = request($request), 'Request' );
ok( $response->is_success, 'Response Successful 2xx' );
- like( $response->content, qr/^[1-9]/, 'Has body' );
+ ok( $response->header('X-Have-Request-Body'), 'X-Have-Request-Body set' );
}
Modified: Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_action_for.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_action_for.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/aggregate/unit_core_action_for.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -12,7 +12,7 @@
use_ok('TestApp');
-is(TestApp->action_for('global_action')->code, TestApp->can('global_action'),
+is(TestApp->action_for('global_action')->code, TestApp::Controller::Root->can('global_action'),
'action_for on appclass ok');
is(TestApp->controller('Args')->action_for('args')->code,
Copied: Catalyst-Runtime/5.80/trunk/t/author (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/author)
Deleted: Catalyst-Runtime/5.80/trunk/t/author/optional_http-server.t
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/author/optional_http-server.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/author/optional_http-server.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,96 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 1;
-
-use File::Path;
-use FindBin;
-use IPC::Open3;
-use IO::Socket;
-
-use Catalyst::Devel 1.0;
-use File::Copy::Recursive;
-
-# Run a single test by providing it as the first arg
-my $single_test = shift;
-
-my $tmpdir = "$FindBin::Bin/../../t/tmp";
-
-# clean up
-rmtree $tmpdir if -d $tmpdir;
-
-# create a TestApp and copy the test libs into it
-mkdir $tmpdir;
-chdir $tmpdir;
-system( $^X, "-I$FindBin::Bin/../../lib", "$FindBin::Bin/../../script/catalyst.pl", 'TestApp' );
-chdir "$FindBin::Bin/..";
-File::Copy::Recursive::dircopy( '../t/lib', '../t/tmp/TestApp/lib' ) or die;
-
-# remove TestApp's tests
-rmtree '../t/tmp/TestApp/t' or die;
-
-# spawn the standalone HTTP server
-my $port = 30000 + int rand(1 + 10000);
-my @cmd = ($^X, "-I$FindBin::Bin/../../lib",
- "$FindBin::Bin/../../t/tmp/TestApp/script/testapp_server.pl", '-port', $port );
-my $pid = open3( undef, my $server, undef, @cmd)
- or die "Unable to spawn standalone HTTP server: $!";
-
-# wait for it to start
-print "Waiting for server to start...\n";
-my $timeout = 30;
-my $count = 0;
-while ( check_port( 'localhost', $port ) != 1 ) {
- sleep 1;
- die("Server did not start within $timeout seconds: " . join(' ', @cmd))
- if $count++ > $timeout;
-}
-
-# run the testsuite against the HTTP server
-$ENV{CATALYST_SERVER} = "http://localhost:$port";
-
-my $return;
-if ( $single_test ) {
- $return = system( "$^X -I../lib/ $single_test" );
-}
-else {
- $return = prove( '-r', '-I../lib/', glob('../t/aggregate/live_*.t') );
-}
-
-# shut it down
-kill 'INT', $pid;
-close $server;
-
-# clean up
-rmtree "$FindBin::Bin/../../t/tmp" if -d "$FindBin::Bin/../../t/tmp";
-
-is( $return, 0, 'live tests' );
-
-sub check_port {
- my ( $host, $port ) = @_;
-
- my $remote = IO::Socket::INET->new(
- Proto => "tcp",
- PeerAddr => $host,
- PeerPort => $port
- );
- if ($remote) {
- close $remote;
- return 1;
- }
- else {
- return 0;
- }
-}
-
-sub prove {
- if (!(my $pid = fork)) {
- require App::Prove;
- my $prove = App::Prove->new;
- $prove->process_args(@_);
- exit( $prove->run ? 0 : 1 );
- } else {
- waitpid $pid, 0;
- return $?;
- }
-}
Copied: Catalyst-Runtime/5.80/trunk/t/author/optional_http-server.t (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/author/optional_http-server.t)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/author/optional_http-server.t (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/author/optional_http-server.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,96 @@
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+use File::Path;
+use FindBin;
+use IPC::Open3;
+use IO::Socket;
+
+use Catalyst::Devel 1.0;
+use File::Copy::Recursive;
+
+# Run a single test by providing it as the first arg
+my $single_test = shift;
+
+my $tmpdir = "$FindBin::Bin/../../t/tmp";
+
+# clean up
+rmtree $tmpdir if -d $tmpdir;
+
+# create a TestApp and copy the test libs into it
+mkdir $tmpdir;
+chdir $tmpdir;
+system( $^X, "-I$FindBin::Bin/../../lib", "$FindBin::Bin/../../script/catalyst.pl", 'TestApp' );
+chdir "$FindBin::Bin/..";
+File::Copy::Recursive::dircopy( '../t/lib', '../t/tmp/TestApp/lib' ) or die;
+
+# remove TestApp's tests
+rmtree '../t/tmp/TestApp/t' or die;
+
+# spawn the standalone HTTP server
+my $port = 30000 + int rand(1 + 10000);
+my @cmd = ($^X, "-I$FindBin::Bin/../../lib",
+ "$FindBin::Bin/../../t/tmp/TestApp/script/testapp_server.pl", '-port', $port );
+my $pid = open3( undef, my $server, undef, @cmd)
+ or die "Unable to spawn standalone HTTP server: $!";
+
+# wait for it to start
+print "Waiting for server to start...\n";
+my $timeout = 30;
+my $count = 0;
+while ( check_port( 'localhost', $port ) != 1 ) {
+ sleep 1;
+ die("Server did not start within $timeout seconds: " . join(' ', @cmd))
+ if $count++ > $timeout;
+}
+
+# run the testsuite against the HTTP server
+$ENV{CATALYST_SERVER} = "http://localhost:$port";
+
+my $return;
+if ( $single_test ) {
+ $return = system( "$^X -I../lib/ $single_test" );
+}
+else {
+ $return = prove( '-r', '-I../lib/', glob('../t/aggregate/live_*.t') );
+}
+
+# shut it down
+kill 'INT', $pid;
+close $server;
+
+# clean up
+rmtree "$FindBin::Bin/../../t/tmp" if -d "$FindBin::Bin/../../t/tmp";
+
+is( $return, 0, 'live tests' );
+
+sub check_port {
+ my ( $host, $port ) = @_;
+
+ my $remote = IO::Socket::INET->new(
+ Proto => "tcp",
+ PeerAddr => $host,
+ PeerPort => $port
+ );
+ if ($remote) {
+ close $remote;
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+sub prove {
+ if (!(my $pid = fork)) {
+ require App::Prove;
+ my $prove = App::Prove->new;
+ $prove->process_args(@_);
+ exit( $prove->run ? 0 : 1 );
+ } else {
+ waitpid $pid, 0;
+ return $?;
+ }
+}
Deleted: Catalyst-Runtime/5.80/trunk/t/custom_exception_class_simple.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/custom_exception_class_simple.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/custom_exception_class_simple.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,18 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-use FindBin qw/$Bin/;
-use lib "$Bin/lib";
-use Test::More tests => 1;
-use Test::Exception;
-
-TODO: {
- local $TODO = 'Does not work yet';
-
-lives_ok {
- require TestAppClassExceptionSimpleTest;
-} 'Can load application';
-
-}
-
Copied: Catalyst-Runtime/5.80/trunk/t/custom_exception_class_simple.t (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/custom_exception_class_simple.t)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/custom_exception_class_simple.t (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/custom_exception_class_simple.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+use Test::More tests => 1;
+use Test::Exception;
+
+TODO: {
+ local $TODO = 'Does not work yet';
+
+lives_ok {
+ require TestAppClassExceptionSimpleTest;
+} 'Can load application';
+
+}
+
Modified: Catalyst-Runtime/5.80/trunk/t/custom_live_component_controller_action_auto_doublebug.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/custom_live_component_controller_action_auto_doublebug.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/custom_live_component_controller_action_auto_doublebug.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -32,9 +32,9 @@
{
my @expected = qw[
- TestAppDoubleAutoBug->auto
- TestAppDoubleAutoBug->default
- TestAppDoubleAutoBug->end
+ TestAppDoubleAutoBug::Controller::Root->auto
+ TestAppDoubleAutoBug::Controller::Root->default
+ TestAppDoubleAutoBug::Controller::Root->end
];
my $expected = join( ", ", @expected );
Copied: Catalyst-Runtime/5.80/trunk/t/deprecated_appclass_action_warnings.t (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/deprecated_appclass_action_warnings.t)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/deprecated_appclass_action_warnings.t (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/deprecated_appclass_action_warnings.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More;
+use Catalyst::Test 'DeprecatedActionsInAppClassTestApp';
+
+plan tests => 3;
+
+my $warnings;
+my $logger = DeprecatedActionsInAppClassTestApp::Log->new;
+Catalyst->log($logger);
+
+ok( my $response = request('http://localhost/foo'), 'Request' );
+ok( $response->is_success, 'Response Successful 2xx' );
+is( $DeprecatedActionsInAppClassTestApp::Log::warnings, 1, 'Get the appclass action warning' );
\ No newline at end of file
Copied: Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/ACLTestApp)
Copied: Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/ACLTestApp/Controller)
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/ACLTestApp/Controller/Root.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,18 +0,0 @@
-package ACLTestApp::Controller::Root;
-use Test::More;
-
-use base 'Catalyst::Controller';
-
-__PACKAGE__->config->{namespace} = '';
-
-sub foobar : Private {
- die $Catalyst::DETACH;
-}
-
-sub gorch : Local {
- my ( $self, $c, $frozjob ) = @_;
- is $frozjob, 'wozzle';
- $c->res->body("gorch");
-}
-
-1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/Root.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/ACLTestApp/Controller/Root.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/Root.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,18 @@
+package ACLTestApp::Controller::Root;
+use Test::More;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub foobar : Private {
+ die $Catalyst::DETACH;
+}
+
+sub gorch : Local {
+ my ( $self, $c, $frozjob ) = @_;
+ is $frozjob, 'wozzle';
+ $c->res->body("gorch");
+}
+
+1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/ACLTestApp.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/ACLTestApp.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,26 @@
+package ACLTestApp;
+use Test::More;
+
+use strict;
+use warnings;
+use MRO::Compat;
+use Scalar::Util ();
+
+use base qw/Catalyst Catalyst::Controller/;
+use Catalyst qw//;
+
+sub execute {
+ my $c = shift;
+ my ( $class, $action ) = @_;
+
+ if ( Scalar::Util::blessed($action)
+ and $action->name ne "foobar" ) {
+ eval { $c->detach( 'foobar', [$action, 'foo'] ) };
+ }
+
+ $c->next::method( @_ );
+}
+
+__PACKAGE__->setup;
+
+1;
Modified: Catalyst-Runtime/5.80/trunk/t/lib/Catalyst/Plugin/Test/Plugin.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/Catalyst/Plugin/Test/Plugin.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/Catalyst/Plugin/Test/Plugin.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -22,26 +22,14 @@
return $c;
}
-# Note: This is horrible, but Catalyst::Plugin::Server forces the body to
+# Note: Catalyst::Plugin::Server forces the body to
# be parsed, by calling the $c->req->body method in prepare_action.
# We need to test this, as this was broken by 5.80. See also
-# t/aggregate/live_engine_request_body.t. Better ways to test this
-# appreciated if you have suggestions :)
-{
- my $have_req_body = 0;
- sub prepare_action {
- my $c = shift;
- $have_req_body++ if $c->req->body;
- $c->next::method(@_);
- }
- sub have_req_body_in_prepare_action : Local {
- my ($self, $c) = @_;
- $c->res->body($have_req_body);
- }
+# t/aggregate/live_engine_request_body.t.
+sub prepare_action {
+ my $c = shift;
+ $c->res->header('X-Have-Request-Body', 1) if $c->req->body;
+ $c->next::method(@_);
}
-sub end : Private {
- my ($self,$c) = @_;
-}
-
1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/DeprecatedActionsInAppClassTestApp.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/DeprecatedActionsInAppClassTestApp.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/DeprecatedActionsInAppClassTestApp.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/DeprecatedActionsInAppClassTestApp.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,30 @@
+package DeprecatedActionsInAppClassTestApp;
+
+use strict;
+use warnings;
+use Catalyst;
+
+our $VERSION = '0.01';
+
+__PACKAGE__->config( name => 'DeprecatedActionsInAppClassTestApp', root => '/some/dir' );
+__PACKAGE__->log(DeprecatedActionsInAppClassTestApp::Log->new);
+__PACKAGE__->setup;
+
+sub foo : Local {
+ my ($self, $c) = @_;
+ $c->res->body('OK');
+}
+
+package DeprecatedActionsInAppClassTestApp::Log;
+use strict;
+use warnings;
+use base qw/Catalyst::Log/;
+
+our $warnings;
+
+sub warn {
+ my ($self, $warning) = @_;
+ $warnings++ if $warning =~ /action methods .+ found defined/i;
+}
+
+1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/PluginTestApp)
Copied: Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/PluginTestApp/Controller)
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/PluginTestApp/Controller/Root.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,55 +0,0 @@
-package PluginTestApp::Controller::Root;
-use Test::More;
-
-use base 'Catalyst::Controller';
-
-#use Catalyst qw(
-# Test::Plugin
-# +TestApp::Plugin::FullyQualified
-# );
-
-__PACKAGE__->config->{namespace} = '';
-
-sub compile_time_plugins : Local {
- my ( $self, $c ) = @_;
-
- isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
- isa_ok $c, 'TestApp::Plugin::FullyQualified';
-
- can_ok $c, 'registered_plugins';
- $c->_test_plugins;
-
- $c->res->body("ok");
-}
-
-sub run_time_plugins : Local {
- my ( $self, $c ) = @_;
-
- $c->_test_plugins;
- my $faux_plugin = 'Faux::Plugin';
-
-# Trick perl into thinking the plugin is already loaded
- $INC{'Faux/Plugin.pm'} = 1;
-
- ref($c)->plugin( faux => $faux_plugin );
-
- isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
- isa_ok $c, 'TestApp::Plugin::FullyQualified';
- ok !$c->isa($faux_plugin),
- '... and it should not inherit from the instant plugin';
- can_ok $c, 'faux';
- is $c->faux->count, 1, '... and it should behave correctly';
- is_deeply [ $c->registered_plugins ],
- [
- qw/Catalyst::Plugin::Test::Plugin
- Faux::Plugin
- TestApp::Plugin::FullyQualified/
- ],
- 'registered_plugins() should report all plugins';
- ok $c->registered_plugins('Faux::Plugin'),
- '... and even the specific instant plugin';
-
- $c->res->body("ok");
-}
-
-1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/Root.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/PluginTestApp/Controller/Root.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/Root.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,55 @@
+package PluginTestApp::Controller::Root;
+use Test::More;
+
+use base 'Catalyst::Controller';
+
+#use Catalyst qw(
+# Test::Plugin
+# +TestApp::Plugin::FullyQualified
+# );
+
+__PACKAGE__->config->{namespace} = '';
+
+sub compile_time_plugins : Local {
+ my ( $self, $c ) = @_;
+
+ isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
+ isa_ok $c, 'TestApp::Plugin::FullyQualified';
+
+ can_ok $c, 'registered_plugins';
+ $c->_test_plugins;
+
+ $c->res->body("ok");
+}
+
+sub run_time_plugins : Local {
+ my ( $self, $c ) = @_;
+
+ $c->_test_plugins;
+ my $faux_plugin = 'Faux::Plugin';
+
+# Trick perl into thinking the plugin is already loaded
+ $INC{'Faux/Plugin.pm'} = 1;
+
+ ref($c)->plugin( faux => $faux_plugin );
+
+ isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
+ isa_ok $c, 'TestApp::Plugin::FullyQualified';
+ ok !$c->isa($faux_plugin),
+ '... and it should not inherit from the instant plugin';
+ can_ok $c, 'faux';
+ is $c->faux->count, 1, '... and it should behave correctly';
+ is_deeply [ $c->registered_plugins ],
+ [
+ qw/Catalyst::Plugin::Test::Plugin
+ Faux::Plugin
+ TestApp::Plugin::FullyQualified/
+ ],
+ 'registered_plugins() should report all plugins';
+ ok $c->registered_plugins('Faux::Plugin'),
+ '... and even the specific instant plugin';
+
+ $c->res->body("ok");
+}
+
+1;
Modified: Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/PluginTestApp.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -6,48 +6,6 @@
+TestApp::Plugin::FullyQualified
);
-sub compile_time_plugins : Local {
- my ( $self, $c ) = @_;
-
- isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
- isa_ok $c, 'TestApp::Plugin::FullyQualified';
-
- can_ok $c, 'registered_plugins';
- $c->_test_plugins;
-
- $c->res->body("ok");
-}
-
-sub run_time_plugins : Local {
- my ( $self, $c ) = @_;
-
- $c->_test_plugins;
- my $faux_plugin = 'Faux::Plugin';
-
-# Trick perl into thinking the plugin is already loaded
- $INC{'Faux/Plugin.pm'} = 1;
-
- __PACKAGE__->plugin( faux => $faux_plugin );
-
- isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
- isa_ok $c, 'TestApp::Plugin::FullyQualified';
- ok !$c->isa($faux_plugin),
- '... and it should not inherit from the instant plugin';
- can_ok $c, 'faux';
- is $c->faux->count, 1, '... and it should behave correctly';
- is_deeply [ $c->registered_plugins ],
- [
- qw/Catalyst::Plugin::Test::Plugin
- Faux::Plugin
- TestApp::Plugin::FullyQualified/
- ],
- 'registered_plugins() should report all plugins';
- ok $c->registered_plugins('Faux::Plugin'),
- '... and even the specific instant plugin';
-
- $c->res->body("ok");
-}
-
sub _test_plugins {
my $c = shift;
is_deeply [ $c->registered_plugins ],
Modified: Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Root.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestApp/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -48,4 +48,8 @@
$c->forward( 'recursion_test' );
}
+sub end : Private {
+ my ($self,$c) = @_;
+}
+
1;
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,19 +0,0 @@
-package TestAppClassExceptionSimpleTest::Exception;
-use strict;
-use warnings;
-
-sub throw {}
-
-#########
-
-package TestAppClassExceptionSimpleTest;
-use strict;
-use warnings;
-
-BEGIN { $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassExceptionSimpleTest::Exception'; }
-
-use Catalyst;
-
-__PACKAGE__->setup;
-
-1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppClassExceptionSimpleTest.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppClassExceptionSimpleTest.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,19 @@
+package TestAppClassExceptionSimpleTest::Exception;
+use strict;
+use warnings;
+
+sub throw {}
+
+#########
+
+package TestAppClassExceptionSimpleTest;
+use strict;
+use warnings;
+
+BEGIN { $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassExceptionSimpleTest::Exception'; }
+
+use Catalyst;
+
+__PACKAGE__->setup;
+
+1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug)
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/Controller)
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/Controller/Root.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,22 +0,0 @@
-package TestAppDoubleAutoBug::Controller::Root;
-
-use base 'Catalyst::Controller';
-
-__PACKAGE__->config->{namespace} = '';
-
-sub auto : Private {
- my ( $self, $c ) = @_;
- ++$c->stash->{auto_count};
- return 1;
-}
-
-sub default : Private {
- my ( $self, $c ) = @_;
- $c->res->body( sprintf 'default, auto=%d', $c->stash->{auto_count} );
-}
-
-sub end : Private {
- my ($self,$c) = @_;
-}
-
-1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/Root.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/Controller/Root.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/Root.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,22 @@
+package TestAppDoubleAutoBug::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub auto : Private {
+ my ( $self, $c ) = @_;
+ ++$c->stash->{auto_count};
+ return 1;
+}
+
+sub default : Private {
+ my ( $self, $c ) = @_;
+ $c->res->body( sprintf 'default, auto=%d', $c->stash->{auto_count} );
+}
+
+sub end : Private {
+ my ($self,$c) = @_;
+}
+
+1;
Modified: Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppDoubleAutoBug.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -44,16 +44,3 @@
return $c->SUPER::execute(@_);
}
-
-
-
-sub auto : Private {
- my ( $self, $c ) = @_;
- ++$c->stash->{auto_count};
- return 1;
-}
-
-sub default : Private {
- my ( $self, $c ) = @_;
- $c->res->body( sprintf 'default, auto=%d', $c->stash->{auto_count} );
-}
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppNonMooseController)
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppNonMooseController/Controller)
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppNonMooseController/Controller/Foo.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,5 +0,0 @@
-package TestAppNonMooseController::Controller::Foo;
-use base qw/TestAppNonMooseController::ControllerBase/;
-
-1;
-
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppNonMooseController/Controller/Foo.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,5 @@
+package TestAppNonMooseController::Controller::Foo;
+use base qw/TestAppNonMooseController::ControllerBase/;
+
+1;
+
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppNonMooseController/ControllerBase.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,5 +0,0 @@
-package TestAppNonMooseController::ControllerBase;
-use base qw/Catalyst::Controller/;
-
-1;
-
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppNonMooseController/ControllerBase.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,5 @@
+package TestAppNonMooseController::ControllerBase;
+use base qw/Catalyst::Controller/;
+
+1;
+
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,8 +0,0 @@
-package TestAppNonMooseController;
-use base qw/Catalyst/;
-use Catalyst;
-
-__PACKAGE__->setup;
-
-1;
-
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppNonMooseController.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,8 @@
+package TestAppNonMooseController;
+use base qw/Catalyst/;
+use Catalyst;
+
+__PACKAGE__->setup;
+
+1;
+
Modified: Catalyst-Runtime/5.80/trunk/t/lib/TestAppPathBug.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppPathBug.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppPathBug.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -2,13 +2,15 @@
use warnings;
package TestAppPathBug;
-
+use strict;
+use warnings;
use Catalyst;
our $VERSION = '0.01';
__PACKAGE__->config( name => 'TestAppPathBug', root => '/some/dir' );
+__PACKAGE__->log(TestAppPathBug::Log->new);
__PACKAGE__->setup;
sub foo : Path {
@@ -16,4 +18,11 @@
$c->res->body( 'This is the foo method.' );
}
+package TestAppPathBug::Log;
+use strict;
+use warnings;
+use base qw/Catalyst::Log/;
+
+sub warn {}
+
1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPluginWithConstructor)
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPluginWithConstructor/Controller)
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPluginWithConstructor/Controller/Root.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,12 +0,0 @@
-package TestAppPluginWithConstructor::Controller::Root;
-
-use base 'Catalyst::Controller';
-
-__PACKAGE__->config->{namespace} = '';
-
-sub foo : Local {
- my ($self, $c) = @_;
- $c->res->body('foo');
-}
-
-1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/Root.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppPluginWithConstructor/Controller/Root.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/Root.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,12 @@
+package TestAppPluginWithConstructor::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub foo : Local {
+ my ($self, $c) = @_;
+ $c->res->body('foo');
+}
+
+1;
Modified: Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppPluginWithConstructor.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -6,11 +6,6 @@
use Moose;
BEGIN { extends qw/Catalyst Catalyst::Controller/ } # Ewww, FIXME.
-sub foo : Local {
- my ($self, $c) = @_;
- $c->res->body('foo');
-}
-
__PACKAGE__->setup;
our $MODIFIER_FIRED = 0;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats)
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/Controller)
Deleted: Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/Controller/Root.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,16 +0,0 @@
-package TestAppStats::Controller::Root;
-use strict;
-use warnings;
-use base 'Catalyst::Controller';
-
-__PACKAGE__->config->{namespace} = '';
-
-# Return log messages from previous request
-sub default : Private {
- my ( $self, $c ) = @_;
- $c->stats->profile("test");
- $c->res->body(join("\n", @TestAppStats::log_messages));
- @TestAppStats::log_messages = ();
-}
-
-1;
Copied: Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/Root.pm (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppStats/Controller/Root.pm)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/Root.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats/Controller/Root.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,16 @@
+package TestAppStats::Controller::Root;
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+# Return log messages from previous request
+sub default : Private {
+ my ( $self, $c ) = @_;
+ $c->stats->profile("test");
+ $c->res->body(join("\n", @TestAppStats::log_messages));
+ @TestAppStats::log_messages = ();
+}
+
+1;
Modified: Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats.pm 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppStats.pm 2009-09-10 02:13:04 UTC (rev 11349)
@@ -16,16 +16,8 @@
__PACKAGE__->setup;
-# Return log messages from previous request
-sub default : Private {
- my ( $self, $c ) = @_;
- $c->stats->profile("test");
- $c->res->body(join("\n", @log_messages));
- @log_messages = ();
-}
-
package TestAppStats::Log;
use base qw/Catalyst::Log/;
-sub info { push(@log_messages, @_); }
-sub debug { push(@log_messages, @_); }
+sub info { push(@TestAppStats::log_messages, @_); }
+sub debug { push(@TestAppStats::log_messages, @_); }
Deleted: Catalyst-Runtime/5.80/trunk/t/unit_controller_actions.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_controller_actions.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/unit_controller_actions.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -1,26 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 4;
-
-use Catalyst ();
-{
- package TestController;
- use Moose;
- BEGIN { extends 'Catalyst::Controller' }
-
- sub action : Local {}
-
- sub foo : Path {}
-
- no Moose;
-}
-
-my $mock_app = Class::MOP::Class->create_anon_class( superclasses => ['Catalyst'] );
-my $app = $mock_app->name->new;
-my $controller = TestController->new($app, {actions => { foo => { Path => '/some/path' }}});
-
-ok $controller->can('_controller_actions');
-is_deeply $controller->_controller_actions => { foo => { Path => '/some/path' }};
-is_deeply $controller->{actions} => { foo => { Path => '/some/path' }}; # Back compat.
-is_deeply [ sort grep { ! /^_/ } map { $_->name } $controller->get_action_methods ], [sort qw/action foo/];
-
Copied: Catalyst-Runtime/5.80/trunk/t/unit_controller_actions.t (from rev 11348, Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/unit_controller_actions.t)
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_controller_actions.t (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/unit_controller_actions.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -0,0 +1,26 @@
+use strict;
+use warnings;
+use Test::More tests => 4;
+
+use Catalyst ();
+{
+ package TestController;
+ use Moose;
+ BEGIN { extends 'Catalyst::Controller' }
+
+ sub action : Local {}
+
+ sub foo : Path {}
+
+ no Moose;
+}
+
+my $mock_app = Class::MOP::Class->create_anon_class( superclasses => ['Catalyst'] );
+my $app = $mock_app->name->new;
+my $controller = TestController->new($app, {actions => { foo => { Path => '/some/path' }}});
+
+ok $controller->can('_controller_actions');
+is_deeply $controller->_controller_actions => { foo => { Path => '/some/path' }};
+is_deeply $controller->{actions} => { foo => { Path => '/some/path' }}; # Back compat.
+is_deeply [ sort grep { ! /^_/ } map { $_->name } $controller->get_action_methods ], [sort qw/action foo/];
+
Modified: Catalyst-Runtime/5.80/trunk/t/unit_dispatcher_requestargs_restore.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_dispatcher_requestargs_restore.t 2009-09-10 01:20:55 UTC (rev 11348)
+++ Catalyst-Runtime/5.80/trunk/t/unit_dispatcher_requestargs_restore.t 2009-09-10 02:13:04 UTC (rev 11349)
@@ -10,43 +10,7 @@
# executing another action from the dispatcher (i.e. wrapping actions)
# is present, so that the Authorization::ACL plugin can be re-written
# to not be full of such crazy shit.
-{
- package ACLTestApp;
- use Test::More;
- use strict;
- use warnings;
- use MRO::Compat;
- use Scalar::Util ();
-
- use base qw/Catalyst Catalyst::Controller/;
- use Catalyst qw//;
-
- sub execute {
- my $c = shift;
- my ( $class, $action ) = @_;
-
- if ( Scalar::Util::blessed($action)
- and $action->name ne "foobar" ) {
- eval { $c->detach( 'foobar', [$action, 'foo'] ) };
- }
-
- $c->next::method( @_ );
- }
-
- sub foobar : Private {
- die $Catalyst::DETACH;
- }
-
- sub gorch : Local {
- my ( $self, $c, $frozjob ) = @_;
- is $frozjob, 'wozzle';
- $c->res->body("gorch");
- }
-
- __PACKAGE__->setup;
-}
-
use strict;
use warnings;
use FindBin qw/$Bin/;
More information about the Catalyst-commits
mailing list