Subject: | Abysmal performance if built directory trees exist |
I've had this problem for ages, and I've usually gotten around it by calling
dzil clean
prior to
dzil perltidy
The issue however, is that it needlessly traverses all of the following and attempts to tidy them:
$PROJECTROOT/.build/* # Created when `dzil test` fails
$PROJECTROOT/Dist-Name-SOMEVERSION*/ # created after dzil build
There doesn't seem to be an obvious way to exclude traversal of these directories, and they're disposable, so any tidying that occurs there is wasted effort.
Not to mention, those directories have about 5x as many files as the source tree itself, so including those directories in perltidy means the more tests you run, or the more builds you let accumulate, the slower it gets.
Now granted, the second of these two might be hard to match against, because "distname-VERSION" is likely to be ambiguous.
I've been however reason ably successful in a similar tool here:
https://metacpan.org/source/KENTNL/Dist-Zilla-PluginBundle-Author-KENTNL-2.007000/utils/strip_eol.pl
Though on second thoughts, the ^[A-Z] should be expanded to ^[A-Za-z] , or something like that. It was just a convenient heuristic for me because I know that I will for sure start most dists with a capital letter.