Catmandu::DirectoryIndex::UUID(3pm)

Catmandu::DirectoryIndex::UUID3pm

A uuid based path translator

Usage

    use Catmandu::DirectoryIndex::UUID;
    my $p = Catmandu::DirectoryIndex::UUID->new(
        base_dir => "/data"
    );
    # Returns mapping like { _id  => "9A581C80-1189-11E8-AB6D-46BC153F89DB", "/data/9A5/81C/80-/118/9-1/1E8/-AB/6D-/46B/C15/3F8/9DB" }
    # Can be undef
    my $mapping = $p->get("9A581C80-1189-11E8-AB6D-46BC153F89DB");
    # Create path and return mapping
    my $mapping = $p->add("9A581C80-1189-11E8-AB6D-46BC153F89DB");
    # Catmandu::DirectoryIndex::Number is a Catmandu::Iterable
    # Returns list of records: [{ _id => 1234, _path => "/data/000/001/234" }]
    my $mappings = $p->to_array();

Methods

new( base_dir => $base_dir )

Create a new Catmandu::DirectoryIndex::UUID with the following configuration parameters:

base_dir

See Catmandu::DirectoryIndex

Limitations

The keys in this directory can only be UUID identifiers.

Inherited methods

This Catmandu::DirectoryIndex::Number implements:

Catmandu::DirectoryIndex

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

From libcatmandu-filestore-perl 1.16-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.