in reply to
Re: (jeffa) 2Re: (Ovid - Why I love nested If-Else blocks)
in thread Why I Hate Nested If-Else blocks
I might do something like this:
my $func = ($foo > 7) ?
$bar && \&bar_mysub
|| $baz && \&baz_mysub
: $bar && \&bar_other_mysub
|| $baz && \&baz_other_mysub;
$func->($foo) if $func;
Don't align things vertically for the sake of aligning them, align them so that they're readable!
The fragment above borders on obfuscation. There's a mind-numbing repetitive pattern on the right, and this
thing on the left. Yuch. I had to stop and really look at that fragment to get past the visual clutter.