From: Matt S Trout Date: Sat, 8 Jan 2011 15:13:16 +0000 (+0000) Subject: actually load config X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=46b150cd037bc237a01ccf88ba0e49680fcda786;p=scpubgit%2FClifton.git actually load config --- diff --git a/lib/App/Clifton/Server.pm b/lib/App/Clifton/Server.pm index 400b929..c39b983 100644 --- a/lib/App/Clifton/Server.pm +++ b/lib/App/Clifton/Server.pm @@ -16,6 +16,8 @@ has config_file => (is => 'ro', required => 1); has config_loader => (is => 'lazy'); +has current_config => (is => 'rw'); + sub _build_config_loader { ConfigLoader->new } has services => (is => 'lazy'); @@ -29,7 +31,9 @@ sub shutdown { shift->_do(shutdown => @_) } sub _body_for_reload_config { my ($self, $args) = @_; - $args->{on_finished}->(); + my $config = $self->config_loader->config_from_file($self->config_file); + $self->current_config($config); + $args->{on_finished}->($config); } 1;