diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-04-19 17:03:01 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-04-19 17:04:40 +0300 |
commit | 3c4af35e7ef01f33662e515859a827091774d64a (patch) | |
tree | d8636f9b1ad25f1713a924f169803034321e20af /lib | |
parent | c7c75b0cca25ecacad0ba2dfe7c41db836a0b17a (diff) | |
download | acmeman-3c4af35e7ef01f33662e515859a827091774d64a.tar.gz acmeman-3c4af35e7ef01f33662e515859a827091774d64a.tar.bz2 |
Make sure configuration defaults are applied and syntax rechecked after configuring file source module.
* acmeman: Call finalize after modifying configuration.
* lib/App/Acmeman/Config.pm (finalize): New method.
(new): Call finalize.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/Acmeman/Config.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/App/Acmeman/Config.pm b/lib/App/Acmeman/Config.pm index bbe1f2b..614a46a 100644 --- a/lib/App/Acmeman/Config.pm +++ b/lib/App/Acmeman/Config.pm @@ -30,11 +30,15 @@ sub new { } else { $self->error("configuration file \"$filename\" does not exist"); } - + $self->finalize; + return $self; +} + +sub finalize { + my $self = shift; if ($self->success && exists($self->{_syntax})) { $self->_fixup($self->{_syntax}, $self->{_conf}); } - return $self; } sub error { |