Skip to content

Instantly share code, notes, and snippets.

@bentglasstube
Created April 30, 2015 15:01
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 bentglasstube/1b146706c31ce50f3eb3 to your computer and use it in GitHub Desktop.
Save bentglasstube/1b146706c31ce50f3eb3 to your computer and use it in GitHub Desktop.
Search metacpan for keywords from vim
#!/usr/bin/env perl
# in vim, :set keywordprg=perl-doc-lookup
use strict;
use warnings;
my $search = shift;
my $url = 'https://metacpan.org/';
if ($search =~ /::/) {
$url .= "pod/$search";
} else {
$url .= "search?q=$search";
}
exec $ENV{BROWSER}, $url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment