allow inlining if the type has been subsequently defined
[gitmo/MooseX-Types.git] / t / 19_typelib_with_role.t
CommitLineData
bca16b0d 1#!/usr/bin/env perl
2use strict;
3use warnings;
4
a344ca96 5use Test::More;
bca16b0d 6
7{
8 package MyRole;
9 use Moose::Role;
10 requires 'foo';
11}
12
13eval q{
14
15 package MyClass;
16 use Moose;
17 use MooseX::Types -declare => ['Foo'];
18 use MooseX::Types::Moose 'Int';
19 with 'MyRole';
20
21 subtype Foo, as Int;
22
23 sub foo {}
24};
25
26ok !$@, 'type export not picked up as a method on role application';
a344ca96 27
28done_testing();