
Devel::ebug::Wx::Service::ServiceManager - manage services

my $sm = $wxebug->service_manager; # or find it elsewhere my $service = $sm->get_service( $service_name ); # use the $service # alternate ways of getting a service my $srv = $wxebug->service_manager->get_service( 'foo_frobnicate' ); my $srv = $wxebug->foo_frobnicate_service;

The service manager is responsible for finding, initializing and terminating services. Users of the service usually need just to call get_service to retrieve a service instance.

my @service_classes = Devel::ebug::Wx::ServiceManager->services;
Returns a list of service classes known to the service manager.
my @services = $sm->active_services;
Returns a list of services currently registered with the service manager.
$sm->initialze( $wxebug );
Calls initialize on all service instances and sets their initialized property to true.
$sm->load_configuration;
Calls load_configuration on all service instances.
$sm->maybe_call_method( $method, @args );
Calls method $method on all active services that provide it, passing @args as arguments.
$sm->finalize( $wxebug );
Calls save_configuration on all service instances, then calls finalize on them and sets their finalized property to true.
Important: the initialized property is still true even after finalize has been called..
my $service_instance = $sm->get_service( 'service_name' );
Returns an active service with the given name, or undef if none is found. If the service has not been initialized, calls inititialize as well, but not load_configuration.
