NAME
PSA::Cache::Entry - an entry in a PSA::Cache
SYNOPSIS
my $entry = PSA::Cache::Entry->new
DESCRIPTION
t.b.c.
ATTRIBUTES
- filename
-
The filename of the entry (string)
- cwd
-
The working directory to change to when running this sub
- error
-
Contains the error string from compilation/run/etc
- size
- mtime
- owner
-
Vital statistics to check for a new version of the source file
- code
-
A closure to call to run this entry
- last_used
-
The time() when this function was last called.
METHODS
preprocess
compile(\$script)
Force a compilation of the source file (the contents of which are passed as the argument), returns true or croaks with compilation error/warning/file not found/etc.
Note that for the compile, the cwd attribute is not used. That is because it is not usually what you want, I think.
load
Read a file in from disk. You probably don't want to overload this method; overload preprocess instead.
load_and_compile
Read a perl script in and compile it
update
Makes an entry current; that is, reloads it if has changed
dirty($stat)
Given some stat information, will mark self as dirty if it's newer than ourself
run( @argument_list)
Runs a cache entry and returns its return
errors
An alias for the get_error() method.