[Templates-svn] r1051 - trunk/lib/Template
svn@template-toolkit.org
svn@template-toolkit.org
Wed, 14 Mar 2007 19:27:48 +0000
Author: abw
Date: 2007-03-14 19:27:47 +0000 (Wed, 14 Mar 2007)
New Revision: 1051
Modified:
trunk/lib/Template/Stash.pm
Log:
Changed $atroot comparison in Template::Stash to prevent problems with objects with overloaded comparison operators
Modified: trunk/lib/Template/Stash.pm
===================================================================
--- trunk/lib/Template/Stash.pm 2007-03-14 19:27:09 UTC (rev 1050)
+++ trunk/lib/Template/Stash.pm 2007-03-14 19:27:47 UTC (rev 1051)
@@ -383,7 +383,7 @@
sub _dotop {
my ($self, $root, $item, $args, $lvalue) = @_;
my $rootref = ref $root;
- my $atroot = ($root eq $self);
+ my $atroot = (ref $root && "$root" eq $self); # stringify $root to prevent overload madness
my ($value, @result);
$args ||= [ ];