Created
February 18, 2011 22:02
-
-
Save masak/834500 to your computer and use it in GitHub Desktop.
A sort of mini-tote until we have the real thing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 ""; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment