Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

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

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



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.com/.

Copyright 2000-2007 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 or the Perl Artistic License.


AUTHORS

Wilson Snyder <wsnyder@wsnyder.org>


SEE ALSO

objcache, the Make::Cache manpage

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy