in reply to Re^4: How Much Is Too Much (on one line of code)?
in thread How Much Is Too Much (on one line of code)?

Perhaps I'd set that particular example up in a hash.
Yeah, I admit it's not a good example :-) My actual code used different conditional expressions. But in that case, I would probably write:
my $when = $whenPhrases{some} || q{yes, there is always a space for default};
There was a situation I chose to layout the chain the way you do but fail to recall which one.

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Replies are listed 'Best First'.
Re^6: How Much Is Too Much (on one line of code)?
by johngg (Canon) on Jun 18, 2007 at 15:58 UTC
    I used exists just in case any of the hash values was an empty string, as might happen for the phrase "looking somewhat blank". This might result in the hash entry

    what => q{},

    A bit silly in this case but I have been bitten by that in the past.

    Cheers,

    JohnGG