I’m trying to install MooseX::App::Cmd 0.30 (the latest version) on my system:

but the test t/basic.t fails. I tracked down the error, but it turns out to be one I can reproduce independently:

1:40 >p5u v File::Temp File::Spec File::Temp C:\Perl\Strawberry\strawberry-perl-5.20.2.1-64bit-PDL\perl\lib +\File\Temp.pm: 0.2304 File::Spec C:\Perl\Strawberry\strawberry-perl-5.20.2.1-64bit-PDL\perl\lib +\File\Spec.pm: 3.48_01 1:40 >perl -MFile::Temp=tempfile -wE "my $fh = tempfile();" 1:40 >perl -T -MFile::Temp=tempfile -wE "my $fh = tempfile();" Error in tempfile() using template \XXXXXXXXXX: Could not create temp +file \97XyuKSMER: Permission denied at -e line 1. 1:40 >

(This is the same error message I get from basic.t.) Apparently File::Temp encounters a permission problem when running in taint mode (-T) on my system. The module documentation has only this to say about taint checks:

Taint mode
If you need to run code under taint mode, updating to the latest File::Spec is highly recommended.

— and I have the latest version (3.48_01) of File::Spec installed.

Which leaves me with these questions:

  1. Is File::Temp::tempfile() supposed to fail under taint mode in Windows? If so, is this documented anywhere? If not, is this a problem other monks have encountered?

  2. If it is supposed to fail, how is it that the CPAN Testers Matrix for MooseX-App-Cmd 0.30 shows a pass for Perl version 5.20.2 under mswin32?

Thanks for your help,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,


In reply to File::Temp::tempfile() fails under taint mode by Athanasius

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.