in reply to Trivial CPAN module?

Have you seen Class::DBI::FromCGI? This seems to have some overlap. Also, why are you changing exceptions into return codes that have to be checked? Exceptions are generally considered to be a better way to do things.

Replies are listed 'Best First'.
Re^2: Trivial CPAN module?
by Anonymous Monk on Dec 11, 2005 at 22:11 UTC
    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?

      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.