[Catalyst-commits] r7826 - in Catalyst-Runtime/5.80/branches/moose:
lib lib/Catalyst t
groditi at dev.catalyst.perl.org
groditi at dev.catalyst.perl.org
Wed May 28 02:42:55 BST 2008
Author: groditi
Date: 2008-05-28 02:42:55 +0100 (Wed, 28 May 2008)
New Revision: 7826
Modified:
Catalyst-Runtime/5.80/branches/moose/lib/Catalyst.pm
Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/Controller.pm
Catalyst-Runtime/5.80/branches/moose/t/unit_controller_namespace.t
Catalyst-Runtime/5.80/branches/moose/t/unit_core_action_for.t
Log:
revert MyApp instantiation
Modified: Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/Controller.pm 2008-05-27 22:10:08 UTC (rev 7825)
+++ Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/Controller.pm 2008-05-28 01:42:55 UTC (rev 7826)
@@ -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/branches/moose/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/moose/lib/Catalyst.pm 2008-05-27 22:10:08 UTC (rev 7825)
+++ Catalyst-Runtime/5.80/branches/moose/lib/Catalyst.pm 2008-05-28 01:42:55 UTC (rev 7826)
@@ -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/branches/moose/t/unit_controller_namespace.t
===================================================================
--- Catalyst-Runtime/5.80/branches/moose/t/unit_controller_namespace.t 2008-05-27 22:10:08 UTC (rev 7825)
+++ Catalyst-Runtime/5.80/branches/moose/t/unit_controller_namespace.t 2008-05-28 01:42:55 UTC (rev 7826)
@@ -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/branches/moose/t/unit_core_action_for.t
===================================================================
--- Catalyst-Runtime/5.80/branches/moose/t/unit_core_action_for.t 2008-05-27 22:10:08 UTC (rev 7825)
+++ Catalyst-Runtime/5.80/branches/moose/t/unit_core_action_for.t 2008-05-28 01:42:55 UTC (rev 7826)
@@ -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