The tests used to create a temporary tree under a working directory.
But that does not work if that location is read-only:
$ perl t/01syntax.t
Uncaught exception from user code:
_Inline_01syntax.17483: Permission denied
BEGIN failed--compilation aborted at /usr/libexec/perl-Inline-C/t/TestInlineSetup.pm line 30.
Compilation failed in require at t/01syntax.t line 6.
BEGIN failed--compilation aborted at t/01syntax.t line 6.
Also the code tried hard to pick up a unique name to allow testing in
parallel. And then cleaning up when exiting.
This patch replaced that code with File::Temp. Not only it replaces
complex code, it also enables testing from a read only location
because File::Test utilizes a system-wide temporary path.
I cannot test it on Win32 platform. But I believe it should correctly
work there because the cleanup is performed when the File::Temp object
goes out of scope which should be after END block.
The tests used to create a temporary tree under a working directory. But that does not work if that location is read-only:
$ perl t/01syntax.t Uncaught exception from user code: _Inline_01syntax.17483: Permission denied BEGIN failed--compilation aborted at /usr/libexec/perl-Inline-C/t/TestInlineSetup.pm line 30. Compilation failed in require at t/01syntax.t line 6. BEGIN failed--compilation aborted at t/01syntax.t line 6.
Also the code tried hard to pick up a unique name to allow testing in parallel. And then cleaning up when exiting.
This patch replaced that code with File::Temp. Not only it replaces complex code, it also enables testing from a read only location because File::Test utilizes a system-wide temporary path.
I cannot test it on Win32 platform. But I believe it should correctly work there because the cleanup is performed when the File::Temp object goes out of scope which should be after END block.