The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version v4.00

  • Fixed occasional test failures in t/10_fsopen_fh_leak.t and t/11_sopen_fh_leak.t by avoiding the problem of trying to open a file with a pending delete. Also avoided similar possible test failures in t/06_fsopen_access.t, t/07_sopen_access.t and t/12_variables.pod.
  • Added support for the 'R', 'S', 'T' and 'D' characters in the mode string argument to fsopen(). These were added to the Microsoft C library function _fsopen() in Visual Studio 2012 (VC11), but we can support them regardless of which compiler is being used (except for Borland C++) since we are emulating the function now.
  • The functionality to automatically retry opening a file if it could not be opened due to a sharing violation now works for perls built with the Borland C++ compiler as a result of now emulating the _fsopen() and _sopen() functions. The known bug in various t\06_fsopen_access.t tests failing with Borland C++ is also resolved by the same change.
  • Rewrote most of the XS code to emulate, rather than directly expose, the Microsoft C library functions _fsopen() and _sopen().
    • This has been done using the Win32 API function CreateFile() and Perl's own exported win32_open_osfhandle() function so that the file descriptors thus opened are in the same C RTL DLL as that loaded by perl and hence work when imported into PerlIO. This change means that we can now support building this module with a different compiler to that which was used to build perl, something that previously failed because the Microsoft- specific _fsopen() and _sopen() functions (unlike standard stdio and lowio functions) are not redefined to call the versions in perl's C RTL DLL, and therefore opened file descriptors in a different C RTL DLL if this module was built by a compiler that used a different C RTL DLL.
    • It appears that using different compilers (and hence potentially different C RTL DLLs) is safe now that the potential problem in doing so has been removed, so the rudimentary checks on the compiler versions in Makefile.PL have been removed too. Note, however, that there is still a compatibility problem when building this module with Visual Studio .NET 2002/2003 (VC7) or earlier if your perl was built with Visual Studio 2005 (VC8) or later: see [perl #121448]. However, that is quite an unlikely scenario, so it is not worth checking for in Makefile.PL.
  • Changed all PerlLIO_*() function calls to the corresponding lowio functions (and removed all PerlSIO_*() function calls, which should likewise have been the corresponding stdio functions): they should be redefined as necessary by perl's header files anyway, which is indeed the case in perl-5.8.1 and above, at least -- see the exchanges between myself and Jan Dubois on the "perl5-porters" mailing list, 04-05 Mar 2010, for more details on this.
  • Added $Trace to @EXPORT_OK as requested by Denby Angus <Denby.Angus@kisters.com.au>.
  • Uploaded source code to GitHub and included repository URLS in meta data.
  • Included META.json file in addition to META.yml.
  • Simplified Makefile.PL commands for making a new distribution archive.
  • Bumped minimum required ExtUtils::MakeMaker version to 6.66 to allow building with 64-bit perl (otherwise the build fails with errors about fakethr.h and perlsfio.h).
  • Reverted to plain old ExtUtils::MakeMaker for building, now that that's more fully maintained again. Module::Install has virtually died a death, and Module::Build is no better either. Require a fairly recent version (6.64) to ensure that all parameters used are supported, to save jumping through hoops to support earlier versions. (This should not be a problem since ExtUtils::MakeMaker 6.64 is easily installed into Perl 5.8.1 and above, that being the whole point of the new choice of minimum supported Perl version.)
  • Bumped minimum required Perl version from 5.6.0 to 5.8.1. This is in line with the minimum requirement of the "Perl Toolchain".

Modules

Open a file for shared reading and/or writing

Provides

in lib/Win32/SharedFileOpen.pm