summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/parse.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/Xconfig/parse.pm')
-rw-r--r--perl-install/Xconfig/parse.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/Xconfig/parse.pm b/perl-install/Xconfig/parse.pm
index 36aad26f3..ae270b9e8 100644
--- a/perl-install/Xconfig/parse.pm
+++ b/perl-install/Xconfig/parse.pm
@@ -13,9 +13,14 @@ sub read_XF86Config {
$raw_X;
}
+sub prepare_write_XF86Config {
+ my ($raw_X) = @_;
+ map { raw_to_string(before_to_string({ %$_ }, 0)) } @$raw_X;
+}
+
sub write_XF86Config {
my ($raw_X, $file) = @_;
- my @blocks = map { raw_to_string(before_to_string({ %$_ }, 0)) } @$raw_X;
+ my @blocks = prepare_write_XF86Config($raw_X);
@blocks ? output($file, @blocks) : unlink $file;
}