Matt Sisk wrote:
>
> Hey, I just had a thought...with the new "weak" references in perl 5.6,
> it should be possible to make the _parent reference in HTML::Element
> nodes weak, right? So your element trees will be garbage collected once
> they go out of scope. No delete() necessary.
Yes, I've been thinking about that for a while, since Randal Schwartz
first suggested it to me.
I'm waiting on it for a while, tho, because:
1) not everyone has 5.6 yet. For many, it will be a long time coming.
2) it subtly changes the behaviour of trees -- currently, you can pass
a tree around just by passing around a reference to any of its nodes.
With a switch to weak references, you're guaranteed only that node and
its subtree. I'd want /ample/ time to warn everyone, in the docs,
well ahead of time, before making this change.
--
Sean M. Burke [EMAIL PROTECTED] http://www.netadventure.net/~sburke/