use strictures 1;
use Module::Runtime qw(require_module);
+use Devel::GlobalDestruction;
use base qw(Exporter);
use Moo::_mro;
can_haz_subname ? Sub::Name::subname(@_) : $_[1];
}
-our $_in_global_destruction = 0;
-END { $_in_global_destruction = 1 }
-
sub STANDARD_DESTROY {
my $self = shift;
local $?;
local $@;
eval {
- $self->DEMOLISHALL($_in_global_destruction);
+ $self->DEMOLISHALL(in_global_destruction);
};
$@;
};