diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-07-30 21:41:14 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-07-30 21:41:14 +0100 |
commit | 8cf77941f2751a20a52ac4bbbcff354f82ac4c91 (patch) | |
tree | 94860e65f50f3425d10facd230b3f79336b03671 /Porting/Maintainers.pm | |
parent | ee56566fc6aeac4fd679bd70846592145de67881 (diff) | |
download | perl-8cf77941f2751a20a52ac4bbbcff354f82ac4c91.tar.gz |
Try longst prefixes first, else lib/CPAN may match lib/CPANPLUS/... and similar.
Diffstat (limited to 'Porting/Maintainers.pm')
-rw-r--r-- | Porting/Maintainers.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Porting/Maintainers.pm b/Porting/Maintainers.pm index 5cc9ebdff0..e5dde3c429 100644 --- a/Porting/Maintainers.pm +++ b/Porting/Maintainers.pm @@ -220,13 +220,19 @@ sub files_to_modules { if (@ToDo) { # Try prefix matching. + # Need to try longst prefixes first, else lib/CPAN may match + # lib/CPANPLUS/... and similar + + my @OrderedModuleByPat + = sort {length $b <=> length $a} keys %ModuleByPat; + # Remove trailing slashes. for (@ToDo) { s|/$|| } my %ToDo; @ToDo{@ToDo} = (); - for my $pat (keys %ModuleByPat) { + for my $pat (@OrderedModuleByPat) { last unless keys %ToDo; if (-d $pat) { my @Done; |