Skip to content

Instantly share code, notes, and snippets.

@monken
Created June 6, 2011 12:29
Show Gist options
  • Save monken/1010160 to your computer and use it in GitHub Desktop.
Save monken/1010160 to your computer and use it in GitHub Desktop.

Introducing beta.metacpan.org - A better search for the CPAN

By mo on May 27, 2011 3:26 PM

I'm very excited to announce the front end for MetaCPAN: beta.metacpan.org. This is what you can expect from the new interface to the CPAN:

New uploads instantly available

New uploads to the CPAN are indexed within seconds. No more waiting for the new upload to appear on the search site. Check out /recent

Modern site layout

The page layout leverages the extra space you have on widescreen displays. Instead of having all the information in a top-down manner, the page's layout is made up of up to three columns. Each filled with information about the main resource.

Limit search to distributions or authors

Using the distribution: syntax, you can limit your search to a given distribution. Example: distribution:Moose around. The same works for the author: tag. This functionality is embedded on various pages across MetaCPAN.

Search snippets preview

Search results include text fragments which include the query. This helps to identify the results you were looking for.

Search for mirrors near you

The /mirrors page includes a map of all mirrors and allows for a nearby search. Clicking on the "nearest" link will ask you browser for your current position and then sort the mirrors accordingly. You can also filter by protocol.

Activity indicators

Author and release pages contain an activity graph that shows the number of uploads of the given author or release over the past 24 month. This is very useful for evaluating if a release is well maintained or if an author stopped releasing modules.

Author's page includes metadata

Each user can add additional meta data to his pause id by uploading a author-1.0.json file to his pause directory. A good example is the page of DWHEELER. The page includes links to all of his profiles on the net and more.

Advanced source code view

Code snippets in the documentation are highlighted and names of modules are linked to its documentation. POD sections are collapsed and can be expanded. See the source of Hash::Util for an example.

Feeling lucky?

Most of the time users are only interested in the first result of a search. Clicking on the "I'm Feeling Lucky" button or hitting shift + enter will bring you directly to the first result. You can use this to add a search keyword to Firefox and others using this url: beta.metacpan.org/search?lucky=%s.

Open Source

Yes, it's open source. The github repository can be found here. Patches are greatly appreciated. If you need any help to get started hacking join us on #metacpan (irc.perl.org).

There are still a lot of new features to come (icebox) but the API as well as the front-end are now stable enough to be used by everyone else. Also, we moved finally to a server that can hold the whole index in memory. With huge thanks to speedchilli who are generously sponsoring the hosting:

"We are a web solutions company providing hosting and open source consultancy. We provide reliable, cost effective hosting for customers who require anything from a single dedicated server to a fully managed hosting solution. Being a business based around open source we feel it is important to give back to the community and are very happy to support the metacpan.org project." - Stewart Hunt

Please help us improve the CPAN experience

The easiest way to contribute is to use the site. We will keep track of searches and analyze them to optimize the search results. If you come across odd search results, such as modules that shouldn't appear because they are outdated or modules that are missing from the results, please report them to us. We will do our best to fix that.

You can also contribute directly by forking the project. Running the front-end doesn't require any heavy dependencies and is installed in less than a minute. You should also join #metacpan on irc.perl.org. It's a very active channel and new input is highly appreciated.

If you decide to use MetaCPAN instead of search.cpan.org you can do that by modifying your hosts file. Add the following lines and all links to search.cpan.org (and links to source code) will be redirect to MetaCPAN:

109.104.113.94 search.cpan.org
109.104.113.94 cpansearch.perl.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment