in reply to Re: Object reference disappearing during global destruction
in thread Object reference disappearing during global destruction
changing it to the following fixes the havoc:return join '', map { $_->{type} eq 'static' ? $_->{body} : $self->execute($_) } @{$self->{BODY}};
my @bodies = @{$self->{BODY}}; return join '', map { $_->{type} eq 'static' ? $_->{body} : $self->execute($_) } @bodies;
dereferencing and iterating over the deref'ed data with maps do untowardly things to item refcounts and the gc reaps its victims when it pleases.
execute is just a nice wrapper for an eval. it touches nothing inappropriately.
hope this helps a fellow weary soul.
|
|---|