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

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Sun Jun 9 15:48:01 2002


User:      racke
Date:      2002-06-09 19:47:13 GMT
Modified:  lib/Vend Tag: STABLE_4_8-branch Config.pm
Log:
introduced MV_LOCALE_NO_DEFAULTS to avoid defaults for currency
settings if necessary

Revision  Changes    Path
No                   revision



No                   revision



2.2.2.8   +11 -8     interchange/lib/Vend/Config.pm


rev 2.2.2.8, prev_rev 2.2.2.7
Index: Config.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Config.pm,v
retrieving revision 2.2.2.7
retrieving revision 2.2.2.8
diff -u -r2.2.2.7 -r2.2.2.8
--- Config.pm	24 Jan 2002 06:44:28 -0000	2.2.2.7
+++ Config.pm	9 Jun 2002 19:47:13 -0000	2.2.2.8
@@ -1,6 +1,6 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.2.2.7 2002/01/24 06:44:28 jon Exp $
+# $Id: Config.pm,v 2.2.2.8 2002/06/09 19:47:13 racke Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -95,7 +95,7 @@
 use Vend::Parse;
 use Vend::Util;
 
-$VERSION = substr(q$Revision: 2.2.2.7 $, 10);
+$VERSION = substr(q$Revision: 2.2.2.8 $, 10);
 
 my %CDname;
 
@@ -1729,6 +1729,7 @@
 			%{$sethash} = Text::ParseWords::shellwords($settings);
 		}
 		$c = $store->{$name} || {};
+		my $nodefaults = delete $sethash->{MV_LOCALE_NO_DEFAULTS};
 		if (delete $sethash->{MV_LOCALE_CHOMP_VALUES}) {
 			chomp ($c->{$_} = $sethash->{$_}) for keys %$sethash;
 		}
@@ -1737,12 +1738,14 @@
 		}
 		if($item eq 'Locale') {
 			$Vend::Cfg->{DefaultLocale} = $name;
-			$c->{mon_thousands_sep} = ','
-				unless defined $c->{mon_thousands_sep};
-			$c->{decimal_point} = '.'
-				unless $c->{decimal_point};
-			$c->{frac_digits} = 2
-				unless defined $c->{frac_digits};
+			unless ($nodefaults) {
+				$c->{mon_thousands_sep} = ','
+					unless defined $c->{mon_thousands_sep};
+				$c->{decimal_point} = '.'
+					unless $c->{decimal_point};
+				$c->{frac_digits} = 2
+					unless defined $c->{frac_digits};
+			}
 		}
 	}
 	else {