X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FIndex.pm;h=6bad124950bd55bcaff559594cef8af2824ab42f;hb=4028c19ded1cd3ca30449eea739ca89ebf34a220;hp=c0be9e6d38f4675b9dc57a66824eeabd01d07d06;hpb=c4586fd07d4c17c49b4da9c224c6dcf1a782a099;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/DispatchType/Index.pm b/lib/Catalyst/DispatchType/Index.pm index c0be9e6..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,7 +84,7 @@ 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; }