NAME
DiaColloDB::EnumFile::FixedLen - diachronic collocation db, symbol<->integer enum, fixed-length symbols
DESCRIPTION
DiaColloDB::EnumFile::FixedLen is a DiaColloDB::EnumFile subclass for symbol<->integer mappings using fixed-length symbols via direct disk I/O. It inherits from DiaColloDB::EnumFile.
new() %args, object structure:
##-- EnumFile: basic options
base => $base, ##-- database basename; use files "${base}.fsx", "${base}.fix", "${base}.hdr"
perms => $perms, ##-- default: 0666 & ~umask
flags => $flags, ##-- default: 'r'
pack_i => $pack_i, ##-- integer pack template (default='N')
#pack_o => $pack_o, ##-- file offset pack template (default='N') ; OVERRIDE:unused
#pack_l => $pack_l, ##-- string-length pack template (default='n'); OVERRIDE:unused
pack_s => $pack_s, ##-- string pack template for text i/o; OVERRIDE:REQUIRED (default='Nn')
size => $size, ##-- number of mapped symbols, like scalar(@i2s)
utf8 => $bool, ##-- true iff strings are stored as utf8 (used by re2i()) OVERRIDE: unused
##
##-- EnumFile: in-memory construction
s2i => \%s2i, ##-- maps symbols to integers
i2s => \@i2s, ##-- maps integers to symbols
dirty => $bool, ##-- true if in-memory structures are not in-sync with file data
loaded => $bool, ##-- true if file data has been loaded to memory
shared => $bool, ##-- true to avoid closing filehandles on close() or DESTROY() (default=false)
##
##-- EnumFile: pack lengths (after open())
len_i => $len_i, ##-- packsize($pack_i)
#len_o => $len_o, ##-- packsize($pack_o) ; OVERRIDE: unused
#len_l => $len_l, ##-- packsize($pack_l) ; OVERRIDE: unused
len_s => $len_s, ##-- packsize($pack_s); OVERRIDE: new
len_sx => $len_sx, ##-- $len_s + $len_i ; OVERRIDE: new value
##
##-- EnumFile: filehandles (after open())
#sfh => $sfh, ##-- $base.es : OVERRIDE: unused
ixfh => $ixfh, ##-- $base.fix : [$i] => pack("${pack_s}", $s_with_id_i) : OVERRIDE: new extension, new format
sxfh => $sxfh, ##-- $base.fsx : [$j] => pack("${pack_s}${pack_i}", $s_with_sortorder_j_and_id_i, $i) : OVERRIDE: new extension, new format
AUTHOR
Bryan Jurish <moocow@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2015-2020 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
SEE ALSO
DiaColloDB::EnumFile::FixedMap(3pm), DiaColloDB::EnumFile(3pm), DiaColloDB(3pm), perl(1), ...