in reply to Re^5: Splitting array into two with a regex
in thread Splitting array into two with a regex

I use that structure in Tree so that the basic methods (add_child(), for instance) can modify the children attribute without knowing how the children attribute is set up. All that matters is that children() returns an arrayref that guarantees it will be modifying the children (however the subclass set them up). So, there's a lot of splice @{$self->children}, $idx, 0, $new_node; stuff going on.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?