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

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Fri Nov 16 08:40:01 2001


User:      heins
Date:      2001-11-16 13:39:23 GMT
Modified:  lib/Vend Interpolate.pm
Log:
	* Fix minor thing found when running regression tests. The oddball
	  quantity-name and modifier-name tags were failing when passed
	  in an item-list by themselves. This is almost not worth doing,
	  as it is unlikely in the extreme that would happen. Still....
	  I would have to rewrite the tests. 8-)

	  Otherwise 4.9.0 passed 100%.

Revision  Changes    Path
2.31      +5 -3      interchange/lib/Vend/Interpolate.pm


rev 2.31, prev_rev 2.30
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.30
retrieving revision 2.31
diff -u -r2.30 -r2.31
--- Interpolate.pm	2001/11/16 00:51:49	2.30
+++ Interpolate.pm	2001/11/16 13:39:22	2.31
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 # 
-# $Id: Interpolate.pm,v 2.30 2001/11/16 00:51:49 mheins Exp $
+# $Id: Interpolate.pm,v 2.31 2001/11/16 13:39:22 mheins Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = substr(q$Revision: 2.30 $, 10);
+$VERSION = substr(q$Revision: 2.31 $, 10);
 
 @EXPORT = qw (
 
@@ -4991,7 +4991,9 @@
 	my $r = '';
 
 	# Optimize for no-match, on-match, etc
-	if($text !~ /\[(?:if-)?$Prefix-/) {
+	# Ugly second regex is for quantity-name/modifier-name, wish they would
+	# go away
+	if($text !~ /\[(?:if-)?$Prefix-/ and $text !~ /\[[qm][uo]/i) {
 		for(; $i <= $end; $i++) {
 			$r .= $text;
 		}