NAME Tie::JournaledDir - tie hash to journaled style files in a directory. SYNOPSIS use Tie::JournaledDir; tie %db, 'Tie::JournaledDir', { dir => '/some/where' }; $db{ 'key' } = 'value'; untie %db DESCRIPTIONS tie hash by "Tie::JournaledDir" acceses some directory holding a lot of files. For example, the directory consists of files with numeric names. /some/where/998520336 /some/where/998520338 /some/where/998520340 /some/where/998520342 "Tie::JournaledFile" called from "Tie::JournaledDir" manipulates each file. "Tie::JournaledDir" has cache files in a directory. "Tie::JournaledDir" wraps "Tie::JournaledFile" over several files. It enables easy automatic expiration. METHODS new($args) $args = { dir => directory path, # mandatory unit => number (seconds), # optional limit => number (days), # optional }; At least you need to specify "dir" as the cache dir. "unit" is optional. It is a number (seconds) or keyword "day". "day" by default. "limit" is a number. It is the range of units to search. For example, $args = { dir => '/var/spool/ml/elena/var/db/message_id', unit => 'day', limit => 90, # search the last 90 days. }; TIEHASH, FETCH, STORE, FIRSTKEY, NEXTKEY standard hash functions. It uses "Tie::JournaledFile" in background. NOT tie() BASED METHODS get_all_values_as_hash_ref() return { key => values } for all keys. The returned value is HASH REFERECE for the KEY as follows: KEY => [ VALUE1, VALUE2, vlaue3, ]; not KEY => VALUE CODING STYLE See "http://www.fml.org/software/FNF/" on fml coding style guide. AUTHOR Ken'ichi Fukamachi COPYRIGHT Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. HISTORY Tie::JournaledDir first appeared in fml8 mailing list driver package. See "http://www.fml.org/" for more details.