summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-10-05 23:04:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-10-05 23:04:34 +0000
commit6e10a5c1c062bc55d1a3327cd13d4447ee9a3010 (patch)
tree5fe5c574bc5ad4ae5ac95d588bf42c98b6bb12b4 /perl-install/common.pm
parent32ffa5852bbaf28a57bf1d6304b4ca57350d61d2 (diff)
downloaddrakx-backup-do-not-use-6e10a5c1c062bc55d1a3327cd13d4447ee9a3010.tar
drakx-backup-do-not-use-6e10a5c1c062bc55d1a3327cd13d4447ee9a3010.tar.gz
drakx-backup-do-not-use-6e10a5c1c062bc55d1a3327cd13d4447ee9a3010.tar.bz2
drakx-backup-do-not-use-6e10a5c1c062bc55d1a3327cd13d4447ee9a3010.tar.xz
drakx-backup-do-not-use-6e10a5c1c062bc55d1a3327cd13d4447ee9a3010.zip
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm36
1 files changed, 17 insertions, 19 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 2232048f6..baa46e46a 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -466,27 +466,25 @@ sub template2userfile {
}
}
sub update_userkderc {
- my ($prefix, $category, %subst) = @_;
-
- foreach my $file (list_skels($prefix, '.kderc')) {
- output $file,
- (map {
- my $l = $_;
- s/^\s*//;
- if (my $i = /^\[$category\]/i ... /^\[/) {
- if ($i =~ /E/) { #- for last line of category
- $l = join('', values %subst) . $l;
- %subst = ();
- } elsif (/^(\w*?)=/) {
- if (my $e = delete $subst{lc($1)}) {
- $l = "$1=$e\n";
- }
+ my ($file, $category, %subst) = @_;
+
+ output $file,
+ (map {
+ my $l = $_;
+ s/^\s*//;
+ if (my $i = /^\[$category\]/i ... /^\[/) {
+ if ($i =~ /E/) { #- for last line of category
+ $l = join('', map_each { "$::a=$::b\n" } %subst) . $l;
+ %subst = ();
+ } elsif (/^(\w*?)=/) {
+ if (my $e = delete $subst{lc($1)}) {
+ $l = "$1=$e\n";
}
}
- $l;
- } cat_($file)),
- (%subst && "[$category]\n", values %subst); #- if category has not been found above.
- }
+ }
+ $l;
+ } cat_($file)),
+ (%subst && "[$category]\n", map_each { "$::a=$::b\n" } %subst); #- if category has not been found above.
}
sub substInFile(&@) {