Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl6
use v6.c;
sub MAIN(Str $module) {
my $cu = $*REPO.need(CompUnit::DependencySpecification.new(:short-name($module)));
say "Dist: " ~ $cu.repo.prefix.child('dist/' ~ $cu.distribution.dist-id);
say "Source: " ~ $cu.repo.prefix.child('sources/' ~ $cu.distribution.meta<provides>{$module}.values[0]<file>);
}