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 (Cardinal) on Dec 06, 2014 at 18:44 UTC