I believe the tests for Archive::Zip utilize File::Temp, which discovers the tempdir using File::Spec. File::Spec suggests you can hint an alternate tempdir by setting the TMPDIR environment variable. Proof of concept:

  1. In your homedir create a directory named ~/tmp
  2. Execute TMPDIR=~/tmp perl -MFile::Spec::Functions=tmpdir -E 'say tmpdir()'

You will see your alternate tempdir returned. This is what Archive::Zip should actually use.

So you could possibly do this:

TMPDIR=~/tmp cpanm Archive::Zip

And if that doesn't work, built it yourself by downloading the archive from CPAN, extracting it to a directory, then:

perl Makefile.PL make TMPDIR=~/tmp make test make install

...or just cpanm -f, but those tests for linkdir do exist for a reason. ;)


Dave


In reply to Re: cpan problems when /tmp and /var are existing symbolic links by davido
in thread cpan problems when /tmp and /var are existing symbolic links by PhilipS

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.