Last active
May 6, 2016 14:51
-
-
Save mephinet/3bf3f56da3484797110c6fcd3f42e2e0 to your computer and use it in GitHub Desktop.
Ox issue with Path::Router 0.15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl | |
package My::Types; | |
use me::inlined; | |
use Moose::Util::TypeConstraints; | |
use namespace::autoclean; | |
enum 'Customer', [qw(ACME Foo)]; | |
package Web; | |
use Plack::Runner; | |
use OX; | |
use Moose; | |
use My::Types; | |
router as { | |
route | |
'/details/:customer' => 'some_controller.method', | |
( customer => { isa => 'Customer' } ); | |
}; | |
__PACKAGE__->meta->make_immutable; | |
package main; | |
use Test::More; | |
use Test::Path::Router; | |
use warnings; | |
use strict; | |
my $web = Web->new(); | |
my $router = $web->router; | |
path_ok( $router, '/details/ACME' ); | |
done_testing; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment