Chained: test and err handling for absolute path parts; test for recursive chains
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Chained.pm
index b236aa4..1d7783b 100644 (file)
@@ -202,6 +202,12 @@ sub register {
         );
     }
 
+    if ($part =~ m(^/)) {
+        Catalyst::Exception->throw(
+          "Absolute parameters to PathPart not allowed registering ${action}"
+        );
+    }
+
     $action->attributes->{PartPath} = [ $part ];
 
     unshift(@{ $children->{$part} ||= [] }, $action);