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
In reply to Re: Use of "die" in OO modules
by jettero
in thread Use of "die" in OO modules
by theguvnor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |