[Templates-cvs] cvs commit: Template2/lib/Template Stash.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 06/01/30 13:33:03
Modified: lib/Template Stash.pm
Log:
* applied Dave Howorth's fix to make stash stricter about what it
considers to be a missing object method.
Revision Changes Path
2.90 +6 -6 Template2/lib/Template/Stash.pm
Index: Stash.pm
===================================================================
RCS file: /template-toolkit/Template2/lib/Template/Stash.pm,v
retrieving revision 2.89
retrieving revision 2.90
diff -u -r2.89 -r2.90
--- Stash.pm 2006/01/29 11:26:21 2.89
+++ Stash.pm 2006/01/30 13:33:02 2.90
@@ -7,10 +7,10 @@
# variables for the Template Toolkit.
#
# AUTHOR
-# Andy Wardley <abw@wardley.org>
+# Andy Wardley <abw@cpan.org>
#
# COPYRIGHT
-# Copyright (C) 1996-2003 Andy Wardley. All Rights Reserved.
+# Copyright (C) 1996-2006 Andy Wardley. All Rights Reserved.
# Copyright (C) 1998-2000 Canon Research Centre Europe Ltd.
#
# This module is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
#
#----------------------------------------------------------------------------
#
-# $Id: Stash.pm,v 2.89 2006/01/29 11:26:21 abw Exp $
+# $Id: Stash.pm,v 2.90 2006/01/30 13:33:02 abw Exp $
#
#============================================================================
@@ -29,7 +29,7 @@
use strict;
use vars qw( $VERSION $DEBUG $ROOT_OPS $SCALAR_OPS $HASH_OPS $LIST_OPS );
-$VERSION = sprintf("%d.%02d", q$Revision: 2.89 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.90 $ =~ /(\d+)\.(\d+)/);
#========================================================================
@@ -686,7 +686,7 @@
# object then we assume it's a real error that needs
# real throwing
- die $@ if ref($@) || ($@ !~ /Can't locate object method/);
+ die $@ if ref($@) || ($@ !~ /Can't locate object method "\Q$item\E/);
# failed to call object method, so try some fallbacks
if (UNIVERSAL::isa($root, 'HASH') ) {
@@ -940,7 +940,7 @@
should be used to initialise the stash.
my $stash = Template::Stash->new({ var1 => 'value1',
- var2 => 'value2' });
+ var2 => 'value2' });
=head2 get($variable)