use Node; my ( $child, $parent ) = ( new Node, new Node ); $child->parent($parent);