Skip to content

Conversation

@khwilliamson
Copy link
Contributor

Add example of how it handles numbers that aren't decimal positional.

I thought it would clarify things to expand and correct the flawed example pointed out in GH #23003.

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

Because these do not follow modern decimal positional notation, stringing more
than one of these together doesn't mean what you likely would think it means.
So, C<num> correctly returns C<undef> if you try. If you add a second
parameter to get returned to you the initial legal numeric length, it returns
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add a second parameter to get returned to you the initial legal numeric length it returns indicating that to get a numeric value you'd have to stop after just the first character in the string.

This is pretty clumsy.

Maybe:

If you request the length of the valid initial substring in this case, that length would be one, since only the first character represents a valid numeric value.

though I'm not entirely happy with that either.

Add example of how it handles numbers that aren't decimal positional.

I thought it would clarify things to expand and correct the flawed
example pointed out in GH Perl#23003.
Copy link
Contributor

@jkeenan jkeenan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add some unit tests to lib/Unicode/UCD.t (or some other file) to demonstrate the code added to the POD? (I couldn't find a .t file that contained a match for m/RUMI/t.)

@khwilliamson
Copy link
Contributor Author

This is a documentation PR only. I chose Rumi because I had recently researched it, and the details were fresh in my mind. There are tests for similar situations already in UCD.t. The ones for New Tai Lue, for example.

@jkeenan
Copy link
Contributor

jkeenan commented May 8, 2025

This is a documentation PR only. I chose Rumi because I had recently researched it, and the details were fresh in my mind. There are tests for similar situations already in UCD.t. The ones for New Tai Lue, for example.

Okay; once @tonycoz's concerns have been satisfied, this p.r. is good to go. Thanks.

@khwilliamson
Copy link
Contributor Author

khwilliamson commented May 18, 2025

I addressed those concerns

@khwilliamson khwilliamson merged commit ab01694 into Perl:blead May 18, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants