don't accidentally load Moo::HandleMoose during global destruction
[gitmo/Moo.git] / lib / Moo / sification.pm
1 package Moo::sification;
2
3 use strictures 1;
4
5 END { our $sky_falling = 1 }
6
7 sub Moo::HandleMoose::AuthorityHack::DESTROY {
8   unless (our $sky_falling) {
9     require Moo::HandleMoose;
10     Moo::HandleMoose->import;
11   }
12 }
13
14 if ($INC{"Moose.pm"}) {
15   require Moo::HandleMoose;
16   Moo::HandleMoose->import;
17 } else {
18   $Moose::AUTHORITY = bless({}, 'Moo::HandleMoose::AuthorityHack');
19 }
20
21 1;