[Omaha.pm] code change ... good? bad? ugly?
Jay Hannah
jay at jays.net
Fri Mar 27 12:46:41 PDT 2009
Jay Hannah wrote:
> 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');
> }
Oops. $align and $self->align are two separate beasts. $self->align is a
semi-permanent thing, $align changes in this chunk of code a couple of
times, depending.
So actually I need both and the BEFORE ternary was the cleanest... So
I'm back to that now.
The circle of life. Apologies to the original author for sophmoric
doubt. :)
j
http://github.com/jhannah/pdf-textblock/blob/master/lib/PDF/TextBlock.pm
More information about the Omaha-pm
mailing list