From: Matt S Trout Date: Thu, 12 Apr 2012 21:27:16 +0000 (+0000) Subject: don't accidentally load Moo::HandleMoose during global destruction X-Git-Tag: v0.009_016~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoo.git;a=commitdiff_plain;h=dbae620d5fb9c4d860011991df13c5a89387e7cc don't accidentally load Moo::HandleMoose during global destruction --- diff --git a/Changes b/Changes index 5835f9a..be59aed 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ + - don't accidentally load Moo::HandleMoose during global destruction - better docs for trigger (and initializer's absence) 0.009_015 - 2012-04-11 diff --git a/lib/Moo/sification.pm b/lib/Moo/sification.pm index 6ad0f27..6f42dfa 100644 --- a/lib/Moo/sification.pm +++ b/lib/Moo/sification.pm @@ -2,9 +2,13 @@ package Moo::sification; use strictures 1; +END { our $sky_falling = 1 } + sub Moo::HandleMoose::AuthorityHack::DESTROY { - require Moo::HandleMoose; - Moo::HandleMoose->import; + unless (our $sky_falling) { + require Moo::HandleMoose; + Moo::HandleMoose->import; + } } if ($INC{"Moose.pm"}) {