Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created December 10, 2015 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfldex/d31705b4478c87eb3467 to your computer and use it in GitHub Desktop.
Save gfldex/d31705b4478c87eb3467 to your computer and use it in GitHub Desktop.
PROCESS::<$SCHEDULER> = ThreadPoolScheduler.new(initial_threads => 0, max_threads => 2);
my $source-dir = '../../doc/doc/';
sub MAIN () {
put await do start { .&parse-pod-file } for sort find-pod-files $source-dir;
}
sub find-pod-files ($dir) {
gather for dir($dir) {
take .Str if .extension ~~ rx:i/pod$/;
take slip find-pod-files $_ if .d;
}
}
sub parse-pod-file ($f) {
put "processing $f";
my $pod = (EVAL ($f.IO.slurp ~ "\n\$=pod"));
$pod.perl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment