[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



On Fri, Mar 27, 2009 at 12:36 PM, Jay Hannah <jay@jays.net> 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?

How about?

$self->align('left') if ($self->align eq 'justify');
 

--
Ted Katseres
     ||=O=||