in reply to Re: Preffered Error notification?
in thread Preferred Error notification?

I'd say that this is precisely the situation that Carp is designed for--use carp or croak rather than warn and die, and they'll know which invocation of the function they messed up, which is generally fairly useful information.

Alternatively, set $@, return undef, and let the caller figure out the problem. :-)



If God had meant us to fly, he would *never* have given us the railroads.
    --Michael Flanders

Replies are listed 'Best First'.
Re: Re: Re: Preffered Error notification?
by chromatic (Archbishop) on Aug 06, 2002 at 01:26 UTC

    I rarely return undef explicitly, as it tends to do the wrong thing in list context. return by itself is shorter and smarter.