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

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Sat Oct 26 23:54:01 2002


User:      heins
Date:      2002-10-27 03:54:00 GMT
Modified:  lib/Vend Config.pm
Log:
* Replace

	$value =~ s/^\s+|\s+$//g;

  with

	$value =~ s/^\s+//;
	$value =~ s/\s+$//;

  We have an unpublished coding standard against the top construct.
  It is slower (though that doesn't matter much here), but more
  importantly it is easy to do the wrong thing depending on the
  value of s///mgs modifiers.

Revision  Changes    Path
2.75      +3 -2      interchange/lib/Vend/Config.pm


rev 2.75, prev_rev 2.74
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.74
retrieving revision 2.75
diff -u -r2.74 -r2.75
--- Config.pm	21 Oct 2002 15:43:01 -0000	2.74
+++ Config.pm	27 Oct 2002 03:53:59 -0000	2.75
@@ -1,6 +1,6 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.74 2002/10/21 15:43:01 mheins Exp $
+# $Id: Config.pm,v 2.75 2002/10/27 03:53:59 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -45,7 +45,7 @@
 use Vend::Util;
 use Vend::Data;
 
-$VERSION = substr(q$Revision: 2.74 $, 10);
+$VERSION = substr(q$Revision: 2.75 $, 10);
 
 my %CDname;
 
@@ -2408,7 +2408,8 @@
 sub parse_list_wildcard {
 	my($var, $value) = @_;
 
-	$value =~ s/^\s+|\s+$//g;
+	$value =~ s/^\s+//;
+	$value =~ s/\s+$//;
 	return '' if ! $value;
 
 	if($value !~ /\|/) {