Commit | Line | Data |
a0e27d2e |
1 | use strict; |
2 | use warnings; |
3 | BEGIN { |
4 | package My::Meta::Trait; |
5 | use Moose::Role; |
6 | |
7 | our $FAILED = 0; |
8 | |
9 | before 'make_immutable' => sub { |
10 | my ($meta) = @_; |
11 | # $meta->name->meta should have the correct methods on it.. |
12 | $FAILED++ unless $meta->name->meta->get_method('some_method'); |
13 | }; |
14 | } |
15 | { |
16 | package TestClass; |
17 | use Moose -traits => 'My::Meta::Trait'; |
18 | |
19 | sub some_method {} |
20 | |
21 | __PACKAGE__->meta->make_immutable; |
22 | } |
23 | |
24 | use Test::More tests => 1; |
25 | TODO: { |
26 | local $TODO = 'This broke as of 07302fb'; |
27 | is $My::Meta::Trait::FAILED, 0, 'Can find method'; |
28 | } |
29 | |