[Catalyst-commits] r7764 - Catalyst-Runtime/5.80/branches/moose/lib/Catalyst

konobi at dev.catalyst.perl.org konobi at dev.catalyst.perl.org
Tue May 20 00:32:42 BST 2008


Author: konobi
Date: 2008-05-20 00:32:41 +0100 (Tue, 20 May 2008)
New Revision: 7764

Modified:
   Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/Dispatcher.pm
Log:
Update dispatcher attributes to have sane defaults.


Modified: Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/Dispatcher.pm	2008-05-19 17:36:30 UTC (rev 7763)
+++ Catalyst-Runtime/5.80/branches/moose/lib/Catalyst/Dispatcher.pm	2008-05-19 23:32:41 UTC (rev 7764)
@@ -26,10 +26,11 @@
 our @POSTLOAD = qw/Default/;
 
 has _tree => (is => 'rw');
-has _dispatch_types => (is => 'rw');
-has _registered_dispatch_types => (is => 'rw');
-has _method_action_class => (is => 'rw');
-has _action_container_class => (is => 'rw');
+has _dispatch_types => (is => 'rw', default => sub { [] }, required => 1, lazy => 1);
+has _registered_dispatch_types => (is => 'rw', default => sub { {} }, required => 1, lazy => 1);
+has _method_action_class => (is => 'rw', default => 'Catalyst::Action');
+has _action_container_class => (is => 'rw', default => 'Catalyst::ActionContainer');
+
 has preload_dispatch_types => (is => 'rw', required => 1, lazy => 1, default => sub { [@PRELOAD] });
 has postload_dispatch_types => (is => 'rw', required => 1, lazy => 1, default => sub { [@POSTLOAD] });
 has _action_hash => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
@@ -460,10 +461,6 @@
 sub setup_actions {
     my ( $self, $c ) = @_;
 
-    $self->_dispatch_types( [] );
-    $self->_registered_dispatch_types( {} );
-    $self->_method_action_class('Catalyst::Action');
-    $self->_action_container_class('Catalyst::ActionContainer');
 
     my @classes =
       $self->_load_dispatch_types( @{ $self->preload_dispatch_types } );




More information about the Catalyst-commits mailing list