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::Perldoc::GetOptsOO(3pm)				 Perl Programmers Reference Guide			      Pod::Perldoc::GetOptsOO(3pm)

NAME
Pod::Perldoc::GetOptsOO - Customized option parser for Pod::Perldoc SYNOPSIS
use Pod::Perldoc::GetOptsOO (); Pod::Perldoc::GetOptsOO::getopts( $obj, @args, $truth ) or die "wrong usage"; DESCRIPTION
Implements a customized option parser used for Pod::Perldoc. Rather like Getopt::Std's getopts: Call Pod::Perldoc::GetOptsOO::getopts($object, @ARGV, $truth) Given -n, if there's a opt_n_with, it'll call $object->opt_n_with( ARGUMENT ) (e.g., "-n foo" => $object->opt_n_with('foo'). Ditto "-nfoo") Otherwise (given -n) if there's an opt_n, we'll call it $object->opt_n($truth) (Truth defaults to 1) Otherwise we try calling $object->handle_unknown_option('n') (and we increment the error count by the return value of it) If there's no handle_unknown_option, then we just warn, and then increment the error counter The return value of Pod::Perldoc::GetOptsOO::getopts is true if no errors, otherwise it's false. SEE ALSO
Pod::Perldoc COPYRIGHT AND DISCLAIMERS
Copyright (c) 2002-2007 Sean M. Burke. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. AUTHOR
Current maintainer: Mark Allen "<mallen@cpan.org>" Past contributions from: brian d foy "<bdfoy@cpan.org>" Adriano R. Ferreira "<ferreira@cpan.org>", Sean M. Burke "<sburke@cpan.org>" perl v5.18.2 2014-01-06 Pod::Perldoc::GetOptsOO(3pm)
Man Page