Created
December 28, 2016 19:40
-
-
Save bduggan/6c024855ee76bf3228a3d04f245d63a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use v6.c; | |
sub MAIN(Str $module) { | |
my $cu = $*REPO.need(CompUnit::DependencySpecification.new(:short-name($module))); | |
say $cu.distribution.prefix.child('sources/' ~ $cu.repo-id).path; | |
} | |
=begin pod | |
module-source.p6 | |
Given the name of a module, display the file containing the source code. | |
Example: | |
module-source.p6 JSON::Fast | |
=end pod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment