Reverted previous change
Sebastian Riedel [Sun, 13 Nov 2005 02:48:36 +0000 (02:48 +0000)]
lib/Catalyst/Dispatcher.pm

index 35f129f..acd1b59 100644 (file)
@@ -17,7 +17,7 @@ use overload '""' => sub { return ref shift }, fallback => 1;
 
 __PACKAGE__->mk_accessors(
     qw/tree dispatch_types registered_dispatch_types
-      method_action_class action_container_class reserved_actions/
+      method_action_class action_container_class/
 );
 
 # Preload these action types
@@ -26,9 +26,6 @@ our @PRELOAD = qw/Path Regex/;
 # Postload these action types
 our @POSTLOAD = qw/Index Default/;
 
-# Reserved action names
-our @RESERVED = qw/begin auto default index end/;
-
 =head1 NAME
 
 Catalyst::Dispatcher - The Catalyst Dispatcher
@@ -303,18 +300,10 @@ sub register {
         }
     }
 
-    # Check if action name is reserved
-    my $reserved = 0;
-    for my $name ( @{ $self->reserved_actions } ) {
-        $reserved++ if $action->name eq $name;
-    }
-
     # Pass the action to our dispatch types so they can register it if reqd.
-    my $reg = $reserved;
-    unless ($reserved) {
-        foreach my $type ( @{ $self->dispatch_types } ) {
-            $reg++ if $type->register( $c, $action );
-        }
+    my $reg = 0;
+    foreach my $type ( @{ $self->dispatch_types } ) {
+        $reg++ if $type->register( $c, $action );
     }
 
     return unless $reg + $priv;
@@ -360,7 +349,6 @@ sub setup_actions {
 
     $self->dispatch_types( [] );
     $self->registered_dispatch_types( {} );
-    $self->reserved_actions( \@RESERVED );
     $self->method_action_class('Catalyst::Action');
     $self->action_container_class('Catalyst::ActionContainer');