table of contents
Catmandu::DirectoryIndex::UUID(3pm) | User Contributed Perl Documentation | Catmandu::DirectoryIndex::UUID(3pm) |
NAME¶
Catmandu::DirectoryIndex::UUID - A uuid based path translator
SYNOPSIS¶
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:
SEE ALSO¶
Catmandu::DirectoryIndex
2025-01-17 | perl v5.40.0 |