why not just add to the maddness if its already there?
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Chained.pm
index 504c717..33e23d2 100644 (file)
@@ -298,7 +298,7 @@ sub _check_args_attr {
     my $args = $action->attributes->{$name}->[0];
     if (defined($args) and not (
         Scalar::Util::looks_like_number($args) and
-        int($args) == $args
+        int($args) == $args and $args >= 0
     )) {
         require Data::Dumper;
         local $Data::Dumper::Terse = 1;
@@ -361,7 +361,8 @@ sub register {
 
     if (exists $action->attributes->{Args} and exists $action->attributes->{CaptureArgs}) {
         Catalyst::Exception->throw(
-          "Combining Args and CaptureArgs not allowed registering " . $action->reverse()
+          "Combining Args and CaptureArgs attributes not supported registering " .
+          $action->reverse()
         );
     }