Skip to content

Instantly share code, notes, and snippets.

@teodozjan
Forked from niner/module-source.pl
Created January 27, 2016 11:35
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 teodozjan/66c3e25abe626cc70444 to your computer and use it in GitHub Desktop.
Save teodozjan/66c3e25abe626cc70444 to your computer and use it in GitHub Desktop.
#!/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.id);
say "Source: " ~ $cu.repo.prefix.child('sources/' ~ $cu.distribution.provides{$module}.values[0]<file>);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment