The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catalyst::ActionRole::MatchRequestMethod - Dispatch actions based on HTTP request methods

SYNOPSIS

    package MyApp::Controller::Foo;

    use Moose;
    use namespace::autoclean;

    BEGIN {
        extends 'Catalyst::Controller::ActionRole';
    }

    __PACKAGE__->config(
        action_roles => ['MatchRequestMethod'],
    );

    sub get_foo    : Path Method('GET')                { ... }
    sub update_foo : Path Method('POST')               { ... }
    sub create_foo : Path Method('PUT')                { ... }
    sub delete_foo : Path Method('DELETE')             { ... }
    sub foo        : Path Method('GET') Method('POST') { ... }

DESCRIPTION

This module allows you to write Catalyst actions which only match certain HTTP request methods. Actions which would normally be dispatched to will not match if the request method is incorrect, allowing less specific actions to match the path instead.

SEE ALSO

Catalyst::Controller::ActionRole

Catalyst::Action::REST

inspired by: http://dev.catalystframework.org/wiki/gettingstarted/howtos/HTTP_method_matching_for_actions

AUTHOR

  Florian Ragwitz <rafl@debian.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Florian Ragwitz.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.