Skip to content
Snippets Groups Projects
Commit a992c54f authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- added check if override does not override but set a value

parent d45fe5de
No related branches found
No related tags found
No related merge requests found
......@@ -64,15 +64,22 @@ BEGIN {
sub _override_config ($override, $opt) {
#no warnings;
if (
(exists $opt->{$override})
and ($config{$override} ne $opt->{$override})
) {
say STDERR <<"HINT";
if (exists $opt->{$override}) {
if (!exists $config{$override}) {
$config{$override} = $opt->{$override};
}
if (
(!defined $config{$override})
or ($config{$override} ne $opt->{$override})
) {
#use Data::Printer; p($override); p(%config); p($opt);
say STDERR <<"HINT";
Hint: override local config with:
$override => $opt->{$override} (config: $config{$override})
HINT
$config{$override} = $opt->{$override};
$config{$override} = $opt->{$override};
}
}
#use warnings;
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment