[Templates-cvs] cvs commit: Template2/lib/Template Stash.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Wed, 08 Oct 2003 11:06:42 +0100
cvs 03/10/08 10:06:41
Modified: lib/Template Stash.pm
Log:
* applied Darren's patch to hash.item vmethod to protect private vars
Revision Changes Path
2.80 +4 -3 Template2/lib/Template/Stash.pm
Index: Stash.pm
===================================================================
RCS file: /template-toolkit/Template2/lib/Template/Stash.pm,v
retrieving revision 2.79
retrieving revision 2.80
diff -u -r2.79 -r2.80
--- Stash.pm 2003/07/24 16:16:28 2.79
+++ Stash.pm 2003/10/08 10:06:41 2.80
@@ -18,7 +18,7 @@
#
#----------------------------------------------------------------------------
#
-# $Id: Stash.pm,v 2.79 2003/07/24 16:16:28 abw Exp $
+# $Id: Stash.pm,v 2.80 2003/10/08 10:06:41 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.79 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.80 $ =~ /(\d+)\.(\d+)/);
#========================================================================
@@ -115,6 +115,7 @@
$HASH_OPS = {
'item' => sub { my ($hash, $item) = @_;
$item = '' unless defined $item;
+ return if $item =~ /^[_.]/;
$hash->{ $item };
},
'hash' => sub { $_[0] },
@@ -997,4 +998,4 @@
=head1 SEE ALSO
-L<Template|Template>, L<Template::Context|Template::Context>
\ No newline at end of file
+L<Template|Template>, L<Template::Context|Template::Context>