NAME

Developer::Dashboard::PageResolver - page source resolver

SYNOPSIS

my $resolver = Developer::Dashboard::PageResolver->new(...);
my $page = $resolver->load_named_page('system-status');

DESCRIPTION

This module resolves pages from saved files and generated provider sources into the common page document model.

METHODS

new, list_pages, load_named_page, providers, load_provider_page

Resolve saved and generated pages.

PURPOSE

This module resolves which page object should answer a browser request. It decides whether a request targets a saved bookmark, a config-backed provider page, or another page source, and it hands the resulting page object to the rest of the web stack in a normalized shape.

WHY IT EXISTS

It exists because the browser surface includes more than one page source. Keeping that routing logic in one resolver prevents the web app from mixing saved bookmark lookup, provider-page lookup, and action wiring in the same route code.

WHEN TO USE

Use this file when adding a new page source, changing the order in which page providers are consulted, or fixing browser routes that land on the wrong saved/config-backed page.

HOW TO USE

Construct it with the config, page store, action runner, and paths services, then ask it to resolve the requested page identifier. Treat the returned structure as the canonical page object for the render and source flows.

WHAT USES IT

It is used by the web app routes, by provider-backed pages such as dashboard workspaces, and by tests that verify page selection across saved and config-backed sources.

EXAMPLES

Example 1:

perl -Ilib -MDeveloper::Dashboard::PageResolver -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.