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.
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-testbelow will start it for you.
- Run the following:
cpanm --installdeps . tools/run-test
- Visit http://localhost:5000
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.
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.
Backend workers that do the matching, based on a redis queue. This should be running along with the web frontend, all the time:
A Redis server (or several for the live version) are used for queuing jobs and also resolving matches.