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

Re: Perl 7: Fix string leaks?

Thread Previous | Thread Next
Felipe Gasper
March 29, 2021 10:30
Re: Perl 7: Fix string leaks?
Message ID:

> On Mar 28, 2021, at 8:24 PM, Dan Book <> wrote:
> I would love if this was possible as the current behavior is certainly broken. However, it's also relied upon, and as you know, difficult to determine whether it's being relied upon incorrectly. So I cannot support this breakage, major version or not.
> I can only see this being feasible via a feature flag, for the moment.

A feature flag/pragma would be reasonable for the built-ins. (NB: Sys::Binmode started as a pragma; I moved it to CPAN per suggestion.) It would be another “use strict”, of course: a non-default that everyone is supposed to use.

For the typemap, though, if breaking existing distributions is unacceptable then some versioned syntax would be needed; i.e., XS modules would have to opt-in to the fix.

Short of that, though, maybe xsubpp should warn if people use the default char * or const char * mappings.

All of the above can happen with Perl 5, of course.

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