towers are constructable
[scpubgit/Clifton.git] / lib / App / Clifton / Server.pm
index c39b983..c154786 100644 (file)
@@ -1,6 +1,6 @@
 package App::Clifton::Server;
 
-use aliased 'App::Clifton::ServiceContainer';
+use aliased 'App::Clifton::ConsoleService';
 use aliased 'App::Clifton::ConfigLoader';
 use Moo;
 
@@ -9,7 +9,7 @@ extends 'App::Clifton::Service';
 sub BUILD {
   my ($self, $args) = @_;
   $args->{loop}->add($self);
-  $self->$_ for qw(services);
+  $self->$_ for qw(console_service);
 }
 
 has config_file => (is => 'ro', required => 1);
@@ -20,10 +20,11 @@ has current_config => (is => 'rw');
 
 sub _build_config_loader { ConfigLoader->new }
 
-has services => (is => 'lazy');
+has console_service => (is => 'lazy');
 
-sub _build_services {
-  shift->_new_child(ServiceContainer, {});
+sub _build_console_service {
+  my ($self) = @_;
+  $self->_new_child(ConsoleService, { server => $self });
 }
 
 sub reload_config { shift->_do(reload_config => @_) }