NAME

Developer::Dashboard::EnvAudit - inspect dashboard-loaded env key provenance

SYNOPSIS

use Developer::Dashboard::EnvAudit;

my $entry = Developer::Dashboard::EnvAudit->key('FOO');
my $all   = Developer::Dashboard::EnvAudit->keys;

DESCRIPTION

This module records which dashboard-managed env file supplied each effective environment variable so runtime code, custom commands, and skill commands can inspect where a value came from after layered env loading has completed.

PURPOSE

This module is the runtime audit trail for env loading. Read it when you need to know which file supplied an effective environment key after the DD-OOP-LAYERS env chain and any skill-local env files have been applied.

WHY IT EXISTS

It exists because env files can now come from multiple runtime layers and skill roots. Without a stable audit inventory, contributors and runtime commands would have to guess which layer won for a given key.

WHEN TO USE

Use this module when a command, hook, or runtime helper needs to explain where an env key came from, or when tests need to verify that the deepest participating layer really supplied the winning value.

HOW TO USE

Call Developer::Dashboard::EnvAudit->key('FOO') to inspect one key, or Developer::Dashboard::EnvAudit->keys to retrieve the full recorded inventory. The module also mirrors the audit inventory into DEVELOPER_DASHBOARD_ENV_AUDIT so exec'd child processes can inspect the same provenance.

WHAT USES IT

It is used by dashboard env loading, custom commands, skill commands, and regression tests that verify layered env precedence and env provenance reporting.

EXAMPLES

Example 1:

my $entry = Developer::Dashboard::EnvAudit->key('DATABASE_URL');

Returns the effective value and source file for one env key when dashboard loaded it from a managed env file.

Example 2:

my $keys = Developer::Dashboard::EnvAudit->keys;

Returns the full effective env audit inventory keyed by environment variable name.

Example 3:

Developer::Dashboard::EnvAudit->clear;

Clears the current process audit state before a fresh env-loading pass.