I have run some tests. In the end, I have a die() in one of my Moose object's attribute builder function. As I trace the destruct sequence, it appears that ALL of my objects are being destroyed twice. I think I will pull the die() in favor of a return undef and force the caller to check validity. die() in a constructor is probably bad news. But does anyone have any idea about running two destroy sequences?
On 2/23/09, Stevan Little <stevan.lit...@iinteractive.com> wrote: > Thomas, > > Matthew forwarded your mail, here is what I responded to him with: > > Try updating Moose, I think this might have been fixed recently. > > Perl's destruction order is essentially random, which can complicate > things a lot. If you can provide a stack trace we might be able to > provide some more insight. > > - Stevan > > On Feb 20, 2009, at 12:50 PM, Thomas, Terry L wrote: > >> Sorry for the possibly empty prior email with this subject. Limited >> connectivity here. >> >> I am working with Moose v0.65 and I am getting messages in my logs >> that >> look like: >> >> DESTROY created new reference to dead object Foo::Bar during global >> destruction. >> >> In broad terms, what am I looking for? Badly defined DEMOLISH >> sequences? >> Missing or present explicit destroys? >> >> Any help would be appreciated. Sorry about the terseness - limited >> connectivity at this time. >> >> Thanks > > -- Sent from my mobile device Matthew O. Persico