PageRenderTime 42ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/DDG/Spice/MetaCPAN.pm

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