/lib/DDG/Spice/MetaCPAN.pm
https://github.com/pardocz/zeroclickinfo-spice · Perl · 28 lines · 22 code · 5 blank · 1 comment · 1 complexity · c2abe8dd2604cd83da6725845eedda0e MD5 · raw file
- package DDG::Spice::MetaCPAN;
- # ABSTRACT: Show a summary of the searched CPAN module.
- use DDG::Spice;
- primary_example_queries "metacpan WWW::DuckDuckGo";
- description "Searches CPAN modules";
- name "MetaCPAN";
- code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/MetaCPAN.pm";
- icon_url "/i/metacpan.org.ico";
- topics "programming", "sysadmin";
- category "programming";
- attribution github => ['https://github.com/ghedo', 'ghedo'],
- web => ['http://ghedini.me', 'Alessandro Ghedini'],
- github => ['https://github.com/dsteinbrunner', 'David Steinbrunner'];
- spice to => 'http://api.metacpan.org/v0/module/$1?callback={{callback}}';
- triggers startend => "cpan", "cpanm", "metacpan", "meta cpan";
- handle remainder => sub {
- if ($_) {
- $_ =~ s/-/::/g;
- return $_;
- }
- return;
- };
- 1;