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

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Sat Oct 19 17:15:59 2002


User:      kwalsh
Date:      2002-10-19 21:15:38 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

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


rev 2.74, prev_rev 2.73
Index: Config.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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	19 Oct 2002 21:15:38 -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/19 21:15:38 kwalsh Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -45,7 +45,7 @@
 use Vend::Util;
 use Vend::Data;
=20
-$VERSION =3D substr(q$Revision: 2.73 $, 10);
+$VERSION =3D substr(q$Revision: 2.74 $, 10);
=20
 my %CDname;
=20
@@ -2407,12 +2407,15 @@
=20
 sub parse_list_wildcard {
 	my($var, $value) =3D @_;
+
+	$value =3D~ s/^\s+|\s+$//g;
 	return '' if ! $value;
=20
 	if($value !~ /\|/) {
 		my @items =3D split /\s*,\s*/, $value;
 		my $iplist =3D $value =3D~ /^[\d.,\s]+$/;
 		for(@items) {
+			next unless $_;
 			s/\./\\./g;
 			s/\*/.*/g;
 			s/\?/./g;