develooper Front page | perl.perl5.porters | Postings from February 2012

Google codesearch installed on camel/dromedary/llama

Thread Next
Dennis Kaarsemaker
February 25, 2012 17:53
Google codesearch installed on camel/dromedary/llama
Message ID:
Hey all,

On camel and dromedary, I have installed codesearch and it automatically
updates an index it keeps based on perl.git and metaconfig.git. Just use
'csearch regex_here' to search.


[dkaarsemaker@camel perl]# csearch return.*mortal.*hek
/usr/src/perl/hv.c:    return sv_2mortal(newSVhek(HeKEY_hek(entry)));
/usr/src/perl/sv.c:     return sv_2mortal(newSVhek(HeKEY_hek(entry)));

On llama, it also indexes an unpacked, auto-updated copy of CPAN, for
when you want to search a larger volume of code

[dkaarsemaker@llama ~]# time csearch -i 'SOAP.*new.*umra'
/scratch/cpan/SOAP-UMRA/lib/SOAP/  my $umra = SOAP::UMRA->new('http://umra-host/umrawebservices/service.asmx');

real	0m0.475s
user	0m0.401s
sys	0m0.074s

(That was with a warm cache)

csearch/cindex look at $CSEARCHINDEX to find the index. If you want to
search other volumes of code, you need to set this yourself. By default
it's set to the 'global' one that's updated by a cronjob.
Dennis Kaarsemaker, Team Leader Unix Administrators
Herengracht 597, 1017 CE Amsterdam
Tel external +31 (0) 20 715 3409
Tel internal (7207) 3409

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About