Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've always disliked having 1; at the bottom of my
modules so that the last statement returns true. I find it very easy
to miss and accidently remove, nor does it fit with my preferred
style of coding.
I'd like to know if it is acceptable to use return(1);
in its place. It seems to work just fine, but would like to know
if there are any differences or pitfalls in doing it this way.
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is it okay to return(1) instead?
by Zaxo (Archbishop) on Nov 20, 2001 at 04:04 UTC | |
by dws (Chancellor) on Nov 20, 2001 at 07:36 UTC | |
by Anonymous Monk on Nov 20, 2001 at 04:13 UTC | |
|
Re: Is it okay to return(1) instead?
by no_slogan (Deacon) on Nov 20, 2001 at 05:14 UTC | |
|
Returning happiness
by petdance (Parson) on Nov 20, 2001 at 10:21 UTC | |
by ChemBoy (Priest) on Nov 20, 2001 at 20:21 UTC | |
by boo_radley (Parson) on Nov 20, 2001 at 20:29 UTC | |
|
Re: Is it okay to return(1) instead?
by chromatic (Archbishop) on Nov 21, 2001 at 10:47 UTC | |
|
Re: Is it okay to return(1) instead?
by graq (Curate) on Nov 20, 2001 at 14:58 UTC |