in reply to Re: Trivial CPAN module?
in thread Trivial CPAN module?

Yeah thanks, I didn't know about FromCGI. Just glancing at it it seems to do many of the same things.

I'm courious though, I'm not sure I follow you when you say

"why are you changing exceptions into return codes that have to be checked"

If I do understand, its because I don't want it to die, and I want to collect all of the possible errors and there causes. Dosen't FromCGI do the same?

Replies are listed 'Best First'.
Re^3: Trivial CPAN module?
by perrin (Chancellor) on Dec 12, 2005 at 04:10 UTC
    The idea with exceptions is that you catch them only if you want to handle them and continue in some way. Usually this means it's your client code that would be catching them, not a base class, although it's possible that doing this in a base class could make sense in certain situations.

    Converting them to error codes is a red flag because error codes have problems that exceptions were supposed to address -- namely that if you forget to check one, your program will continue as if everything is okay.