The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more
|
no warnings 'once' ;
BEGIN { our @CARP_NOT = qw(Moo::HandleMoose) }
sub unimport {
croak "Can't disable Moo::sification after inflation has been done"
if $Moo::HandleMoose::SETUP_DONE ;
our $disabled = 1;
}
sub Moo::HandleMoose::AuthorityHack::DESTROY {
unless ( our $disabled or _in_global_destruction) {
Moo::HandleMoose-> import ;
}
}
sub import {
return
if our $setup_done ;
if ( $INC { "Moose.pm" }) {
Moo::HandleMoose-> import ;
} else {
$Moose::AUTHORITY = bless ({}, 'Moo::HandleMoose::AuthorityHack' );
}
$setup_done = 1;
}
1;
|