Skip to content
Snippets Groups Projects
Commit b72ffb1b authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

configure: use tabs instead of spaces

parent 31da7125
No related branches found
No related tags found
No related merge requests found
...@@ -7,24 +7,24 @@ use strict; ...@@ -7,24 +7,24 @@ use strict;
my %config; my %config;
sub add_config { sub add_config {
my ($prefix, $c) = @_; my ($prefix, $c) = @_;
foreach my $key (keys $c) { foreach my $key (keys $c) {
my $val = $c->{$key}; my $val = $c->{$key};
if (ref($val) eq 'HASH') { if (ref($val) eq 'HASH') {
add_config($key . '.', $val); add_config($key . '.', $val);
}
unless (ref($val)) {
$config{'@' . $prefix . $key . '@'} = $val;
}
} }
unless (ref($val)) {
$config{'@' . $prefix . $key . '@'} = $val;
}
}
} }
sub read_config { sub read_config {
my $input = shift; my $input = shift;
my $CONFIG = do $input; my $CONFIG = do $input;
add_config('', $CONFIG); add_config('', $CONFIG);
} }
...@@ -35,6 +35,6 @@ my $regex = join '|', map {quotemeta} keys %config; ...@@ -35,6 +35,6 @@ my $regex = join '|', map {quotemeta} keys %config;
for (<>) { for (<>) {
s/($regex)/${config{$1}}/g; s/($regex)/${config{$1}}/g;
print; print;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment