On Aug 9, 2010, at 8:21 AM, Cosimo Streppone wrote: >> package Foo; >> sub DESTROY { exit; } >> my $foo = bless {}, 'Foo'; > > I couldn't try this yet, but, I don't think this > would segfault. > > What I *guess* happens is that the 'exit' will cause > the script to immediately exit, skipping the nasty > part that would otherwise segfault.
Which nasty part? >> Oops. Try "unless" to "if" in this bit, please: >> >> fail 'Child should be inactive on DESTROY' >> if $self->FETCH('Active'); > > Will try and let you know. Thanks! David