NAME

Data::Shared::Registry - Inventory of the 39 Data-*-Shared dists for Data::Shared

SYNOPSIS

use Data::Shared::Registry ();
my $reg = Data::Shared::Registry::registry;
my $e = $reg->{hashmap};
# { key, dist, class, variants, path_class, verbs, push, pop, ... }

my @keys = Data::Shared::Registry::keys_list;   # 39 short names
my $r = Data::Shared::Registry::resolve_spec('buffer:i64');
# { entry, class => 'Data::Buffer::Shared::I64', load, ctor, variant }

DESCRIPTION

This module is the single source of truth that drives Data::Shared: mount-spec resolution, adapter selection, and generic verb translation all read it.

Each entry has: key (short mount spec name), dist, class (default class), optional load (module to require when variant classes live inside a base .pm), optional variants (name to {class, load, ctor}), path_class (map, set, queue, indexed, sketch or sync), verbs (generic verb to native method name or coderef receiving ($handle, $key, @args), or ($handle, @indices, @args) for indexed leaves), optional push/pop native method names, optional key_join (join remaining components with / to form the key), optional key_int (integer-addressed: a non-integer key croaks on every verb but exists), optional ctor (new by default; handle_only for PerfectHash), and freeze (whether the leaf supports freeze/new_readonly).

min_version records the validated backend version used as the supported minimum by the installer and runtime loader. Strict read-only opens also inspect the resolved class for its native constructor. immutable marks build-then-load backends.

A verb absent from verbs means "not honestly expressible generically"; the facade croaks and points at shared_call. A verb mapped to a coderef (e.g. BitSet set choosing set-vs-clear by value, SortedSet set as add(member, score), Intern set as intern) wraps the one place where sugar needs a decision.

FUNCTIONS

registry

Returns the hashref of all entries keyed by short name.

keys_list

Sorted list of the 39 short names.

entry_for_key($key), entry_for_class($class)

Lookups by short name or by Perl class (including variants).

resolve_spec($spec)

Resolves 'hashmap', 'hashmap:ii', a full class name, or any Data::* class (unknown classes resolve with entry undef, and Data::Shared dispatches them call-only) to {entry, class, load, ctor, variant}, or undef for unknown short specs. Short specs resolve case-insensitively to a lowercase key, and the returned variant is always lowercase.