in reply to Moops: meta not available in role
I have not really used Moops; however, it appears that Moops uses Moo by default. The Moops documentation states Moops uses Moo to build classes and roles by default, but allows you to use Moose if you desire. (And Mouse experimentally.).
According to the INCOMPATIBILITIES_WITH_MOOSE section of the Moo documentation, Moo does not have a meta object.
So in order to get the meta object you need to tell Moops to use Moose. See the Roles section of the Moops documentation.
Adding using Moose to your code fixes the issue.
use v5.14.4; use warnings; use autodie qw< :all >; use Moops; role Foo using Moose { use Data::Printer; p __PACKAGE__->meta; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Moops: meta not available in role
by Oberon (Monk) on Jul 28, 2015 at 23:18 UTC | |
by 1nickt (Canon) on Jul 29, 2015 at 04:32 UTC | |
by Anonymous Monk on Jul 29, 2015 at 07:17 UTC |