new match and match captutres for http methods, plus tests, docs
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Controller.pm
index 445d4af..cc2da5e 100644 (file)
@@ -275,7 +275,7 @@ sub register_action_methods {
         my $attributes = $method->can('attributes') ? $method->attributes : [];
         my $attrs = $self->_parse_attrs( $c, $name, @{ $attributes } );
         if ( $attrs->{Private} && ( keys %$attrs > 1 ) ) {
-            $c->log->debug( 'Bad action definition "'
+            $c->log->warn( 'Bad action definition "'
                   . join( ' ', @{ $attributes } )
                   . qq/" for "$class->$name"/ )
               if $c->debug;
@@ -545,6 +545,13 @@ sub _parse_Does_attr {
     return Does => $self->_expand_role_shortname($value);
 }
 
+sub _parse_GET_attr { Method => 'GET' }
+sub _parse_POST_attr { Method => 'POST' }
+sub _parse_PUT_attr { Method => 'PUT' }
+sub _parse_DELETE_attr { Method => 'DELETE' }
+sub _parse_OPTION_attr { Method => 'OPTION' }
+sub _parse_HEAD_attr { Method => 'HEAD' }
+
 sub _expand_role_shortname {
     my ($self, @shortnames) = @_;
     my $app = $self->_application;