Skip to content
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

perl_langinfo.h: Resume some assumptions #22650

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

Conversation

khwilliamson
Copy link
Contributor

To save some typing, I assumed that if a system had these glibc-only locale categories, that it would have all elements that comprise them. For example with LC_PAPER, the elements are the height and width of a piece of paper. It doesn't make any sense to have LC_PAPER without any dimensions available.

But Android has LC_PAPER without paper dimensions; the same with all the other elements in the glibc category extensions. See GH #22627.

I believe that means that these categories are useless on this platform.

But this commit now checks each element for existence individually; removing the assumption that if the category exists, the element must too.


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

To save some typing, I assumed that if a system had these glibc-only
locale categories, that it would have all elements that comprise them.
For example with LC_PAPER, the elements are the height and width of a
piece of paper.  It doesn't make any sense to have LC_PAPER without any
dimensions available.

But Android has LC_PAPER without paper dimensions; the same with all the
other elements in the glibc category extensions.  See GH Perl#22627.

I believe that means that these categories are useless on this platform.

But this commit now checks each element for existence individually;
removing the assumption that if the category exists, the element must
too.
@jkeenan
Copy link
Contributor

jkeenan commented Oct 9, 2024

This p.r. is failing one test in the initial "sanity check" CI run: ../ext/I18N-Langinfo/t/Langinfo.t

# Failed test 92 - Returns expected value('ISO') for _NL_IDENTIFICATION_TERRITORY at t/locale.t line 237
#      got ""
# expected "ISO"
../ext/XS-APItest/t/locale.t ......................................... 
Failed 1/106 subtests 
	(less 5 skipped subtests: 100 okay)

Reproduced on a local build of this p.r. Also, as I noted in a different pull request, at the end of 'make test_prep' I'm getting a log of build-time warnings.

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.

2 participants