Wilson Snyder > Make-Cache-1.051 > Make::Cache::Runtime

Download:
Make-Cache-1.051.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 1.051   Source  

NAME ^

Make::Cache::Runtime - Simple database of completion times

SYNOPSIS ^

   $string = format_time($seconds, $true_to_including_hours);
   Make::Cache::Runtime::write (key=>$key,
                         persist=>{testing_persistence=>1},
                         );
   my $persistref = Make::Cache::Runtime::read (key=>'make::runtime testing',);

DESCRIPTION ^

Make::Cache::Runtime allows for storing and retrieving persistent state, namely expected runtime of gcc and tests.

Data is stored in a global directory, presumably under NFS mount across all systems. While this does not allow atomic access to files, it does provide fast, catchable access to the database.

METHODS ^

cache_dir

Return the default directory name for the cache. With optional argument, set the cache directory name. Defaults to OBJCACHE_RUNTIME_DIR.

$string = format_time($seconds, $true_to_including_hours);

Return the time in seconds as a string in MM:SS format. With true second argument, return as HH:MM:SS.

write (key=>$key, persist=>$ref);

Hash the key, and write a database entry file with a copy of the data in the persist reference. With dir=> named parameter, use database in that directory. Note to prevent problems between different versions of perl, you may want to include the Perl version number in the key hash.

my $ref = read (key=>$key);

Return a object reference for the data stored under the given key, or undef if not found. With dir=> named parameter, use database in that directory.

dump()

Print a summary of the runtime database for debugging. With dir=> named parameter, use database in that directory.

FILES ^

/usr/local/common/lib/runtime Default for cache_dir()

ENVIRONMENT ^

OBJCACHE_RUNTIME_DIR

Specifies the directory containing the runtime database. Defaults to /usr/local/common/lib/runtime.

DISTRIBUTION ^

The latest version is available from CPAN and from http://www.veripool.org/.

Copyright 2000-2009 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.

AUTHORS ^

Wilson Snyder <wsnyder@wsnyder.org>

SEE ALSO ^

objcache, Make::Cache