in reply to Re^2: Use of "die" in OO modules
in thread Use of "die" in OO modules

Uh, undef is a return code. I don't think that's any better than saying "79" indicates a failure.

Replies are listed 'Best First'.
Re^4: Use of "die" in OO modules
by theguvnor (Chaplain) on Jan 19, 2007 at 00:51 UTC

    I said:

    a return code to signify what failed;

    (emphasis added).

    I fully realise that undef is a return code. It does not, however, carry information about what failed and why. The lack of defined return code is my signal to go off and look at my object/class and get the error.

    That works for me (and as bryan notes above, is somewhat common in CPAN modules).

    Your mileage might vary, as they say ;-)

    [Jon]

Re^4: Use of "die" in OO modules
by jrockway (Acolyte) on Jan 18, 2007 at 23:32 UTC
    mmm, 69 == success.