Tenative switch to a generated DEMOLISHALL - see rest of message for caveats
authorMatt S Trout <mst@shadowcat.co.uk>
Thu, 25 Aug 2011 23:44:42 +0000 (23:44 +0000)
committerMatt S Trout <mst@shadowcat.co.uk>
Mon, 3 Oct 2011 05:31:09 +0000 (05:31 +0000)
commit56ffe19d51215674fb162c30ba9c5dc1951402c5
treede498522027f30e9e6b7563f13ec4dfee77f0626
parentc2cc003f41aa57bf01dcde5b6cab28abb064b2bf
Tenative switch to a generated DEMOLISHALL - see rest of message for caveats

I'm wondering if the reason that ajgb didn't do it this way is that it has
bad interactions with global destruction on some perls; it did, however, work
fine in the t/ cases. Rather than use the ugly "let's figure this out every
time" code that he wrote (which did, admittedly, work) I think that if the
generation doesn't work across perls then our best path forwards is to try
and accelerate DEMOLISHALL construction - perhaps even lifting it to new()
time so that classes without a DEMOLISH method don't get a DESTROY added (I
hate having to always have a DESTROY method).

But first, I want to see if this breaks so that I know how to test that
lifting to new() time fixes it.
lib/Method/Generate/DemolishAll.pm [new file with mode: 0644]
lib/Moo/Object.pm