MATSUNO★Tokuhiro > HTTPx-Dispatcher > HTTPx::Dispatcher

Download:
HTTPx-Dispatcher-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.05   Source  

NAME ^

HTTPx::Dispatcher - the uri dispatcher

SYNOPSIS ^

    package Your::Dispatcher;
    use HTTPx::Dispatcher;

    connect ':controller/:action/:id';

    package Your::Handler;
    use HTTP::Engine;
    use Your::Dispatcher;
    use UNIVERSAL::require;

    HTTP::Engine->new(
        'config.yaml',
        handle_request => sub {
            my $c = shift;
            my $rule = Your::Dispatcher->match($c->req->uri);
            $rule->{controller}->use or die 'hoge';
            my $action = $rule->{action};
            $rule->{controller}->$action( $c->req );
        }
    );

DESCRIPTION ^

HTTPx::Dispatcher is URI Dispatcher.

AUTHOR ^

Tokuhiro Matsuno <tokuhirom@gmail.com>

THANKS TO ^

lestrrat

SEE ALSO ^

HTTP::Engine, Routes

LICENSE ^

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