TomDLux has asked for the wisdom of the Perl Monks concerning the following question:
I'm using perltidy and would like to use Damian's PBP recommended layout for ternary operators:
my $var = ($condition ? $val_for_true : $val_for_false );
Yes, I like to parenthesize them. How can I get perltidy to generate that layout? I've tried a number of things, including '-pbp', but no such luck. What I get is:
my $var = ( $condition ? $val_for_true : val_for_false );
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: perltidy for ternary operator?
by LanX (Saint) on Dec 06, 2014 at 18:44 UTC | |
by TomDLux (Vicar) on Dec 06, 2014 at 18:54 UTC | |
by LanX (Saint) on Dec 06, 2014 at 19:06 UTC | |
by TomDLux (Vicar) on Dec 06, 2014 at 21:36 UTC | |
by atcroft (Abbot) on Dec 07, 2014 at 04:51 UTC | |
by LanX (Saint) on Dec 06, 2014 at 22:24 UTC |
Back to
Seekers of Perl Wisdom