From 5fcec77c7f7c634dd22c460f26d8fe7edaa87a56 Mon Sep 17 00:00:00 2001 From: Florian Ragwitz Date: Fri, 25 Mar 2011 16:30:58 +0100 Subject: Make Porting/Maintainers honour EXCLUDED --- Porting/Maintainers.pm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Porting/Maintainers.pm') 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); } -- cgit v1.2.1