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

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



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@pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm

_______________________________________________
Omaha-pm mailing list
Omaha-pm@pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm