[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Thu Nov 7 10:50:01 2002


User:      heins
Date:      2002-11-07 15:46:27 GMT
Modified:  lib/Vend Interpolate.pm
Log:
* Ensure the $Tag object is not wrapped more than once.

Revision  Changes    Path
2.126     +4 -3      interchange/lib/Vend/Interpolate.pm


rev 2.126, prev_rev 2.125
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.125
retrieving revision 2.126
diff -u -r2.125 -r2.126
--- Interpolate.pm	31 Oct 2002 18:43:24 -0000	2.125
+++ Interpolate.pm	7 Nov 2002 15:46:26 -0000	2.126
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 # 
-# $Id: Interpolate.pm,v 2.125 2002/10/31 18:43:24 kwalsh Exp $
+# $Id: Interpolate.pm,v 2.126 2002/11/07 15:46:26 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = substr(q$Revision: 2.125 $, 10);
+$VERSION = substr(q$Revision: 2.126 $, 10);
 
 @EXPORT = qw (
 
@@ -88,6 +88,7 @@
 		$hole = new Safe::Hole;
 	};
 }
+my $tag_wrapped;
 
 use strict;
 use Vend::Util;
@@ -2112,7 +2113,7 @@
 		}
 	}
 
-	$Tag = $hole->wrap($Tag);
+	$Tag = $hole->wrap($Tag) if $hole and ! $tag_wrapped++;
 
 	init_calc() if ! $Vend::Calc_initialized;
 	$ready_safe->share(@share) if @share;