Pod::POM::Web::Indexer - full-text search for Pod::POM::Web
perl -MPod::POM::Web::Indexer -e index
Adds full-text search capabilities to the Pod::POM::Web application. This requires Search::Indexer to be installed.
Queries may include plain terms, "exact phrases", '+' or '-' prefixes, Boolean operators and parentheses. See Search::QueryParser for details.
Pod::POM::Web::Indexer->new->index(%options)
Walks through directories in @INC and indexes all *.pm and *.pod files, skipping shadowed files (files for which a similar loading path was already found in previous @INC directories), and skipping files that are too big.
@INC
*.pm
*.pod
Default indexing is incremental : files whose modification time has not changed since the last indexing operation will not be indexed again.
Options can be
Size limit (in bytes) above which files will not be indexed. The default value is 300K. Files of size above this limit are usually not worth indexing because they only contain big configuration tables (like for example Module::CoreList or Unicode::Charname).
Module::CoreList
Unicode::Charname
If true, the previous index is deleted, so all files will be freshly indexed. If false (the default), indexation is incremental, i.e. files whose modification time has not changed will not be re-indexed.
If true, the indexer will also store word positions in documents, so that it can later answer to "exact phrase" queries.
So if -positions are on, a search for "more than one way" will only return documents which contain that exact sequence of contiguous words; whereas if -positions are off, the query is equivalent to more AND than AND one AND way, i.e. it returns all documents which contain these words anywhere and in any order.
-positions
"more than one way"
more AND than AND one AND way
The option is off by default, because it requires much more disk space, and does not seem to be very relevant for searching Perl documentation.
The index function is exported into the main:: namespace if perl is called with the -e flag, so that you can write
index
main::
-e
To install Pod::POM::Web, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::POM::Web
CPAN shell
perl -MCPAN -e shell install Pod::POM::Web
For more information on module installation, please visit the detailed CPAN module installation guide.