[Catalyst-commits] r11893 -
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Nov 18 22:11:27 GMT 2009
Author: t0m
Date: 2009-11-18 22:11:25 +0000 (Wed, 18 Nov 2009)
New Revision: 11893
Modified:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst.pm
Log:
Stop the app class being a controller, and stop it being stuffed in the component registry
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst.pm 2009-11-18 21:59:35 UTC (rev 11892)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned-appnotcomponent/lib/Catalyst.pm 2009-11-18 22:11:25 UTC (rev 11893)
@@ -10,6 +10,8 @@
use Catalyst::Utils;
use Catalyst::Controller;
use Catalyst::Context;
+use Catalyst::Exception::Detach;
+use Catalyst::Exception::Go;
use Devel::InnerPackage ();
use Module::Pluggable::Object ();
use Text::SimpleTable ();
@@ -71,9 +73,9 @@
}
my $meta = Moose::Meta::Class->initialize($caller);
+ # Make the caller inherit from Catalyst
unless ( $caller->isa('Catalyst') ) {
- my @superclasses = ($meta->superclasses, $class, 'Catalyst::Controller');
- $meta->superclasses(@superclasses);
+ $meta->superclasses($meta->superclasses, 'Catalyst');
}
# Avoid possible C3 issues if 'Moose::Object' is already on RHS of MyApp
$meta->superclasses(grep { $_ ne 'Moose::Object' } $meta->superclasses);
@@ -826,11 +828,6 @@
if ( keys %{ $class->components } );
}
- # Add our self to components, since we are also a component
- if( $class->isa('Catalyst::Controller') ){
- $class->components->{$class} = $class;
- }
-
$class->setup_actions;
if ( $class->debug ) {
More information about the Catalyst-commits
mailing list