in reply to looking for a good idiom: return this if this is true
return thatroutine() || do { # the rest of the sub ... };
This won't work if, for example, the return statement is to be used in the middle of a loop, or some other control flow block.
update: I just noticed somebody on use.perl.org thought of the same solution.
|
|---|