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

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Mon Oct 21 11:44:00 2002


User:      mheins
Date:      2002-10-21 15:43:02 GMT
Modified:  lib/Vend Config.pm
Log:
	* Remove leading/trailing whitespace so that extra-long lists can
	  be specified using 'here' documents.

	  For example:

		RobotUA <<EOR
		    AltaVista, Arachnoidea, Aranha, Atomz, BOT, Crawler,
		    EZResult, Google, Gulliver, Hubater, IncyWincy,
		    Jack, KIT-Fireball, Kototoi, Lycos, MantraAgent,
		    Mercator, MuscatFerret, Nazilla, NetResearchServer,
		    Openfind, Seek, Scooter, Slurp, Spider, Toutatis,
		    Tv*Merc_resh, WIRE WebRefiner, Wget, WhizBang, Yandex,
		    ZyBorg, appie, asterias, bot, contact, crawler, gazz,
		    griffon, ia_archiver, moget, seek, teoma_agent, xtreme
		EOR

	(Recommitted after changover, by kwalsh)

Revision  Changes    Path
2.74      +5 -2      interchange/lib/Vend/Config.pm


rev 2.74, prev_rev 2.73
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.73
retrieving revision 2.74
diff -u -r2.73 -r2.74
--- Config.pm	7 Oct 2002 15:35:57 -0000	2.73
+++ Config.pm	21 Oct 2002 15:43:01 -0000	2.74
@@ -1,6 +1,6 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.73 2002/10/07 15:35:57 mheins Exp $
+# $Id: Config.pm,v 2.74 2002/10/21 15:43:01 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.73 $, 10);
+$VERSION = substr(q$Revision: 2.74 $, 10);
 
 my %CDname;
 
@@ -2407,12 +2407,15 @@
 
 sub parse_list_wildcard {
 	my($var, $value) = @_;
+
+	$value =~ s/^\s+|\s+$//g;
 	return '' if ! $value;
 
 	if($value !~ /\|/) {
 		my @items = split /\s*,\s*/, $value;
 		my $iplist = $value =~ /^[\d.,\s]+$/;
 		for(@items) {
+			next unless $_;
 			s/\./\\./g;
 			s/\*/.*/g;
 			s/\?/./g;