Philippe M. Chiasson wrote:
[...]
Yes! That's also another _very_ good reason to type comparaisons with the
constant
on the left side. I always try to write it in that order, and by now, my brain
is fully adjusted to it.
if ("Inherit" eq $var) {
elsif ("Enable" eq $var) {
elsif ("Disable" eq $var) {
Also puts the things being looked for first, making the statement somewhat
clearer
to me.
I suppose when all you use is a hammer, everything looks like a nail :)
What if sometimes it's $var and at other times $bar? e.g. what reads better:
if ("FooBar" eq $var) {
elsif ("444" eq $bar) {
elsif ("foobartar" eq $bar) {
or:
if ($var eq "FooBar") {
elsif ($bar eq "444") {
elsif ($bar eq "foobartar") {
the second version is much more parsable if you ask me.
I admit my variables nicely align, which makes it easier to read :)
--
_____________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED] http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]