Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Search code on CPAN with Regexps
Perl CSS Perl6 Shell
tree: 1778b46082

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
etc
fakecpan-sampler-0.001
lib/WWW
share
t
tools
var
.gitignore
Makefile.PL
README.pod
TODO
app.psgi
debug.psgi

README.pod

CPAN Grep

This is the code behind http://grep.cpan.me. Unless you want to add something you probably want to use the site, not try and install this ;-)

The default development configuration will index a sample CPAN from fakecpan. Indexing the whole CPAN doesn't take long, although you'll need around 4GB of RAM spare to get a decent level of performance.

Quick start

For a very quick development setup you should be able to:

  • Ensure you have Perl 5.14 or later
  • Install redis

    You just need a redis-server binary around, run-test below will start it for you.

  • Run the following:
      cpanm --installdeps .
      tools/run-test
  • Visit http://localhost:5000

Components

  • cpangrep-index

    Run this to start with:

      bin/cpangrep-index [--cpan_dir /path/to/cpan --slab_dir /data/cpangrep/extract]

    If you omit the --cpan_dir and --slab_dir options you'll get the fakecpan configured in etc/config and shipped with this.

  • WWW::CPANGrep

    The web frontend. Run with:

      starman -Ilib lib/WWW/CPANGrep.pm

    (or other plack server.)

    There's also a version that wraps this in Plack::Debug in debug.psgi.

  • cpangrep-matcher

    Backend workers that do the matching, based on a redis queue. This should be running along with the web frontend, all the time:

      bin/cpangrep-matcher
  • Redis

    A Redis server (or several for the live version) are used for queuing jobs and also resolving matches.

Something went wrong with that request. Please try again.