[Catalyst-commits] r7986 - in Catalyst-Runtime/5.80/trunk: . lib
lib/Catalyst t
groditi at dev.catalyst.perl.org
groditi at dev.catalyst.perl.org
Mon Jun 23 22:20:13 BST 2008
Author: groditi
Date: 2008-06-23 22:20:13 +0100 (Mon, 23 Jun 2008)
New Revision: 7986
Modified:
Catalyst-Runtime/5.80/trunk/
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm
Catalyst-Runtime/5.80/trunk/t/unit_controller_namespace.t
Catalyst-Runtime/5.80/trunk/t/unit_core_action_for.t
Log:
r18298 at martha (orig r7826): groditi | 2008-05-27 21:42:55 -0400
revert MyApp instantiation
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/trunk:7576
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7769
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
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/trunk:7576
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7826
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
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 2008-06-23 21:20:05 UTC (rev 7985)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm 2008-06-23 21:20:13 UTC (rev 7986)
@@ -140,9 +140,7 @@
#my opinion is that this whole sub really should be a builder method, not
#something that happens on every call. Anyone else disagree?? -- groditi
-
-#we are wrapping the accessor, so just uyse a modifier since a normal sub would
-#just be overridden by the generated moose method
+## -- apparently this is all just waiting for app/ctx split
around action_namespace => sub {
my $orig = shift;
my ( $self, $c ) = @_;
@@ -150,14 +148,9 @@
if( ref($self) ){
return $self->$orig if $self->has_action_namespace;
} else {
- warn "action_namespace called as class method";
- # if the following won't change at runtime it should be lazy_building thing
return $self->config->{namespace} if exists $self->config->{namespace};
}
- #the following looks like a possible target for a default setting. i am not
- #making the below the builder because i don't know if $c will vary from
- #call to call, which would affect case sensitivity settings -- groditi
my $case_s;
if( $c ){
$case_s = $c->config->{case_sensitive};
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2008-06-23 21:20:05 UTC (rev 7985)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2008-06-23 21:20:13 UTC (rev 7986)
@@ -923,7 +923,9 @@
}
# Add our self to components, since we are also a component
- $class->components->{$class} = $class->setup_component($class);
+ if( $class->isa('Catalyst::Controller') ){
+ $class->components->{$class} = $class;
+ }
$class->setup_actions;
Modified: Catalyst-Runtime/5.80/trunk/t/unit_controller_namespace.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_controller_namespace.t 2008-06-23 21:20:05 UTC (rev 7985)
+++ Catalyst-Runtime/5.80/trunk/t/unit_controller_namespace.t 2008-06-23 21:20:13 UTC (rev 7986)
@@ -19,6 +19,6 @@
sub config { {} };
}
-is(MyApp::Controller::Foo->COMPONENT('MyApp')->action_namespace('Stub'), 'foo');
+is(MyApp::Controller::Foo->action_namespace('Stub'), 'foo');
-is(MyApp::Controller::Root->COMPONENT('MyApp')->action_namespace('Stub'), '');
+is(MyApp::Controller::Root->action_namespace('Stub'), '');
Modified: Catalyst-Runtime/5.80/trunk/t/unit_core_action_for.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_core_action_for.t 2008-06-23 21:20:05 UTC (rev 7985)
+++ Catalyst-Runtime/5.80/trunk/t/unit_core_action_for.t 2008-06-23 21:20:13 UTC (rev 7986)
@@ -12,7 +12,7 @@
use_ok('TestApp');
-is(TestApp->component('TestApp')->action_for('global_action')->code, TestApp->can('global_action'),
+is(TestApp->action_for('global_action')->code, TestApp->can('global_action'),
'action_for on appclass ok');
is(TestApp->controller('Args')->action_for('args')->code,
More information about the Catalyst-commits
mailing list