On Fri, Aug 04, 2006 at 10:03:07AM -0700, Bill Moseley wrote:
>
> Can anyone else confirm or deny this test on 2.15?
Due to the overwhelming interest in this topic, I decided to poke
around a bit more.
First, in some way the problem may be more related to DateTime then TT.
I switched to the non XS stash and TT now aborts with the error:
undef error - Cannot compare a datetime to a regular scalar
[2006-08-06T17:09:17] [Template::Stash=HASH(0x860fd60)] at
/usr/lib/perl5/DateTime.pm line 1397
And in fact does that with both 2.14 and 2.15 with the Perl stash.
So doing a trace I'm led to Stash.pm's _dotop():
my $atroot = ($root eq $self);
Seems like DateTime should not croak, but rather report that, yes,
they are not equal if they are not both datetime objects. Apples and
oranges are different objects for sure, but I'm also reasonably sure
they are not equal as well.
So, this problem is new with the 2.15 version of the XS stash. All is
well if I just copy the 2.14 stash to the 2.15 distribution.
What changed in the stash?
$ diff Template-Toolkit-2.14/xs/Stash.xs Template-Toolkit-2.15/xs/Stash.xs |
wc -l
1555
Gack! More than I want to look at on a nice sunny Sunday.
The new stash is not generating the error from DateTime -- I'm not
sure if that's because the xs stash is trapping that exception and
not reporting it, or if there's some completely different issue at
hand.
But for now, I'm downgrading to 2.14, breaking out the gin and tonic
and heading for the hammock.
--
Bill Moseley
[EMAIL PROTECTED]
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates