but I can't see how to change that path in File::Cache.
Both File::Cache and Cache::FileCache use the tmpdir() routine from File::Spec. If you weren't running in taint mode, you could simply set the environment variable TMPDIR, but in taint mode, the variable is ignored. So, a quick hack around this would be to monkey patch Cache::FileCache's _Get_Temp_Directory() routine:
use Cache::FileCache; { no warnings 'redefine'; sub Cache::FileCache::_Get_Temp_Directory { return File::Spec->_tmpdir( '/home/username/tmp' ); } }
The directory must exist, i.e. it isn't created by the call. Also note the underscore in _tmpdir. This is the routine which is normally (internally) called like this $self->_tmpdir( $ENV{TMPDIR}, "/tmp" );
In reply to Re: Merlyn's Basic Cookie Management (1)
by Anonyrnous Monk
in thread Merlyn's Basic Cookie Management (1)
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |