Skip to content

Mark do_open(), do_openn() as internal, not public #23323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from

Conversation

khwilliamson
Copy link
Contributor

These undocumented functions have exactly 0 uses on CPAN.

do_open() is mentioned in 7 distributions. In all cases it is to #undef the macro name because it was polluting the distro's name space which has its own function named do_open().

  • This set of changes does not require a perldelta entry.

These undocumented functions have exactly 0 uses on CPAN.

do_open() is mentioned in 7 distributions.  In all cases it is to #undef
the macro name because it was polluting the distro's name space which
has its own function named do_open().
@tonycoz
Copy link
Contributor

tonycoz commented May 24, 2025

do_open() is used by the standard typemap, some CPAN modules use do_openn() File-Map, mod_perl, Linux-CDROM though I don't know how current any of those are.

@khwilliamson
Copy link
Contributor Author

khwilliamson commented May 24, 2025

cpan grep shows no uses of do_openn()

https://grep.metacpan.org/search?q=do_openn&qft=&qd=&qifl=ppport.h

And yet it does get called, as you said, in File::Map
https://metacpan.org/release/LEONT/File-Map-0.71/source/lib/File/Map.xs

Am I doing something wrong, or is metacpan search buggy?

@Leont
Copy link
Contributor

Leont commented May 24, 2025

Am I doing something wrong, or is metacpan search buggy?

If you select *.xs, *.c as the file extensions, four dists will show up: https://grep.metacpan.org/search?q=do_openn&qft=*.xs%2C+*.c&qd=&qifl=

@khwilliamson
Copy link
Contributor Author

That sounds like a bug. I want to do an unrestricted search, and yet it doesn't find it.

@tonycoz
Copy link
Contributor

tonycoz commented May 24, 2025

I have a local (bare) clone of https://github.com/metacpan/metacpan-cpan-extracted.git and I git grep that instead of using grep.metacpan.org (it's a lot faster, but 4.4GB disk space).

@Leont
Copy link
Contributor

Leont commented May 24, 2025

That sounds like a bug. I want to do an unrestricted search, and yet it doesn't find it.

I can't reproduce it anymore, but I did see it right when you posted. I guess it was just glitching or something? I've seen some other weird results today as well.

@khwilliamson
Copy link
Contributor Author

I have been getting randomly wrong results with the search, so will open a ticket against that.

@khwilliamson
Copy link
Contributor Author

khwilliamson commented May 27, 2025

It turns out that do_open is marked as binary-compatibility only, so, presuming that is correct, there is no need to mark that as internal.

And do_open6 and 'do_open_raw` are marked as experimental. Should that be removed from one or both of them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants