On Sun, Aug 06, 2006 at 10:44:23AM -0700, Bill Moseley wrote:
> 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);

And for those not on the DateTime list, 

    On Mon, Aug 07, 2006 at 08:03:03PM -0500, Dave Rolsky wrote:
    > The reason it dies is because I think it's reasonable to assume that 
    > comparing a DateTime object to something else is an error in the caller's 
    > code. Either a typo, or a function/method returning something other than 
    > what they expect, etc.
    > 
    > What TT2 is doing is rather wrong. It should probably be using something 
    > like Scalar::Util::refaddr.

Although, it seems to me if one object is not a DateTime object then
one could argue they are not equal.

-- 
Bill Moseley
[EMAIL PROTECTED]


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to