Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perldoc::search(3pm) [debian man page]

Perldoc::Search(3pm)					User Contributed Perl Documentation				      Perldoc::Search(3pm)

NAME
Perldoc::Search - Index and Search local Perl Documentation SYNOPSIS
####################################### # Command line utility: ####################################### # This is permanent and needs to be performed only once # (or if new documentation gets installed). $ perldig -u # Then, search: $ perldig log AND apache AND connect 1) CGI/Carp.pm 2) CGI/Prototype.pm 3) DBI/Changes.pm 4) DBI/Changes.pm Enter number of choice: ####################################### # API ####################################### use Perldoc::Search; my $searcher = Perldoc::Search->new(); # This is permanent and needs to be performed only once # (or if new documentation gets installed). $searcher->update(); # Then, search: for my $hit ($searcher->search("log AND apache")) { print $hit->path(), " "; } DESCRIPTION
"Perldoc::Search" uses the swish-e engine to index the local Perl documentation. It provides both the command line utility "perldig" and an API to perform searches on the index. It uses "SWISH::API::Common" as the indexing and search engine. Most likely, you will want the command line utility "perldig", please check the documentation that comes with it by calling perldoc perldig In case you're interested in the API, read on. METHODS
"my $searcher = Perldoc::Search-$<gt"new()> Instantiates a searcher object. Usually takes no parameters. If you like to modify the searched directories or want to pass different options to "SWISH::API::Common", go ahead: use Config; my $searcher = Perldoc::Search->new( dirs => [$Config{installsitearch}, $Config{installsitelib}, $Config{installarchlib}, $Config{installprivlib}, ], swish_options => { swish_adm_dir => "$ENV{HOME}/.perldig", } ); "$searcher-"update()> Update the index. This operation might take a couple of minutes. "my @hits = $searcher-"search("log AND apache")> Perform a search on the index with the given query. Returns a list of result objects. # Search documents containing # both "foo" and "bar" for my $hit ($swish->search("foo AND bar")) { print $hit->path(), " "; } LEGALESE
Copyright 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. AUTHOR
2005, Mike Schilli <cpan@perlmeister.com> perl v5.12.4 2011-09-17 Perldoc::Search(3pm)

Check Out this Related Man Page

Pod::Index::Search(3pm) 				User Contributed Perl Documentation				   Pod::Index::Search(3pm)

NAME
Pod::Index::Search - Search for keywords in an indexed pod SYNOPSIS
use Pod::Index::Search; my $q = Pod::Index::Search->new; my @results = $q->search('getprotobyname'); for my $r (@results) { printf "%s %s ", $r->podname, $r->line; print $r->pod; } my @subtopics = $q->subtopics('operator'); DESCRIPTION
This module searches an index created by Pod::Index::Builder. Search results are returned as Pod::Index::Entry objects. It is also possible to search for subtopics for a keyword. For example, a search for "operator" might return things like operator, conditional operator, filetest operator, logical operator, precedence operator, relational The subtopics returned are simple strings. METHODS
new my $q = Pod::Index::Search->new(%args); Create a new search object. Possible arguments are: "fh" The filehandle of the index to use. If omitted, "perlindex::DATA" is used. "filename" The filename of the index to use. Note that you can specify either "fh" or filename, but not both. "filemap" A subroutine reference that takes a podname and returns a filename. A simple example might be: sub { my $podname = shift; return "/usr/lib/perl5/5.8.7/pod/$podname.pod"; } The podname is in colon-delimited Perl package syntax. The default "filemap" returns the first file in @INC that seems to have the proper documentation (either a .pod or .pm file). "nocase" If true, the search will be case-insensitive. search($keyword) Do the actual search in the index. Returns a list of search results, as Pod::Index::Entry objects. subtopics($keyword, %options) my @topics = $q->subtopics('operator'); my @topics = $q->subtopics('operator', deep => 1); Lists the subtopics for a given keyword. If "deep" is given, it includes all subtopics; otherwise, only the first level of subtopics is included. VERSION
0.14 SEE ALSO
Pod::Index::Entry, Pod::Index::Builder AUTHOR
Ivan Tubert-Brohman <itub@cpan.org> COPYRIGHT
Copyright (c) 2005 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2005-10-16 Pod::Index::Search(3pm)
Man Page