[interchange-cvs] interchange - jon modified lib/Vend/Config.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Mon Nov 7 16:40:40 EST 2005


User:      jon
Date:      2005-11-07 21:40:40 GMT
Modified:  lib/Vend Config.pm
Log:
Clean up some directive-processing subs: remove unneeded shifts,
and use the UserControl setting that was already passed in rather than
a direct hook-in to the catalog config hash.

Revision  Changes    Path
2.187     +4 -9      interchange/lib/Vend/Config.pm


rev 2.187, prev_rev 2.186
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.186
retrieving revision 2.187
diff -u -u -r2.186 -r2.187
--- Config.pm	19 Oct 2005 14:21:06 -0000	2.186
+++ Config.pm	7 Nov 2005 21:40:40 -0000	2.187
@@ -1,8 +1,8 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.186 2005/10/19 14:21:06 mheins Exp $
+# $Id: Config.pm,v 2.187 2005/11/07 21:40:40 jon Exp $
 #
-# Copyright (C) 2002-2003 Interchange Development Group
+# Copyright (C) 2002-2005 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
 #
 # This program was originally based on Vend 0.2 and 0.3
@@ -52,7 +52,7 @@
 use Vend::Data;
 use Vend::Cron;
 
-$VERSION = substr(q$Revision: 2.186 $, 10);
+$VERSION = substr(q$Revision: 2.187 $, 10);
 
 my %CDname;
 my %CPname;
@@ -3335,7 +3335,6 @@
 			$C->{Shipping} = $o->{default} || $o->{Postal};
 		},
 		UserDB => sub {
-					shift;
 					my $set = $C->{UserDB_repository};
 					for(keys %$set) {
 						next unless defined $set->{$_}{admin};
@@ -3345,9 +3344,7 @@
 					return 1;
 				},
 		UserControl => sub {
-					shift;
-					return 1 unless defined $C;
-					return 1 unless $C->{UserControl};
+					return 1 unless shift;
 					require Vend::UserControl;
 					return 1;
 				},
@@ -3374,14 +3371,12 @@
 					return 1;
 				},
 		SOAP_Socket => sub {
-					shift;
 					return 1 if $Have_set_global_defaults;
 					$Global::SOAP_Socket = ['7780']
 						if $Global::SOAP and ! $Global::SOAP_Socket;
 					return 1;
 				},
 		TcpMap => sub {
-					shift;
 					return 1 if defined $Have_set_global_defaults;
 					my (@sets) = keys %{$Global::TcpMap};
 					if(scalar @sets == 1 and $sets[0] eq '-') {








More information about the interchange-cvs mailing list