This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[UTIL] mconfig: don't rely on directory order
authorAaron Crane <arc@cpan.org>
Sat, 23 Apr 2016 10:30:06 +0000 (11:30 +0100)
committerAaron Crane <arc@cpan.org>
Sat, 23 Apr 2016 10:51:14 +0000 (11:51 +0100)
bin/mconfig

index 97c23f4..0a49a38 100755 (executable)
@@ -245,7 +245,7 @@ sub units_path {
        print "Locating in $MC/$dir...\n" if $main'opt_v;
        @contents = readdir DIR;                        # Slurp the whole thing
        closedir DIR;                                           # And close dir, ready for recursion
-       foreach (@contents) {
+       foreach (sort @contents) {
                next if $_ eq '.' || $_ eq '..';
                if (/\.U$/) {                                   # A unit, definitely
                        ($unit_name) = /^(.*)\.U$/;