<search function="cpan">
  <name>Comprehensive Perl Archive Network</name>
  <description>
    Search CPAN for Perl software. Searches for modules by default.<br/>
    <div class="helpboxDescLabels">Switches:</div>
  	<table class="helpboxDescTable">
  		<tr><td>/author</td><td> - </td><td>Search for authors.</td></tr>
  		<tr><td>/distribution</td><td> - </td><td>Search for distributions.</td></tr>
      <tr><td>/documentation</td><td> - </td><td>Search for distribution documentation.</td></tr>
	  <tr><td>/new</td><td> - </td><td>View recent additions to CPAN.</td></tr>
   	</table>
    <div class="helpboxDescLabels">Example:</div>
    <table class="helpboxDescTable">
  		<tr><td>cpan wrap</td></tr>
  		<tr><td>cpan wall /author</td></tr>
		<tr><td>cpan /new </td></tr>
  	</table>
  </description>
  <category>Computers<category>Programming</category></category>
  <link>http://search.cpan.org/</link>
  <contributor>Monty Scroggins, Ryan Edwards</contributor>
  
  <form name="cpanf"
        action="http://search.cpan.org/search"
        method="get">
    <input type="hidden" name="query"/>
    <input type="hidden" name="mode" value="module"/>
  </form>
  
  <script><![CDATA[
    function cpan(q)
    {
      var args = parseArgs(q, "author, distribution, documentation, new");
      
      if( nullArgs("cpan", q) )
        return false;
      else if( args.switches.length == 1 )
      {
        switch( args.switches[0].name )
        {
          case "author": document.cpanf.mode.value = "author"; break;
          case "distribution": document.cpanf.mode.value = "dist"; break;
          case "documentation": document.cpanf.mode.value = "doc"; break;
          case "new": openSearchWindow("http://search.cpan.org/recent"); return;
        }
        document.cpanf.query.value = args.q;
        submitForm(cpanf);
      }
      else if( args.switches.length > 1 )
        nullArgs("cpan","?");
      else
      {
        document.cpanf.mode.value = "module"
        document.cpanf.query.value = args.q;
        submitForm(cpanf);
      }
    }
  ]]></script>

  <copyright>
	Copyright (c) 2002 David Bau
	Distributed under the terms of the
	GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  </copyright>
</search>
