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

Should we hide private functions?

Thread Next
Tomasz Konojacki
June 14, 2022 12:42
Should we hide private functions?
Message ID:
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

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

What does p5p think?

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