[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Sun Dec 8 01:22:00 2002
User: heins
Date: 2002-12-08 06:21:40 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Tolerate people forgetting and putting , on the end of a parameter
when using line2options. A comma should never be the last character, I
would think, but you can choose to not use the filter if by some
bizarre chance it is needed.
Revision Changes Path
2.138 +4 -4 interchange/lib/Vend/Interpolate.pm
rev 2.138, prev_rev 2.137
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.137
retrieving revision 2.138
diff -u -r2.137 -r2.138
--- Interpolate.pm 1 Dec 2002 16:28:45 -0000 2.137
+++ Interpolate.pm 8 Dec 2002 06:21:40 -0000 2.138
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.137 2002/12/01 16:28:45 mheins Exp $
+# $Id: Interpolate.pm,v 2.138 2002/12/08 06:21:40 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.137 $, 10);
+$VERSION = substr(q$Revision: 2.138 $, 10);
@EXPORT = qw (
@@ -984,8 +984,8 @@
$value =~ s/^\s+//;
my @opts = split /[\r\n]+/, $value;
for(@opts) {
- s/^\s+//g;
- s/\s+$//g;
+ s/^\s+//;
+ s/[,\s]+$//;
s/,/,/g;
}
return join ",", @opts;