note
choroba
It's also possible to shorten the lines with
<c>
('--somearg' => $somearg ) x !! $somearg,
('--otherarg' => $otherarg) x !! $otherarg,
</c><P>
but only if the left hand side of <c>x</c> doesn't have any side-effects (because unlike the ternary operator, <c>foo() x 0</c> still calls foo).<P>
See also [metamod://PerlX::Maybe].<P>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-832495">
<c>map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]</c>
</div></div><!-- Wiki2Monks {"version":1.16} -->
11132487
11132503