|P is for Practical|
Refactoring: dumb or witty use of ternary operator?by PetaMem (Priest)
|on Jun 21, 2004 at 21:47 UTC||Need Help??|
PetaMem has asked for the
wisdom of the Perl Monks concerning the following question:
I'm refactoring code of a former colleague, who sometimes was brilliant implementing things, and sometimes - well...
I stumbled across a module where he uses tons of these constructs:
Standalone - not as right value of anything. Looking at the context (no context for the hash), I think the whole construct is equivalent to:
Or am I overseeing some "important" side effect? Thanks for sharing your insight.