问题
I'm looking for is a good on-screen POD reading experience.
For years, I've used perldoc
or man
running in an xterm
to read Perl documentation on screen, and a small custom program built around Pod::LaTeX
to print it. The printed version is good: the script does a nice job. However, on-screen reading is painful:
- You can search, but good luck finding e.g., the
as
section inDBIx::Class::ResultSet
. Less doesn't know anything about the structure of the document, and searches for common English words are pointless. - I fear every time the document tells me
see section so-and-so
. Great. Now I have to find that. And then getting back to where I was won't be trivial (though that may be my less ignorance showing) - See document so-and-so is worse.
!perldoc foo
works, but switching between the two documents is then hard. You can mostly get around this by suspending less and runningperldoc
from the shell, but that's more keystrokes and I'm lazy. - Formatting leaves a lot to be desired.
I want to be able to click a table of contents, and go to that section. I want to be able to click that "see other" and go there. And so on. So far, I know of two possibilities:
- search.cpan.org, example DBIx::Class::ResultSet. Requires an Internet connection, but that's not normally a problem.
- Podbrowser. Just started trying this, looks pretty nice.
I'm running Debian GNU/Linux, both Lenny and Squeeze. But please suggest programs for all platforms to make this as useful as possible.
回答1:
You can try Pod::Browser which is built-in http server that you can connect to with your browser, or something like Tk::Pod which is gui pod browser.
回答2:
Have you seen CPAN::Mini::Webserver or Pod::POM::Web or Apache::Perldoc? These set up a local way for you to see nice, HTML versions of your docs.
回答3:
I would recomment converting all your POD to HTML using pod2html
This makes it browsable, linked and nice looking, and you can customize look&feel via css.
回答4:
Just to add two more POD servers that seemed to have been missed thus far!
- Pod::Server
- Pod::Webserver
回答5:
Have a look also at Gtk2::Ex::PodViewer that is an excellent GUI viewer based on GTK. If you are using also Windows you can find a prebuilt wrapper in Camelbox (http://code.google.com/p/camelbox/).
来源:https://stackoverflow.com/questions/1510149/perl-documentation-pod-browsers