This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
change manisort to produce a more intuitive order
authorYves Orton <demerphq@gmail.com>
Tue, 21 Jun 2016 07:07:48 +0000 (09:07 +0200)
committerYves Orton <demerphq@gmail.com>
Wed, 22 Jun 2016 16:21:33 +0000 (18:21 +0200)
commit3dfcef7e97bf1b516f2ff2b33a39a1fd2d816236
treee7b694c75f1161ff3b72e9c39867afab8daf8f6a
parent8bf4c4010cc474d4000c2a8c78f6890fa5f1e577
change manisort to produce a more intuitive order

Dictionary sort order on filenames is very counter-intuitive, and
produces surprising sort orders.

What this patch does is sort things so that the following should
always be true:

1. Case insensitive textual order
   Eg: Foo and foo and FOO should sort together in ascibetical order

2. Shorter dirs go before longer dirs with a common prefix
   Eg: lib/Foo/ should go before lib/Foo-Thing/

3. Base filename goes before dir of the same name
   Eg: lib/Foo.pm should sort before lib/Foo/Bar.pm

This also refactors the MANIFEST sort code in Porting/manisort and
Porting/pod_rules.pm files into Porting/pod_lib.pl
MANIFEST
Porting/manisort
Porting/pod_lib.pl
Porting/pod_rules.pl