Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • The key is that having the else outdented shows that it's a point of the flow of control. It all the more important if you get into elsifs.

    But the code following the condition is indented so I don't see what uncuddling would gain you when it comes to visual clarity. Furthermore, by cuddling them it becomes obvious that the various if/elseif/.../else cases are really part of one bigger statement where only one of the indented code-blocks is ever executed.

    Finally, the lines you save by cuddling could make a function just fit on the screen which is a good thing as it respects the principle of locality (i.e. everything about a function can be seen without the need for scrolling).