Commit | Line | Data |
---|---|---|
8b9641b8 | 1 | package NoInlineAttribute; |
2 | ||
3 | use Moose::Meta::Class; | |
4 | use Moose::Role; | |
5 | ||
6 | around accessor_metaclass => sub { | |
7 | my $orig = shift; | |
8 | my $self = shift; | |
9 | ||
10 | my $class = $self->$orig(); | |
11 | ||
12 | return Moose::Meta::Class->create_anon_class( | |
13 | superclasses => [$class], | |
14 | roles => ['NoInlineAccessor'], | |
15 | cache => 1, | |
16 | )->name; | |
17 | }; | |
18 | ||
19 | no Moose::Role; | |
20 | ||
21 | { | |
22 | package NoInlineAccessor; | |
23 | ||
24 | use Moose::Role; | |
25 | ||
26 | sub is_inline { 0 } | |
27 | } | |
28 | ||
29 | 1; |