[Petal] [BUG] odd & even changed?
Steve Purkis
spurkis at mkdoc.com
Mon Aug 18 13:59:53 BST 2003
On Thursday, August 14, 2003, at 04:09 pm, William McKee wrote:
> On Thu, Aug 14, 2003 at 03:22:04PM +0100, Steve Purkis wrote:
>> Petal-1.03 seems to have changed its notion of odd and even in loops.
>> I've tried switching from __odd__ and __even__ to repeat/odd and
>> repeat/even, but get the same result.
>
> Hi Steve,
>
> Yeah, I thought it was kinda odd output when I was hacking on the
> Hash.pm module earlier this week. It'd no surprise you get the same
> results as the __odd__ and __even__ are mapped to the repeat/odd and
> repeat/even functions. I think that may be a bug which will hopefully
> get patched when Jean-Michel has some time to look at the patch I sent
> in (nudge-nudge).
<wink wink> :)
> In the meantime, you could change your templates or edit the two lines
> in Hash.pm which do this calculation. I think the odd() and even() subs
> should be adding 1 to the value of $CUR before doing the modulus
> calculation.
Yeah, I figured it was something along those lines. If this behaviour
is going to be reverted I think I'll leave the templates as-is until
the next release. Otherwise I'll have to switch over as you suggest.
-Steve
More information about the Petal
mailing list