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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.