in reply to Re: OO: sharing data across inheritance
in thread OO: sharing data across inheritance

Wow, thanks for the lightning fast and enlightening response. This looks like what I was thinking about, but I have one more question.

Is it necessary to store the children in the parent, like what you do in the Parent package:

# save this child inside the parent object push @{ $self->{_children} }, $child;
Or is it enough to pass the child a reference to the %opts?

And thanks!

s-t

Replies are listed 'Best First'.
Re^3: OO: sharing data across inheritance
by saskaqueer (Friar) on Jun 03, 2004 at 05:08 UTC

    No, you do not need to save the children within the parent. I only did that as an example. If your project doesn't require that the parent keep track of the children it creates, then you can safely remove that section.