in reply to Re: File::Temp::tempfile() fails under taint mode
in thread File::Temp::tempfile() fails under taint mode

This sounds like a bug report.

Yes, but I’m still not clear on whether the bug lies in the t/basic.t test for MooseX::App::Cmd, or in the behaviour of File::Temp in taint mode on my system?

Thanks,

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

Replies are listed 'Best First'.
Re^3: File::Temp::tempfile() fails under taint mode
by Discipulus (Canon) on Apr 09, 2015 at 07:16 UTC
    If can be handy it fails on many Strawberry flavours, with different File::Temp version.
    -T -MFile::Temp=tempfile -wE "use Config; print qq(Perl $^V on $^O arc +h $Config{archname} File::Temp v. $File::Temp::VERSION\n);my $fh = te +mpfile();" ----------------------------------------······· | Error in tempfile() using \XXXXXXXXXX: Could not create temp file | \A3pfFkxOIt: Permission denied at -e line 1 | Perl v5.14.2 on MSWin32 arch MSWin32-x86-multi-thread File::Temp v +. 0.22 -------------------------------------------------------------------- +---······· ----------------------------------------······· | Error in tempfile() using template \XXXXXXXXXX: Could not create te +mp file | \tIFifxB347: Permission denied at -e line 1. | Perl v5.20.0 on MSWin32 arch MSWin32-x86-multi-thread-64int File:: +Temp v. | 0.2304 -------------------------------------------------------------------- +---······· ----------------------------------------······· | Error in tempfile() using \XXXXXXXXXX: Could not create temp file | \dr3rzHf4Yp: Permission denied at -e line 1. | Perl v5.16.2 on MSWin32 arch MSWin32-x64-multi-thread File::Temp v +. 0.22 -------------------------------------------------------------------- +---·······

    ..while it runs OK on an ancient 5.8 ActiveState
    L*
    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re^3: File::Temp::tempfile() fails under taint mode
by kennethk (Abbot) on Apr 09, 2015 at 14:42 UTC

    As there is no problem with my running the test (including your command line code), but on your system you have isolated it to File::Temp with taint, I would say it is a bug for File::Temp. It is worth (as Discipulus points out) testing this across other Strawberry installs, particularly 5.18.


    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.