function makeSearchCommand( options ) {
  options.execute = function(directObject, modifiers) {
    var query = directObject.text;
    var urlString = options.url.replace("{QUERY}", query);
    Utils.openUrlInBrowser(urlString);
    CmdUtils.setLastResult( urlString );
  };

  options.takes = {"search term": noun_arb_text};

  if (! options.preview )
    options.preview = function(pblock, directObject, modifiers) {
      var query = directObject.text;
      var content = "Performs a " + options.name + " search";
    if(query.length > 0)
      content += " for <b>" + query + "</b>";
      pblock.innerHTML = content;
    };

  options.name = options.name.toLowerCase();
  options.homepage = "http://www.grok.in/ubiquity/perl.html";
  options.author = { name: "Siddhartha Reddy", email: "sids@grok.in"};
  options.license = "MPL";

  CmdUtils.CreateCommand(options);
}

makeSearchCommand({
    name: "perldoc",
    url: "http://perldoc.perl.org/search.html?q={QUERY}",
    description: "Searches http://perldoc.perl.org/ for the specified words. If you type in the name of any Perl standard term, this will directly take you to the perldoc page for that term.",
})

makeSearchCommand({
    name: "cpan",
    url: "http://search.cpan.org/search?query={QUERY}&mode=all",
    description: "Searchers http://search.cpan.org/ for the specified perl modules.",
})

makeSearchCommand({
    name: "monks",
    url: "http://www.perlmonks.org/?node={QUERY}",
    description: "Searchers http://search.cpan.org/ for the specified perl modules.",
})
