make it less easy to want moose stringy types
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Controller.pm
index c94f22e..820eaed 100644 (file)
@@ -374,6 +374,9 @@ sub gather_default_action_roles {
 
   push @roles, 'Catalyst::ActionRole::Scheme'
     if $args{attributes}->{Scheme};
+
+  push @roles, 'Catalyst::ActionRole::QueryMatching'
+    if $args{attributes}->{Query};
     return @roles;
 }
 
@@ -550,6 +553,7 @@ sub _parse_PUT_attr     { Method => 'PUT'     }
 sub _parse_DELETE_attr  { Method => 'DELETE'  }
 sub _parse_OPTIONS_attr { Method => 'OPTIONS' }
 sub _parse_HEAD_attr    { Method => 'HEAD'    }
+sub _parse_PATCH_attr  { Method => 'PATCH'  }
 
 sub _expand_role_shortname {
     my ($self, @shortnames) = @_;
@@ -888,6 +892,12 @@ them into the controller namespace:
       my ($self, $c, $int) = @_;
     }
 
+If you choose not to use imported type constraints (like L<Type::Tiny>, or <MooseX::Types>
+you may use L<Moose> 'stringy' types however just like when you use these types in your
+declared attributes you must quote them:
+
+    sub my_moose_type :Local Args('Int') { ... }
+
 See L<Catalyst::RouteMatching> for more.
 
 =head2 Consumes('...')