X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController.pm;h=3db8f3635e703508510a086574f9f7ec425b9cdc;hb=cbe627b901f8e459035a76d423229694e1fefbff;hp=820eaed14673bb7d03e3e3e56dd6d410a6633578;hpb=75ce30d0f208d49ead0134ab45fc2f45f72d6023;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 820eaed..3db8f36 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -898,6 +898,15 @@ declared attributes you must quote them: sub my_moose_type :Local Args('Int') { ... } +If you use 'reference' type constraints (such as ArrayRef[Int]) that have an unknown +number of allowed matches, we set this the same way "Args" is. Please keep in mind +that actions with an undetermined number of args match at lower precidence than those +with a fixed number. You may use reference types such as Tuple from L +that allows you to fix the number of allowed args. For example Args(Tuple[Int,Int]) +would be determined to be two args (or really the same as Args(Int,Int).) You may +find this useful for creating custom subtypes with complex matching rules that you +wish to reuse over many actions. + See L for more. =head2 Consumes('...')