perlquestion
TomDLux
<p>I'm using perltidy and would like to use Damian's PBP recommended layout for ternary operators:</p>
<code>
my $var = ($condition ? $val_for_true
: $val_for_false
);
</code>
<p>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:</p>
<code>
my $var = ( $condition
? $val_for_true
: val_for_false );
</code>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-144696">
<p>
As Occam said: <em>Entia non sunt multiplicanda praeter necessitatem.</em>
</p>
</div></div>