Hi all. I'm working on the code for trees that I keep talking about,
and I have code that somewhat resembles the following:
role Tree::Node does Array {
has Tree::Node @!children handles <Array List Container>;
}
The intent of this code is that, if you treat the Tree::Node as an
array, you're operating on its children. I'm sure there are obvious bugs in
that code that I'd be happy to hear about, but my question at the moment is, I
want to be able to intercept calls that put things into the array and pull
them out, and perform code at that time. For example, I'd like it if
$node = Tree::Node->new();
$othernode = Tree::Node->new();
$node[0] = $othernode;
...would allow me to operate on $othernode, so that I could ensure
that they belong to the same tree, for example. Is there a way I can do that?
Thanks,
---------------------------------------------------------------------
| Name: Tim Nelson | Because the Creator is, |
| E-mail: [EMAIL PROTECTED] | I am |
---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V-
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----