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

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Thu Aug 1 21:21:02 2002


User:      heins
Date:      2002-08-02 01:20:53 GMT
Modified:  lib/Vend Interpolate.pm
Log:
* Add copy of options to pass as 3rd arg to PREFIX-exec

Revision  Changes    Path
2.95      +8 -4      interchange/lib/Vend/Interpolate.pm


rev 2.95, prev_rev 2.94
Index: Interpolate.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.94
retrieving revision 2.95
diff -u -r2.94 -r2.95
--- Interpolate.pm	1 Aug 2002 16:45:02 -0000	2.94
+++ Interpolate.pm	2 Aug 2002 01:20:53 -0000	2.95
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 #=20
-# $Id: Interpolate.pm,v 2.94 2002/08/01 16:45:02 mheins Exp $
+# $Id: Interpolate.pm,v 2.95 2002/08/02 01:20:53 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA =3D qw(Exporter);
=20
-$VERSION =3D substr(q$Revision: 2.94 $, 10);
+$VERSION =3D substr(q$Revision: 2.95 $, 10);
=20
 @EXPORT =3D qw (
=20
@@ -4363,6 +4363,8 @@
 	$run =3D~ s#$IB$QR{_param_if}# defined $fh->{$3} ||
 		::logOnce(@field_msg, $3, "if-$Orig_prefix-param") #ige;
=20
+	my $oexec =3D { %$opt };
+
 	for( ; $i <=3D $end ; $i++, $count++ ) {
 		$row =3D $ary->[$i];
 		last unless defined $row;
@@ -4414,7 +4416,7 @@
 		$run =3D~ s#$B$QR{_calc}$E$QR{'/_calc'}#tag_calc($1)#ige;
 		$run =3D~ s#$B$QR{_exec}$E$QR{'/_exec'}#
 					init_calc() if ! $Vend::Calc_initialized;
-					($Vend::Cfg->{Sub}{$1} || sub { 'ERROR' })->($2,$row)
+					($Vend::Cfg->{Sub}{$1} || sub { 'ERROR' })->($2,$row,$oexec)
 				#ige;
 		$run =3D~ s#$B$QR{_filter}$E$QR{'/_filter'}#filter_value($1,$2)#ige;
 		$run =3D~ s#$B$QR{_last}$E$QR{'/_last'}#
@@ -4483,6 +4485,8 @@
 					  	resolve_nested_if($1, $2)
 					  }se;
=20
+	my $oexec =3D { %$opt };
+
 	for ( ; $i <=3D $end; $i++, $count++) {
 		$item =3D $hash->[$i];
 		$item->{mv_ip} =3D $i;
@@ -4585,7 +4589,7 @@
 		$run =3D~ s#$B$QR{_tag}($All$E[-_]tag[-_]\1\])#
 						tag_dispatch($1,$count, $item, $hash, $2)#ige;
 		$run =3D~ s#$B$QR{_calc}$E$QR{'/_calc'}#tag_calc($1)#ige;
-		$run =3D~ s#$B$QR{_exec}$E$QR{'/_exec'}#init_calc() if ! $Vend::Calc_ini=
tialized;($Vend::Cfg->{Sub}{$1} || sub { 'ERROR' })->($2,$item)#ige;
+		$run =3D~ s#$B$QR{_exec}$E$QR{'/_exec'}#init_calc() if ! $Vend::Calc_ini=
tialized;($Vend::Cfg->{Sub}{$1} || sub { 'ERROR' })->($2,$item,$oexec)#ige;
 		$run =3D~ s#$B$QR{_filter}$E$QR{'/_filter'}#filter_value($1,$2)#ige;
 		$run =3D~ s#$B$QR{_last}$E$QR{'/_last'}#
                     my $tmp =3D interpolate_html($1);