pydoc as a web server

blech on 2004-03-25T10:18:17

Simon Willison's weblog recently pointed out that the Python documentation tool, pydoc, could be used as a web server:

Simply type the following at the command line:

pydoc -p 8888

Then point a browser at http://localhost:8888/ to browse interactive documentation for every Python module available on your system.

Is there any reason why such a tool couldn't be made for Perl? What about one relying on only core modules, such that it could go into the core? The main questions I'd have would be the state of pod2html, and how to get a web server without relying on CPAN.

Anyway, it's an idea that might be worth embracing and extending.


Good idea

2shortplanks on 2004-03-25T10:22:51

I see no reason why we couldn't do that. The key would be to make the webserver really really dumb, and only support a tiny subset of the spec; Let's face it, how difficult could it be?

Activestate...

james on 2004-03-25T10:27:57

..Perl installations have really good documentation. I seem to remember that every installed module appears in the table of contents which updates every time you install a new module. They are all formatted in an easily readable, yet pretty way. Again from what I remember its really nice and there might be something usable there already.

Aol

rafael on 2004-03-25T11:11:16

Yes, I noticed this also and asked myself the same question. Plus, perldoc sucks, and so does pod2html. Some really good job could be made here. Although I'm not very inclined to let this be made a part of the core.

Re:Aol

TorgoX on 2004-03-25T21:57:29

perldoc sucks, and so does pod2html

I replaced one (did you upgrade to Pod::Perldoc, or are you still using the old crap?), and I'm replacing the other in the next month (Pod::Simple::HTML)

I want perldoc --make coffee

rafael on 2004-03-25T22:15:07

Indeed blead has now Pod::Perldoc, and I'm thankful for it. (5.8.x has it probably too). At least the code of perldoc is now modular and clean; but I'm sure one can improve the command-line interface. I still need to grep *.pod :) I vaguely recall that Tom Christiansen did some work towards this. (At least I now use perldoc with vim as a pager, that permits better navigation than more/less/pg.)

Re:I want perldoc --make coffee

TorgoX on 2004-03-25T22:41:15

I've found Tom's Pod stuff to be almost without exception unusably bad.

But if you can dig some little bit of usefulness out of it and submit a patch to Pod::Perldoc that implements it, I'd be quite happy!

BTW, Pod::Perldoc isn't just for blead -- just about anyone can upgrade their perldoc to use it, just via CPAN.

Re:I want perldoc --make coffee

rafael on 2004-03-25T22:59:43

Answer 1: I don't know, last time I heard about it I was an average c.l.p.misc lurker.

Answer 2: Hey, that's my line!

Answer 3: I think it's in maint. But I haven't checked. My computers run 5.6.2 and 5.9.1 :)

it exists, and demerphq had that idea a few years

podmaster on 2004-03-25T12:03:57

It exists in the form that is
Apache::Pod.
It uses Pod::Simple.
Alls that needed is to borrow some code
and involve HTTP::Daemon in middle.

demerphq
had that idea a few years ago
and i'm finally working on it
as part of a reimplementation
of
http://perlmonks.org/?node=Pod::Master

BTW,
Prima has a nice pod viewer, and
there is one for wxPerl
( http://perlmonks.org/index.pl?node_id=254944 )
and there is Tk::Pod
and there is even one that comes with Win32::GUI