[Templates-cvs] cvs commit: Template2/lib/Template Stash.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 06/02/10 10:54:08
Modified: lib/Template Stash.pm
Log:
* applied changes based on patch from Tom Insam to further refine the
way the stash handles failed method calls. Now we explicitly check
which package it was reported in.
Revision Changes Path
2.100 +7 -6 Template2/lib/Template/Stash.pm
Index: Stash.pm
===================================================================
RCS file: /template-toolkit/Template2/lib/Template/Stash.pm,v
retrieving revision 2.99
retrieving revision 2.100
diff -u -r2.99 -r2.100
--- Stash.pm 2006/02/02 16:01:42 2.99
+++ Stash.pm 2006/02/10 10:54:07 2.100
@@ -18,7 +18,7 @@
#
#----------------------------------------------------------------------------
#
-# $Id: Stash.pm,v 2.99 2006/02/02 16:01:42 abw Exp $
+# $Id: Stash.pm,v 2.100 2006/02/10 10:54:07 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.99 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.100 $ =~ /(\d+)\.(\d+)/);
#========================================================================
@@ -743,7 +743,8 @@
# object then we assume it's a real error that needs
# real throwing
- die $@ if ref($@) || ($@ !~ /Can't locate object method "\Q$item\E/);
+ my $class = ref($root) || $root;
+ die $@ if ref($@) || ($@ !~ /Can't locate object method "\Q$item\E" via package "\Q$class\E"/);
# failed to call object method, so try some fallbacks
if (UNIVERSAL::isa($root, 'HASH') ) {
@@ -1068,16 +1069,16 @@
=head1 AUTHOR
-Andy Wardley E<lt>abw@andywardley.comE<gt>
+Andy Wardley E<lt>abw@wardley.orgE<gt>
-L<http://www.andywardley.com/|http://www.andywardley.com/>
+L<http://wardley.org/|http://wardley.org/>
=head1 VERSION
-2.98, distributed as part of the
+2.99, distributed as part of the
Template Toolkit version 2.14a, released on 02 February 2006.
=head1 COPYRIGHT