-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update perlfaq4.pod to use fc for safe lowercase comparisons #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth a brief explanation on why you'd use fc
(case folding) rather than lc
?
e.g. something like:
"Note - you'll often see code which uses lc
instead, e.g. lc $a cmp lc $b
- whilst that will work, it can be tripped up by certain Unicode characters, and fc()
, added in 5.16, should be preferred."
and probably also a note that fc()
is only available if you've explicitly enabled it with feature
, or you've said use v5.16;
or higher? Otherwise, someone following this who only said use strict
or is updating legacy code with no version dep will just get tripped up. e.g. the note from fc
's entry in perlfunc
:
fc is available only if the "fc" feature is enabled or if it is prefixed with CORE::. The "fc" feature is enabled automatically with a use v5.16 (or higher) declaration in the current scope.
Note that fc() is a v5.16 features.
New version looks good to me. I say ship it. |
Are we expecting the Travis checks to complete? It looks like I don't have permission to skip them and merge. |
lib/perlfaq4.pod
Outdated
might be affected by your locale settings). The output list has the keys | ||
in ASCIIbetical order. Once we have the keys, we can go through them to | ||
create a report which lists the keys in ASCIIbetical order. | ||
keys to the sort function which then compares them strings. The output list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"compares them strings" -> "compares them as strings"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that without "use locale", the comparison order may be better described as ASCIIbetical, and not how one would expect locale-based string comparisons. Not that this answer necessarily needs to detail that.
thanks, just released! |
No description provided.