NAME
Developer::Dashboard::RuntimeManager - runtime lifecycle manager
SYNOPSIS
my $runtime = Developer::Dashboard::RuntimeManager->new(...);
my $pid = $runtime->start_web;
DESCRIPTION
This module manages the lifecycle of the dashboard web service and managed collector loops, including stop and restart orchestration.
METHODS
new, start_web, running_web, stop_web, start_collectors, serve_all, stop_collectors, stop_all, restart_all, web_state, web_log
Construct and manage the dashboard runtime.
PURPOSE
This module manages the dashboard runtime processes. It starts, stops, and restarts the web listener, tracks the web pid, coordinates collector lifecycle around restart/stop flows, and exposes the process-management behavior behind the serve/restart/stop command family.
WHY IT EXISTS
It exists because runtime lifecycle management needs one owner for pid files, process validation, restart ordering, and port-release races. That keeps the browser server and collector loops moving together instead of leaving each command to improvise process control.
WHEN TO USE
Use this file when changing how the web process is launched, how restart waits for ports to free up, how collectors are stopped and restarted with the web process, or how runtime state is validated before a lifecycle command acts.
HOW TO USE
Construct it with the path registry and any required collaborators, then call the lifecycle methods from CLI helpers. Keep process orchestration here and let the command wrappers only parse arguments and print results.
WHAT USES IT
It is used by the dashboard serve, dashboard restart, and dashboard stop helpers, by integration smoke that exercises lifecycle commands, and by tests that cover pid handling and process validation.
EXAMPLES
Example 1:
perl -Ilib -MDeveloper::Dashboard::RuntimeManager -e 1
Do a direct compile-and-load check against the module from a source checkout.
Example 2:
prove -lv t/00-load.t t/21-refactor-coverage.t
Run the focused regression tests that most directly exercise this module's behavior.
Example 3:
HARNESS_PERL_SWITCHES=-MDevel::Cover prove -lr t
Recheck the module under the repository coverage gate rather than relying on a load-only probe.
Example 4:
prove -lr t
Put any module-level change back through the entire repository suite before release.