[Omaha.pm] code change ... good? bad? ugly?

Ryan Stille ryan at cfwebtools.com
Fri Mar 27 10:50:23 PDT 2009


I didn't look at it closely enough the first time - you are right that 
is confusing.

-Ryan

Ryan Stille wrote:
> I like the ternary.
> -Ryan
>
> Jay Hannah wrote:
>> Hmm... I find this use of the ternary operator confusing so I changed 
>> it...
>>
>>
>> BEFORE:
>>
>>   $align = ( $self->align eq 'justify' ) ? 'left' : $self->align;
>>
>> AFTER:
>>
>>   # We've run out of words to fill a full line
>>   if ($self->align eq 'justify') {
>>      $self->align('left');
>>   }
>>
>>
>> What do you think?
>>
>>
>> http://github.com/jhannah/pdf-textblock/blob/master/lib/PDF/TextBlock.pm
>>
>> _______________________________________________
>> Omaha-pm mailing list
>> Omaha-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/omaha-pm
>
> _______________________________________________
> Omaha-pm mailing list
> Omaha-pm at pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm



More information about the Omaha-pm mailing list