use Scalar::Util 'blessed';
use Carp 'confess';
use Sub::Name 'subname';
+use Devel::GlobalDestruction 'in_global_destruction';
our $VERSION = '0.76';
$VERSION = eval $VERSION;
sub DESTROY {
my $self = shift;
- return if Class::MOP::in_global_destruction(); # it'll happen soon anyway and this just makes things more complicated
+ return if in_global_destruction(); # it'll happen soon anyway and this just makes things more complicated
no warnings 'uninitialized';
return unless $self->name =~ /^$ANON_ROLE_PREFIX/;
use warnings;
use Scalar::Util;
+use Devel::GlobalDestruction qw(in_global_destruction);
use if ( not our $__mx_is_compiled ), 'Moose::Meta::Class';
use if ( not our $__mx_is_compiled ), metaclass => 'Moose::Meta::Class';
# localize the $@ ...
local $@;
# run DEMOLISHALL ourselves, ...
- $_[0]->DEMOLISHALL(Class::MOP::in_global_destruction);
+ $_[0]->DEMOLISHALL(in_global_destruction);
# and return ...
return;
}
# otherwise it is normal destruction
- $_[0]->DEMOLISHALL(Class::MOP::in_global_destruction);
+ $_[0]->DEMOLISHALL(in_global_destruction);
}
# support for UNIVERSAL::DOES ...