++ed by:
DOY SKAUFMAN JETEVE KEEDI WKI

13 PAUSE users
11 non-PAUSE users.

Jesse Luehrs
and 9 contributors

NAME

OX::Application::Role::Router::Path::Router - implementation of OX::Application::Role::Router which uses Path::Router

VERSION

version 0.14

SYNOPSIS

  package MyApp;
  use Moose;
  extends 'OX::Application';
  with 'OX::Application::Role::Router::Path::Router';

  sub configure_router {
      my ($self, $router) = @_;

      $router->add_route('/',
          target => sub { "Hello world" }
      );
  }

DESCRIPTION

This role uses Path::Router to provide a router for your application. It uses OX::Application::Role::Router, and overrides router_class to be Path::Router and app_from_router to create an app using Plack::App::Path::Router::Custom. It also uses OX::Application::Role::Request to allow the application code to use OX::Request instead of bare environment hashrefs.

See OX::Application::Role::RouterConfig for a more convenient way to implement configure_router.

AUTHORS

  • Stevan Little <stevan.little@iinteractive.com>

  • Jesse Luehrs <doy@tozt.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Infinity Interactive.

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