steffen: server/perl-kolab/Kolab-Conf Conf.pm,1.17,1.18

cvs at intevation.de cvs at intevation.de
Tue Jun 15 02:01:09 CEST 2004


Author: steffen

Update of /kolabrepository/server/perl-kolab/Kolab-Conf
In directory doto:/tmp/cvs-serv28151/Kolab-Conf

Modified Files:
	Conf.pm 
Log Message:
support multivalued attributes and new |join syntax (for example @@@my-multival|join,@@@ to make a comma-separated list)

Index: Conf.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab-Conf/Conf.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Conf.pm	14 Jun 2004 02:13:02 -0000	1.17
+++ Conf.pm	15 Jun 2004 00:01:07 -0000	1.18
@@ -129,18 +129,18 @@
 	if ($Kolab::config{$attr}) {
 	  my $val = "";
 	  if( ref $Kolab::config{$attr} eq "ARRAY" ) {
-	    if( $opt && $opt =~ /|join(.*)/ ) {
-	      $val = join $1, @$Kolab::config{$attr};
+	    if( $opt && $opt =~ /\|join(.*)/ ) {
+	      $val = join $1, @{$Kolab::config{$attr}};
 	    } else {
-	      $val = $Kolab::config{$attr}[0];
+	      $val = $Kolab::config{$attr}->[0];
 	    }
 	  } else {
 	    $val = $Kolab::config{$attr};
 	  }
-	  s/\@{3}(\S+?)(\|.+?)?\@{3}/$val/g;
+	  s/\@{3}(\S+?)(\|.+?)?\@{3}/$val/;
 	} else {
 	  Kolab::log('T', "No configuration variable corresponding to `$1' exists", KOLAB_WARN);
-	  s/\@{3}(\S+?)\@{3}//g;
+	  s/\@{3}(\S+?)\@{3}//;
 	}
       }
       ( $skip == 0 ) && print $config $_;





More information about the commits mailing list