diff options
author | Florian Ragwitz <rafl@debian.org> | 2011-03-25 16:30:58 +0100 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2011-03-25 16:45:37 +0100 |
commit | 5fcec77c7f7c634dd22c460f26d8fe7edaa87a56 (patch) | |
tree | 247d50821d0908a95a679ecabefa4a84ee509624 /Porting/Maintainers.pm | |
parent | 903a3b77f384bfa30082a321a89426621011c0d0 (diff) | |
download | perl-5fcec77c7f7c634dd22c460f26d8fe7edaa87a56.tar.gz |
Make Porting/Maintainers honour EXCLUDED
Diffstat (limited to 'Porting/Maintainers.pm')
-rw-r--r-- | Porting/Maintainers.pm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Porting/Maintainers.pm b/Porting/Maintainers.pm index d44bb95ce6..7969af7dfd 100644 --- a/Porting/Maintainers.pm +++ b/Porting/Maintainers.pm @@ -22,7 +22,7 @@ use vars qw(@ISA @EXPORT_OK $VERSION); show_results process_options files_to_modules finish_tap_output reload_manifest); -$VERSION = 0.04; +$VERSION = 0.05; require Exporter; @@ -87,9 +87,22 @@ sub expand_glob { } @_; } +sub filter_excluded { + my ($m, @files) = @_; + + return @files + unless my $excluded = $Modules{$m}{EXCLUDED}; + + my ($pat) = map { qr/$_/ } join '|' => map { + ref $_ ? qr/\Q$_\E/ : $_ + } @{ $excluded }; + + return grep { $_ !~ $pat } @files; +} + sub get_module_files { my $m = shift; - return map { expand_glob($_) } get_module_pat($m); + return filter_excluded $m => map { expand_glob($_) } get_module_pat($m); } |