Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Sort::Key::Natural sorting discrepancy

by 1nickt (Canon)
on Nov 01, 2017 at 14:01 UTC ( [id://1202526]=note: print w/replies, xml ) Need Help??


in reply to Re: Sort::Key::Natural sorting discrepancy
in thread Sort::Key::Natural sorting discrepancy

Hi salva,

Thanks for clarifying. Now that I know from your follow-up what the truth is, I can discern it in the docs. However, I humbly submit that the doc could be clearer.

I misread the existing doc and concluded (encouraged in the wrong conclusion by the OP's code) that the string was split only on the underscores etc. (i.e.: 'boundaries' == 'underscores, etc.'). That's mostly my fault, for only seeing what I thought I was looking for, but here's a suggestion: place next to each other the descriptions of the two ways in which the string could be split, and highlight that alpha words and numbers are different, not a group:

"Under natural sorting, strings are split at word and number boundaries, and the resulting ... "

Possibly better as:

"Under natural sorting, strings are split at boundaries between words and numbers and at non-alphanumeric characters (see below), and the resulting ..."

Let me know if a patch / PR would be helpful, if you think this would be an improvement.

Thanks for all you do for Perl!


The way forward always starts with a minimal test.
  • Comment on Re^2: Sort::Key::Natural sorting discrepancy

Replies are listed 'Best First'.
Re^3: Sort::Key::Natural sorting discrepancy
by salva (Canon) on Nov 01, 2017 at 16:44 UTC
    Following your advice, I have changed the description on the development version of the module.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1202526]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-24 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found