NAME
Developer::Dashboard::FileRegistry - logical file registry for Developer Dashboard
SYNOPSIS
my $files = Developer::Dashboard::FileRegistry->new(paths => $paths);
my $json = $files->read('global_config');
DESCRIPTION
This module maps logical file names to concrete runtime files and provides small convenience methods for reading and writing them.
METHODS
new
Construct a registry bound to a path registry.
resolve_file, read, write, append, touch, remove
Resolve and manage named files.
prompt_log, collector_log, dashboard_log, global_config, dashboard_index, auth_log, web_pid, web_state
Return known runtime file paths.
PURPOSE
This module is the runtime file-system façade. It resolves the concrete files and directories under the layered runtime tree, loads and writes dashboard-managed files, and gives higher-level services a single place to ask for runtime paths and file content without rebuilding path logic themselves.
WHY IT EXISTS
It exists because many subsystems need to read and write runtime files, but they should not each re-implement path resolution and permission handling. Centralizing file access keeps layered lookup and file ownership consistent across the runtime.
WHEN TO USE
Use this file when changing how runtime files are discovered, written, or permissioned, especially for config, dashboard pages, state files, or staged helper assets.
HOW TO USE
Construct it with a path registry and use it as the file access layer for modules that need runtime data. Keep raw path math and secure write behavior here rather than repeating it in feature modules.
WHAT USES IT
It is used by config, auth, page, session, init, and web modules throughout the runtime, along with the tests that verify layered file lookup and non-destructive writes.
EXAMPLES
Example 1:
perl -Ilib -MDeveloper::Dashboard::FileRegistry -e 1
Do a direct compile-and-load check against the module from a source checkout.
Example 2:
prove -lv t/07-core-units.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.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 212:
Non-ASCII character seen before =encoding in 'façade.'. Assuming UTF-8