[interchange-cvs] interchange - jon modified 6 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Fri Oct 24 12:01:41 EDT 2003


User:      jon
Date:      2003-10-24 15:01:40 GMT
Modified:  .        WHATSNEW
Modified:  dist/test/etc order.profiles
Modified:  dist/test/pages basket1.html basket2.html
Modified:  dist/test/pages/ord basket.html
Modified:  lib/Vend Interpolate.pm
Log:
Get rid of old %Safe hash in Vend::Interpolate.

I hope I didn't miss any references or break anything along the way.

Revision  Changes    Path
2.155     +3 -0      interchange/WHATSNEW


rev 2.155, prev_rev 2.154
Index: WHATSNEW
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW,v
retrieving revision 2.154
retrieving revision 2.155
diff -u -u -r2.154 -r2.155
--- WHATSNEW	13 Oct 2003 23:36:05 -0000	2.154
+++ WHATSNEW	24 Oct 2003 15:01:39 -0000	2.155
@@ -11,6 +11,9 @@
 Core
 ----
 
+* Remove long-deprecated %Safe hash. Use $CGI, $Carts, $Items, $Config,
+  $Scratch, and $Values instead of $Safe{cgi} etc.
+
 * Fix locking of NFS sessions.
 
 * Make [bounce ...] more reliable with respect to terminating output



2.1       +4 -4      interchange/dist/test/etc/order.profiles


rev 2.1, prev_rev 2.0
Index: order.profiles
===================================================================
RCS file: /var/cvs/interchange/dist/test/etc/order.profiles,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -u -r2.0 -r2.1
--- order.profiles	18 Jul 2001 02:22:28 -0000	2.0
+++ order.profiles	24 Oct 2003 15:01:40 -0000	2.1
@@ -69,10 +69,10 @@
 address=required
 city=required
 country=required
-[perl values config]
-$state      = $Safe{'values'}->{state};
-$country    = $Safe{'values'}->{country};
-$zip        = $Safe{'values'}->{zip};
+[perl]
+$state      = $Values->{state};
+$country    = $Values->{country};
+$zip        = $Values->{zip};
 $state_ok   = [if salestax [value state] ne '']1[else]0[/else][/if];
 $country    =~ s/\W//g;
 $zip_ok     = ($zip =~ /^\s*\d\d\d\d\d(-\d\d\d\d)?\s*$/);



2.1       +4 -4      interchange/dist/test/pages/basket1.html


rev 2.1, prev_rev 2.0
Index: basket1.html
===================================================================
RCS file: /var/cvs/interchange/dist/test/pages/basket1.html,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -u -r2.0 -r2.1
--- basket1.html	18 Jul 2001 02:22:30 -0000	2.0
+++ basket1.html	24 Oct 2003 15:01:40 -0000	2.1
@@ -3,7 +3,7 @@
 <TITLE>Basket 1 Contents</TITLE>
 </HEAD>
 [body 1]
-[perl values] $Safe{values}{state} = 'default'; return ''; [/perl]
+[perl] $Values->{state} = 'default'; return ''; [/perl]
 <P>
 Order URL: [process-order]
 <P>
@@ -38,10 +38,10 @@
 	[item-description]
 [if explicit items scratch]
 [condition]
-$no = $Safe{scratch}->{"nodisplay_[item-code]"};
+$no = $Scratch->{"nodisplay_[item-code]"};
 return 1 unless $no;
-foreach $item (reverse @{$Safe{items}}) {
-	return '' if $no eq $item->{'code'};
+foreach $item (reverse @$Items) {
+	return '' if $no eq $item->{code};
 }
 1;
 [/condition]



2.1       +3 -3      interchange/dist/test/pages/basket2.html


rev 2.1, prev_rev 2.0
Index: basket2.html
===================================================================
RCS file: /var/cvs/interchange/dist/test/pages/basket2.html,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -u -r2.0 -r2.1
--- basket2.html	18 Jul 2001 02:22:30 -0000	2.0
+++ basket2.html	24 Oct 2003 15:01:40 -0000	2.1
@@ -38,10 +38,10 @@
 	[item-description]
 [if explicit items scratch]
 [condition]
-$no = $Safe{scratch}->{"nodisplay_[item-code]"};
+$no = $Scratch->{"nodisplay_[item-code]"};
 return 1 unless $no;
-foreach $item (reverse @{$Safe{items}}) {
-	return '' if $no eq $item->{'code'};
+foreach $item (reverse @$Items) {
+	return '' if $no eq $item->{code};
 }
 1;
 [/condition]



2.1       +3 -3      interchange/dist/test/pages/ord/basket.html


rev 2.1, prev_rev 2.0
Index: basket.html
===================================================================
RCS file: /var/cvs/interchange/dist/test/pages/ord/basket.html,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -u -r2.0 -r2.1
--- basket.html	18 Jul 2001 02:22:33 -0000	2.0
+++ basket.html	24 Oct 2003 15:01:40 -0000	2.1
@@ -37,10 +37,10 @@
 	[item-description]
 [if explicit items scratch]
 [condition]
-$no = $Safe{scratch}->{"nodisplay_[item-code]"};
+$no = $Scratch->{"nodisplay_[item-code]"};
 return 1 unless $no;
-foreach $item (reverse @{$Safe{items}}) {
-	return '' if $no eq $item->{'code'};
+foreach $item (reverse @$Items) {
+	return '' if $no eq $item->{code};
 }
 1;
 [/condition]



2.194     +11 -13    interchange/lib/Vend/Interpolate.pm


rev 2.194, prev_rev 2.193
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.193
retrieving revision 2.194
diff -u -u -r2.193 -r2.194
--- Interpolate.pm	5 Oct 2003 19:09:23 -0000	2.193
+++ Interpolate.pm	24 Oct 2003 15:01:40 -0000	2.194
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 # 
-# $Id: Interpolate.pm,v 2.193 2003/10/05 19:09:23 mheins Exp $
+# $Id: Interpolate.pm,v 2.194 2003/10/24 15:01:40 jon Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -28,7 +28,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = substr(q$Revision: 2.193 $, 10);
+$VERSION = substr(q$Revision: 2.194 $, 10);
 
 @EXPORT = qw (
 
@@ -128,7 +128,6 @@
 							$Carts
 							$Config
 							%Sql
-							%Safe
 							$Items
 							$Scratch
 							$Shipping
@@ -201,18 +200,17 @@
 sub init_calc {
 #::logDebug("reset_state=$Vend::Calc_reset init_state=$Vend::Calc_initialized -- initting calc from " . caller);
 	reset_calc() unless $Vend::Calc_reset;
-	$CGI_array                   = \%CGI::values_array;
-	$CGI        = $Safe{cgi}     = \%CGI::values;
-	$Carts      = $Safe{carts}   = $::Carts;
-	$Items      = $Safe{items}   = $Vend::Items;
-	$Config     = $Safe{config}  = $Vend::Cfg;
-	$Scratch    = $Safe{scratch} = $::Scratch;
-	$Values     = $Safe{values}  = $::Values;
-	$Session                     = $Vend::Session;
-	$Search                      = $::Instance->{SearchObject} ||= {};
+	$CGI_array  = \%CGI::values_array;
+	$CGI        = \%CGI::values;
+	$Carts      = $::Carts;
+	$Items      = $Vend::Items;
+	$Config     = $Vend::Cfg;
+	$Scratch    = $::Scratch;
+	$Values     = $::Values;
+	$Session    = $Vend::Session;
+	$Search     = $::Instance->{SearchObject} ||= {};
 	$Variable   = $::Variable;
 	$Vend::Calc_initialized = 1;
-	
 	return;
 }
 








More information about the interchange-cvs mailing list