Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 295 Bytes
use v6;
# Usage: perl6 add-test-stubs <file.t> ...
use Test::Ix;
for @*ARGS -> $file {
if ! $file ~~ :f {
warn "Could not find $file -- skipping";
next;
}
my $new-contents = inject-subs-in-file($file);
my $fh = open($file, :w);
$fh.print($new-contents);
}