Fix regression for "sub foo : Path {}" in the root controller which was introduced...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Chained.pm
index 0274dba..d436983 100644 (file)
@@ -181,7 +181,7 @@ sub recurse_match {
 
                 if (!$best_action                       ||
                     @parts < @{$best_action->{parts}}   ||
-                    (!@parts && $args_attr == 0)){
+                    (!@parts && $args_attr eq 0)){
                     $best_action = {
                         actions => [ $action ],
                         captures=> [],
@@ -208,7 +208,7 @@ sub register {
 
     return 0 unless @chained_attr;
 
-    if (@chained_attr > 2) {
+    if (@chained_attr > 1) {
         Catalyst::Exception->throw(
           "Multiple Chained attributes not supported registering ${action}"
         );