Jesse Luehrs > OX > OX::Application::Role::Router::Path::Router

Download:
OX-0.14.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.14   Source  

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 ^

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.

syntax highlighting: