in reply to exit this way
Ask for their rationale for this. There's no need for an explicit exit unless you literally need to explicitly exit prior to the end of your code.
For instance:
my $x = $y; # short circuit exit if $x == 1; # do other stuff ...
Besides, if you have all of your subs underneath of your code that calls them, that may confuse future maintainers as to why there is a random exit; in the middle of the code. Also, if someone goes and adds more code later after the sub definitions and doesn't see the random exit somewhere above, they'll be scratching their head as to why their code is failing to execute. It's better (imho) to ensure all of the code runs properly unless there's a good reason to exit early.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: exit this way
by ExReg (Priest) on Aug 31, 2015 at 21:58 UTC | |
by Your Mother (Archbishop) on Aug 31, 2015 at 22:14 UTC | |
by stevieb (Canon) on Aug 31, 2015 at 22:41 UTC | |
by Your Mother (Archbishop) on Aug 31, 2015 at 23:15 UTC | |
by tye (Sage) on Sep 01, 2015 at 01:00 UTC |