From: Nicholas Clark Date: Sun, 9 Aug 2009 08:16:44 +0000 (+0100) Subject: Inline _seq_dir_rules(), as it is now used in only one place. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc279e463ddb1765ee76b9e5d84a0c7545544bbe;p=p5sagit%2Fp5-mst-13.2.git Inline _seq_dir_rules(), as it is now used in only one place. --- diff --git a/t/harness b/t/harness index 3441112..c2fbbee 100644 --- a/t/harness +++ b/t/harness @@ -55,19 +55,6 @@ sub _populate_hash { return map {$_, 1} split /\s+/, $_[0]; } -# Generate T::H schedule rules that run the contents of each directory -# sequentially. -sub _seq_dir_rules { - my @tests = @_; - my %dir; - for (@tests) { - s{[^/]+$}{\*}; - $dir{$_}++; - } - - return { par => [ map { { seq => $_ } } sort keys %dir ] }; -} - sub _extract_tests; sub _extract_tests { # This can probably be done more tersely with a map, but I doubt that it @@ -215,7 +202,17 @@ if (@ARGV) { push @tests, @last; - push @seq, _seq_dir_rules @last; + # Generate T::H schedule rules that run the contents of each directory + # sequentially. + { + my %dir; + for (@last) { + s{[^/]+$}{\*}; + $dir{$_}++; + } + + push @seq, { par => [ map { { seq => $_ } } sort keys %dir ] }; + } $rules = { seq => \@seq }; }