in reply to Rules of Proper Perl Style
Hidden behavoir like non-obvious return values can eat you alive. I try and avoid subs that both modify a parameter handed to them and return a real value. I try to use return $blah; so that people don't add a print at the end of my sub and suddenly it ALWAYS returns a "1". =)
--
$you = new YOU;
honk() if $you->love(perl)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Rules of Proper Perl Style
by McD (Chaplain) on Feb 13, 2001 at 03:32 UTC | |
by dws (Chancellor) on Feb 13, 2001 at 04:00 UTC | |
by Anonymous Monk on Feb 13, 2001 at 04:28 UTC | |
by tilly (Archbishop) on Feb 13, 2001 at 09:55 UTC | |
by petral (Curate) on Feb 15, 2001 at 07:45 UTC |