summaryrefslogtreecommitdiff
path: root/t/lib/NoInlineAttribute.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/lib/NoInlineAttribute.pm')
-rw-r--r--t/lib/NoInlineAttribute.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/lib/NoInlineAttribute.pm b/t/lib/NoInlineAttribute.pm
new file mode 100644
index 0000000..af182dc
--- /dev/null
+++ b/t/lib/NoInlineAttribute.pm
@@ -0,0 +1,29 @@
+package NoInlineAttribute;
+
+use Moose::Meta::Class;
+use Moose::Role;
+
+around accessor_metaclass => sub {
+ my $orig = shift;
+ my $self = shift;
+
+ my $class = $self->$orig();
+
+ return Moose::Meta::Class->create_anon_class(
+ superclasses => [$class],
+ roles => ['NoInlineAccessor'],
+ cache => 1,
+ )->name;
+};
+
+no Moose::Role;
+
+{
+ package NoInlineAccessor;
+
+ use Moose::Role;
+
+ sub is_inline { 0 }
+}
+
+1;