NAME

App::CriticDB::DB::Index::Id - Store redundant strings as prefixed IDs

VERSION

Version 0.0.3

SYNOPSIS

use App::CriticDB::DB::Index;
my $idx=App::CriticDB::DB::Index->new(
  values=>'id',
  prefix=>'p:',
);
my $one=$idx->upsert('one');
my $two=$idx->upsert('two');
print $idx->value($two);

DESCRIPTION

Literal strings are given auto-increasing numeric IDs and stored with a prefix. Value lookup returns the original value for prefix:id strings, or the literal value as fallback.

AUTHORS

Brian Blackmore (brian@mediaalpha.com).

COPYRIGHT

Copyright (c) 2025--2035, MediaAlpha.com.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License Version 3 as published by the Free Software Foundation.