NAME

DiaColloDB::Temp::Hash - DiaColloDB: temporary hashes

SYNOPSIS

##========================================================================
## PRELIMINARIES

use DiaColloDB::Temp::Hash;

##========================================================================
## Overrides

$tied = TIEHASH($classname, $file, %opts);
undef = utf8_filter_fetch;
undef = utf8_filter_store;
undef = $tied->DESTROY();

##========================================================================
## DiaColloDB::Temp API

undef = $obj->cleanup();

DESCRIPTION

DiaColloDB::Temp::Hash provides a simple tie() interface to large temporary hashes stored on disk.

Globals

Variable: @ISA

DiaColloDB::Temp::Hash inherits from DB_File and DiaColloDB::Temp.

Variable: %TMPFILES

stores temporary filenames keyed by stringified object; used by cleanup().

Overrides

TIEHASH
$tied = TIEHASH($classname, $file, %opts);

Create a (temporary) hash using DB_File. %opts, %$tied:

(
 ##-- DB_File options
 flags => $flags,   ##-- DB_File flags; default=O_RDWR|O_CREAT|O_TRUNC
 mode => $mode,     ##-- DB_File mode; default=(0666 & ~umask)
 type => $type,     ##-- DB_File type; default=$DB_File::DB_BTREE
 utf8keys => $bool, ##-- if true, keys will be stored as utf8 (default=false)
 utf8vals => $bool, ##-- if true, values will be stored as utf8 (default=false)
 utf8 => $bool,     ##-- alias for utf8keys=>$bool, utf8vals=>$bool
 ##
 ##-- local options
 UNLINK => $bool,   ##-- if unspecified or true, file will be unlinked on DESTROY
)
utf8_filter_fetch
undef = utf8_filter_fetch;

DB_File fetch-filter suitable for use with UTF-8 string values.

utf8_filter_store

DB_File store-filter suitable for use with UTF-8 string values.

DESTROY
undef = $tied->DESTROY();

destructor calls cleanup()

DiaColloDB::Temp API

cleanup
undef = $obj->cleanup();

unlink temp files (only if 'temp' attribute is set)

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::Temp::Array(3pm), DiaColloDB::Temp::Vec(3pm), DiaColloDB::Temp(3pm), DiaColloDB(3pm), perl(1), ...