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

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Tue Oct 30 01:11:01 2001


User:      jon
Date:      2001-10-30 06:10:16 GMT
Modified:  lib/Vend Config.pm
Log:
- Convert wildcards ? and {a,b,c} to regex form.

- Correct conversion of * to .* instead of ..* as per shell usage.

- Remove pointless 'unless' test.

Revision  Changes    Path
2.13      +7 -4      interchange/lib/Vend/Config.pm


rev 2.13, prev_rev 2.12
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.12
retrieving revision 2.13
diff -u -u -r2.12 -r2.13
--- Config.pm	2001/10/19 00:32:37	2.12
+++ Config.pm	2001/10/30 06:10:16	2.13
@@ -1,6 +1,6 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.12 2001/10/19 00:32:37 mheins Exp $
+# $Id: Config.pm,v 2.13 2001/10/30 06:10:16 jon Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -95,7 +95,7 @@
 use Vend::Parse;
 use Vend::Util;
 
-$VERSION = substr(q$Revision: 2.12 $, 10);
+$VERSION = substr(q$Revision: 2.13 $, 10);
 
 my %CDname;
 
@@ -1056,7 +1056,7 @@
 	$Global::Structure = {} unless $Global::Structure;
 
 	# Default to old #ifdef, #endif, #include syntax for backward compatibility
-	$Global::ConfigParseComments = 1 unless $Global::ConfigParseComments;
+	$Global::ConfigParseComments = 1;
 
 	# Prevent parsers from thinking it is a catalog
 	undef $C;
@@ -2063,7 +2063,10 @@
 
 	$value =~ s/\./\\./g;
 	$value =~ s/\*/.*/g;
-	$value =~ s/\*/.*/g;
+	$value =~ s/\?/./g;
+	$value =~
+		s[({(?:.+?,)+.+?})]
+		 [ local $_ = $1; tr/{,}/(|)/; $_ ]eg;
 	$value =~ s/\s+/|/g;
 	eval {  
 		my $never = 'NeVAirBE';