CC: | rjbs [...] icgroup.com, mjd [...] icgroup.com |
Subject: | Moose::Exporter's importer destroys role generator |
Date: | Thu, 24 Mar 2011 15:45:39 -0400 |
To: | bug-moose [...] rt.cpan.org |
From: | Mark Jason Dominus <mjd [...] plover.com> |
This fails with the following version combinations:
MooseX::Role::Parameterized Moose
0.23 1.21
0.25 1.21
0.25 1.24
The working version should *not* die with "Where did my role generator go??"/
================================================================
package DummyRole;
use Moose::Role;
package Bar;
use Moose ();
use Moose::Exporter;
Moose::Exporter->setup_import_methods(
role_metaroles => { role => [ 'DummyRole' ] },
);
package Foo;
use MooseX::Role::Parameterized;
parameter 'message';
role {
my ($p) = @_;
warn "My role generator is now ", Foo->meta->{role_generator}, "\n";
Bar->import();
unless (exists Foo->meta->{role_generator}) {
warn "Where did my role generator go??\n";
exit 1;
}
};
package main;
use Moose;
with Foo => { };