in reply to Re^2: Error handling in chained method calls
in thread Error handling in chained method calls

Thanx for this clarification of a use case. :)

IMHO again this could be solved with a coderef wrapper $c_parent which calls the real method only on definedness of the object.

 $node->$c_parent->$c_parent

Another (classical) approach would be defining a NULL-node object which is returned instead of undef and wouldn't cause an error.

But the latter would only work if one has access to the design of underlying library.

Cheers Rolf