in reply to How to return errors from my object oriented subroutine

Nit: if (exists $self->{email}{$email}) ... checking for truth creates the entry in the hash.

Personally, I like throwing errors using die. That way, error propagation is done automatically by the interpreter instead of being handled explicitly.

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.