# Update the index (required before first start) perldig -u
# Search for a keyword perldig keyword(s)
When using \*(C`perldig\*(C' for the first time, a new index needs to be created. Just call
$ perldig -u
and everything happens automatically: A crawler will detect locally installed Perl documentation pages, rummage through the \s-1POD\s0 and index them. When this initial run has been completed, \*(C`perldig\*(C' is ready to process search requests:
$ perldig frobnicate
1) pod/perlguts.pod 2) pod/perlxstut.pod 3) pod/perlnewmod.pod
Enter number of choice:
The command above shows a search for the keyword \*(C`frobnicate\*(C'. Yes, that's a word used in the Perl documentation! It shows three hits and asks the user to enter a number between 1 and 3 to open the selected documentation page in a pager program (typically \*(C`less\*(C'). In there, an in-text search for the expression can be started by using the \*(C`/\*(C' (slash) command.
If two or more keywords are given, the search will yield pages that contain all of them. When searching for phrases, please include quotes (make sure to quote the quotes so the shell doesn't eat them):
$ perldig '"floating point"'
The underlying swish-e search engine also understands expressions connected via \s-1AND\s0 and \s-1OR:\s0
$ perldig "'floating point' AND approximate AND 'real number'"
To keep the index up to date, it is probably a good idea to run a cronjob every morning:
00 4 * * * /usr/bin/perldig -u >/dev/null 2>&1
If you can read German, please check out this article in the \*(L"Linux- Magazin\*(R", where this script was originally published:
http://www.linux-magazin.de/Artikel/ausgabe/2003/10/perl/perl.html
# Update/create the index $ perldig -u
$ perldig frobnicate
1) pod/perlguts.pod 2) pod/perlxstut.pod 3) pod/perlnewmod.pod
Enter number of choice: 1 [ ... perlguts man page shows ... ]
\*(C`perldig\*(C' puts the swish-e index files into the folder \*(C`.perldig\*(C' in the user's home directory.
Copyright 2003-2005 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
2003, Mike Schilli <[email protected]>