my $did_init_meta;
for my $c ( grep { $_->can('init_meta') } $class, @{$exports_from} ) {
+ # init_meta can apply a role, which when loaded uses
+ # Moose::Exporter, which in turn sets $CALLER, so we need
+ # to protect against that.
local $CALLER = $CALLER;
$c->init_meta( for_class => $CALLER );
$did_init_meta = 1;