develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Should we hide private functions?

Thread Previous | Thread Next
Karl Williamson
June 14, 2022 16:32
Re: Should we hide private functions?
Message ID:
On 6/14/22 06:41, Tomasz Konojacki wrote:
> The current situation is that private non-static functions are callable
> from XS modules on all platforms *except Windows*. I have submitted a PR
> that makes them non-callable on almost all the other platfroms:
> It's a pretty major change and that PR hasn't received much attention,
> so I'm making this post to get your opinions.
> This change will likely cause some CPAN breakage. I imagine there will
> be three kinds of breakages:
> 1. Modules that call functions that shouldn't have been marked as
> private.
> 2. Modules that call private functions for no reason and can be easily
> patched to use public functions instead.
> 3. Modules that call private functions to accomplish something that
> can't be done with public APIs
> 1 & 2 are easily fixable. Number three may require us to either design
> new APIs or just expose the needed private APIs and call it a day.
> On #p5p, randir has expressed a concern that the breakage may be
> unacceptable. My opinion is that we're very early in the release cycle
> and we have plenty of time to deal with the potential fallout. Also, it
> can't be *that* big considering that most of CPAN works on Windows just
> fine.
> What does p5p think?

I concur with your analysis.  I've been waiting for this to be merged, 
and I think we should do it now, fixing things up as needed.

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