Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of jjore (6662)

Friday June 26, 2009
12:37 PM

Search your perl documentation w/ perldoc-search

[ #39181 ]

With the perldoc-search program, you can easily search all your perl documentation to find where that elusive "add_build_element" method is documented.

When I say this:

perldoc-search add_build_element

I get this:

perltoc - perl documentation table of contents
Module::Build::API - API Reference for Module Authors
Module::Build::Cookbook - Examples of Module::Build Usage

Now I know where to find documentation and examples of this method. Anyone who wants to extend this, it is available in github at http://github.com/jbenjore/App-Perldoc-Search/tree/master and CPAN at http://search.cpan.org/dist/App-Perldoc-Search.

I wrote this on the flight back from YAPC10. Just landed in Seattle.

Update: Aaaannnd, it appears Mike Schilli already wrote something similar. Somehow I missed it when I looked before. Dunno how, Perldoc::Search is such an easy name to find: http://search.cpan.org/dist/Perldoc-Search.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I'm glad you chose M::B as an example of usage - it is indeed annoying sometimes to figure out which POD file to look in for what you need.

    • Well... for truth, I wrote this program just to make it easy to find that one method. I could have grepped too, I know. This time I didn't.

  • For info, Pod::POM::Web is a documentation viewer with an optional fulltext indexing module. You get a result like this :

    Fulltext search for 'add_build_element'
    Results 1 to 3 from 3

    source [perl.org] Module/Build/Cookbook [perl.org] (2215) Module::Build::Cookbook - Examples of Module::Build Usage
    ...her stuff here... ); $build->add_build_element('dat'); $build->create_build_scr.../...her stuff here... ); $build->add_build_element('dat'); $build->create_build_scr.../...her stuff here... ); $build->add_build_element('dat'); $build->create_build_scr...

    source [perl.org] Module/Build/Base [perl.org] (738) Module::Build::Base - Default methods for Module::Build
    ...nfigData->feature(@_); } } sub add_build_element { my ($self, $elem) = @_; ...

    source [perl.org] Module/Build/API [perl.org] (738) Module::Build::API - API Reference for Module Authors
    ...k =head2 METHODS =over 4 =item add_build_element($type) [version 0.26] Adds a new...

    Results 1 to 3 from 3

  • perlindex (part of the Text-English distribution) is also capable of doing fulltext searches:

    $ perlindex add_build_element
    1 0.239 lib/perl5/site_perl/5.8.8/Module/Build/Cookbook.pm
    2 0.057 lib/perl5/site_perl/5.8.8/Module/Build/API.pod

    Enter Number or 'q'>

    • That's super-useful, and at least 13 years old. I can't believe I haven't found it yet. Thanks for the pointer.