X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FIndex.pm;h=6bad124950bd55bcaff559594cef8af2824ab42f;hb=342d21698a97962c51114b6ebc6bb8626511cfc6;hp=d55ca0075635a6c44f9821ba7275059d1f587d0a;hpb=1315d253bbf854cbd9740ef4323a9930411b9fa0;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/DispatchType/Index.pm b/lib/Catalyst/DispatchType/Index.pm index d55ca00..6bad124 100644 --- a/lib/Catalyst/DispatchType/Index.pm +++ b/lib/Catalyst/DispatchType/Index.pm @@ -67,7 +67,7 @@ Register an action with this DispatchType. sub register { my ( $self, $c, $action ) = @_; - $self->_actions->{ $action->reverse } = $action; + $self->_actions->{ $action->reverse } = $action if $action->name eq 'index'; return 1; } @@ -84,11 +84,13 @@ sub uri_for_action { return undef if @$captures; - return undef unless $action->name eq 'index'; + return undef unless exists $self->_actions->{ $action->reverse }; return "/".$action->namespace; } +sub _is_low_precedence { 1 } + =head1 AUTHORS Catalyst Contributors, see Catalyst.pm