Skip to content

Instantly share code, notes, and snippets.

@mephinet
Last active May 6, 2016 14:51
Show Gist options
  • Save mephinet/3bf3f56da3484797110c6fcd3f42e2e0 to your computer and use it in GitHub Desktop.
Save mephinet/3bf3f56da3484797110c6fcd3f42e2e0 to your computer and use it in GitHub Desktop.
Ox issue with Path::Router 0.15
#! /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