Protocol::HAP::Store::Memory(3p) Perl Library Manual Protocol::HAP::Store::Memory(3p)

Protocol::HAP::Store::Memory - the store contract over plain hashes

    use Protocol::HAP::Store::Memory;
    my $store = Protocol::HAP::Store::Memory->new;
    $store->save_pairing('controller-id', $ltpk, 1);
    my $pairings = $store->load_pairings;

This module is the reference implementation of the store contract that Protocol/HAP/Store.pod documents. The state lives in the object and dies with it: nothing persists.

Tests and embedders start here. A production host implements the same twelve methods over durable storage, including the rule that the mutating pairing methods increment the configuration number themselves.

"load_pairings" returns a copy. A caller that edits the result cannot bypass the increment rule of the mutating methods.

Protocol::HAP, Protocol/HAP/Store.pod

2026-08-18 OpenBSD