X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=22bb49ff581e958df0a909f8bb3c049f54c1dd68;hb=d666af81cece84d49c57bb91949641937ad57091;hp=f44b9dbb7444adb2b90634d715d1e3f3b3bfdc24;hpb=ea0e58d9d85d93bf94c3ffa6b4d7b71b200bbdf1;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index f44b9db..22bb49f 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -392,7 +392,7 @@ sub register { my $priv = 0; foreach my $key ( keys %{ $action->attributes } ) { - $priv++ if $key eq 'Private'; + next if $key eq 'Private'; my $class = "Catalyst::DispatchType::$key"; unless ( $registered->{$class} ) { eval "require $class"; @@ -402,13 +402,10 @@ sub register { } # Pass the action to our dispatch types so they can register it if reqd. - my $reg = 0; foreach my $type ( @{ $self->dispatch_types } ) { - $reg++ if $type->register( $c, $action ); + $type->register( $c, $action ); } - return unless $reg + $priv; - my $namespace = $action->namespace; my $name = $action->name;