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

Jay Hannah jay at jays.net
Fri Mar 27 10:36:33 PDT 2009


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



More information about the Omaha-pm mailing list