On Mar 26, 9:51 pm, [EMAIL PROTECTED] (Thomas Pfau) wrote: > I could use some advice on how to handle error returns. > > The translate routine wants to return a hash reference containing > information about the logical. If the logical isn't defined or some > other error returns, I'm setting it up to return a scalar containing the > status code. Does this sound usable? Should it return undef on error > and provide another routine to get the status code?
That does not sound reasonable to me. If something does not work, I expect UNDEF or FALSE. Preferably UNDEF. If it does, then I expect a TRUE return. Something useful prefered. IMHO It should preferably behave much like OPEN. Can you stick the real error/return code behind $! ? Something like the $lnm->error you show in teh example should work also. fwiw, Hein.