I'm having difficulty getting some Moose::Util::MetaRole arguments passed from Moose::Exporter (specifically, I want to apply a role to a metaclass directly from an existing Moose::Exporter call). Since from the documentation this appears to be a simple task, I must have missed something, so I'm going back to trying to get a simple example to work, i.e. re-implementing MooseX::Aliases trait.
What is missing from this simple example? package MyApp::Foo; use MyApp::Export; has field => ( alias => 'alias', is => 'ro', isa => 'Int' ); 1; package MyApp::Export; use Moose (); use Moose::Exporter; also => [ qw(Moose) ], # pass some arguments for Moose::Util::MetaRole to be called in # init_meta... class_metaroles => { attribute => ['MooseX::Aliases::Meta::Trait::Attribute'], # in theory, I should just have to say this to add a role to my metaclass? # class => [ 'MyApp::Meta::Class::Trait::MyTrait' ], }, ); no Moose; 1; many thanks, -- Vote Cthulhu: "For when you're tired of the lesser evil" . . . . . Karen Etheridge, ka...@etheridge.ca GCS C+++$ USL+++$ P+++$ w--- M++ http://etheridge.ca/ PS++ PE-- b++ DI++++ e++ h(-)