Skip to content

Instantly share code, notes, and snippets.

@renormalist
Created March 16, 2014 13:26
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 renormalist/9583195 to your computer and use it in GitHub Desktop.
Save renormalist/9583195 to your computer and use it in GitHub Desktop.
# Approaching the metacpan API with DPath:
# example from https://github.com/CPAN-API/cpan-api/wiki/API-docs extended:
curl -s -XPOST http://api.metacpan.org/v0/author/SCHWIGON?join=release -d '
{
"query": {
"bool": {
"should": [{
"term": {
"release.status": "latest"
}
}]
}
}
}' | dpath -o flat //distribution
# reveals this list:
Bundle-SCHWIGON
Bundle-PerlFormance
Benchmark-Perl-Formance-Cargo
Class-MethodMaker
Data-DPath
Task-BeLike-SCHWIGON
Benchmark-Perl-Formance
Config-INI-Serializer
App-Prove-Plugin-Idempotent
Pod-Weaver-PluginBundle-SCHWIGON
Acme-Rautavistic-Sort
Clarity-XOG-Merge
App-Bootstrap-Perl
Net-SSH-Perl
Object-Tiny-RW
Test-TAPv13
Test-Fixture-DBIC-Schema
AAAA-Mail-SpamAssassin
TAP-DOM
App-DPath
WWW-TWikiClient
Linux-Personality
Dist-Zilla-PluginBundle-SCHWIGON
Task-PerlFormance
LockFile-Simple
TAP-DOM-Waivers
Bash-Completion-Plugins-pinto
TAP-Harness-Archive
Test-Mock-Test
PDF-FDF-Simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment