in reply to Re: A question about method return values and error checking
in thread A question about method return values and error checking
Because of the context issues you mentioned, I'd use a blank return; instead of return undef;
I hate you! Functions that are expected to return a scalar should not suddenly returning nothing. It rarely has any advantage, and it fails very poorly in common situations.
f( name => get_name(), foo => 1 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A question about method return values and error checking
by LanX (Saint) on Nov 09, 2015 at 17:01 UTC | |
by tye (Sage) on Nov 09, 2015 at 18:09 UTC | |
by LanX (Saint) on Nov 09, 2015 at 18:52 UTC |