http://www.perlmonks.org?node_id=595315


in reply to Use of "die" in OO modules

I tend to use various methods from Carp when I'm building OO things. I can die places my module is broken and croak places where the caller did it wrong. There are a lot of choices in Carp, but I think croak is probably what you need.

I figure the caller can always eval { $object->something } if they need to.

UPDATE: The more I think about it though, I really only die (croak) when arguments passed differ unusuably from the documentation.

-Paul