develooper Front page | perl.perl5.porters | Postings from March 2021


Felipe Gasper
March 3, 2021 01:44
Message ID:
Hi all,

	I pushed a CPAN module today, Sys::Binmode, that auto-downgrades strings on their way to the OS in ops like exec and require. This works around the use of SvPV_nolen to convert SVs to C strings, achieving predictable output without requiring the Perl application to violate Perl’s internal string-encoding abstraction.

	While in Linux this makes total sense, someone pointed out that in Windows things are more complicated. Sys::Binmode doesn’t break anything in Windows Perl currently, but it apparently *would* break things if Windows Perl switched to functions like CreateDirectoryW rather than CreateDirectoryA, since then we’re not passing byte strings to the OS anymore.

	Now I wonder: which other OSes does Perl support that present such problems?

	Thank you!

-Felipe Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About