|more useful options|
Re: POD, come let me see thee, I have thee not, but still I clutch theeby jplindstrom (Monsignor)
|on Dec 18, 2008 at 20:37 UTC||Need Help??|
Smart Docs in PerlySense does someting that sounds very similar to what you want.
Pressing C-o C-d on a method name will try to find it and display the sub/method POD in the echo area (screen shot).
The PerlySense command line script can only output Emacs elisp and Vim dictionary data structures at the moment, but it should be trivial to just get the POD text.
Actually, here's a minimal script to do that. Install Devel::PerlySense and save this into psdoc.pl:
(actually, that one triggers a bug where =item pod isn't treated properly, but I'll fix that :)
Obviously it won't work for everything since not all module POD are structured in a way that makes it possible to find it. but if the sub/method name is mentioned in a =head or =item line it should work most of the time.
For your own code it could work flawlessly, since you can be diciplined and document things properly (especially if you can see the obvious benefit). Here's an example:
To be fair, I don't use this hugely often myself. For a project code base I find that I usually need to go to the method anyway in order to make sure I know enough to call it. And for CPAN modules it's usually beneficial to read the whole thing and to make sure I'm not missing something.
But I hope you'll find it useful.