In checking our code coverage stats, I noticed on condition for a module needed to be tested to bring coverage to 100%. Then I looked at the line of code:
my $country = $card->country;
$country = $country eq 'gbr' ? '' : uc "[$country]" if $country;
A ternary operator and statement modifier on the same line? You're packing three conditions onto one line of code! Some folks would think that's just fine, but it seems to obscure the intent. How would you rewrite that?