Commit | Line | Data |
69b39671 |
1 | use strictures 1; |
2 | use Test::More; |
3 | |
4 | ok eval q{ |
5 | package Spoon; |
6 | use Moo; |
7 | |
8 | has foo => ( is => 'ro' ); |
9 | |
10 | no Moo; |
11 | |
12 | use Moo; |
13 | |
14 | has foo2 => ( is => 'ro' ); |
15 | |
16 | no Moo; |
17 | |
18 | 1; |
19 | }, "subs imported on 'use Moo;' after 'no Moo;'" |
20 | or diag $@; |
21 | |
22 | ok eval q{ |
23 | package Roller; |
24 | use Moo; |
25 | |
26 | has foo => ( is => 'ro' ); |
27 | |
28 | no Moo; |
29 | |
30 | use Moo; |
31 | |
32 | has foo2 => ( is => 'ro' ); |
33 | |
34 | no Moo; |
35 | |
36 | 1; |
37 | }, "subs imported on 'use Moo::Role;' after 'no Moo::Role;'" |
38 | or diag $@; |
39 | |
40 | done_testing; |