public
Last active

A sort of mini-tote until we have the real thing

  • Download Gist
mini-tote.pl
Perl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#! /usr/bin/env perl6
use v6;
 
sub find($root, $p) {
sub f($dir) {
for dir($dir) -> $file {
given "$dir/$file".IO {
when .f { take $_ if $file ~~ $p }
when .d { f .path }
}
}
}
 
gather f $root;
}
 
my @pms = find("lib", /\.pm$/);
my @ts = find("t", /\.t$/);
 
loop {
say '' for ^40;
run "prove -v -e perl6 @ts».path.sort()";
 
my %c = (@pms, @ts)».path Z=> (@pms, @ts)».changed;
sleep .5 until grep { .changed after %c{.path} }, @pms, @ts;
 
say "";
}
mini-tote.sh
Shell
1 2 3 4 5 6
perl6 -e 'sub find($root, $p) { sub f($dir) { for dir($dir) -> $file { given
"$dir/$file".IO { when .f { take $_ if $file ~~ $p }; when .d { f .path } }
} }; gather f $root }; my @pms = find("lib", /\.pm$/); my @ts = find("t",
/\.t$/); loop { say '' for ^40; run "prove -v -e perl6 @ts».path.sort()"; my
%c = (@pms, @ts)».path Z=> (@pms, @ts)».changed; sleep .5 until grep {
.changed after %c{.path} }, @pms, @ts; say "" }

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.