ensure DemolishAll is loaded before global destruction for inflated classes
authorGraham Knop <haarg@haarg.org>
Sun, 4 Aug 2013 14:22:30 +0000 (10:22 -0400)
committerGraham Knop <haarg@haarg.org>
Tue, 27 Aug 2013 07:51:19 +0000 (03:51 -0400)
commit4de2328ff1cafef7b1446d472ae65f87e59d1040
treed1bb05453ec1b6083356cb31b888e3f5ccb122cf
parentc944f84cc09cd1f9e644e8a08e62c27412dbe892
ensure DemolishAll is loaded before global destruction for inflated classes

Classes that use a combination of Moo and Moose can end up using Moose's
constructor, but still inheriting from Moo::Object.  This means means
Moo::Object's DEMOLISHALL will still be used, but DemolishAll.pm may not
be loaded until the object is destroyed.  If this occurs in global
destruction, a number of things don't work properly, including base.pm.

Avoid this by ensuring DemolishAll is loaded on inflation of Moo
classes.
lib/Moo/HandleMoose.pm