Created
February 1, 2019 09:44
-
-
Save ufobat/a3e5683422640cf54f8ff2bf1898b4d7 to your computer and use it in GitHub Desktop.
This file contains 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
use v6.c; | |
use JSON::Fast; | |
use LibCurl::HTTP :subs; | |
sub MAIN( | |
Str :$url = 'https://ecosystem-api.p6c.org/projects1.json', | |
Str :$file, | |
) { | |
my @modules; | |
if $file and $file.IO.e { | |
@modules = slip from-json($file.IO.slurp) | |
} elsif $url { | |
@modules = slip jget($url); | |
} else { | |
die; | |
} | |
for @modules { | |
say .<name>, ' -> ', .<version> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment