Slash Boxes
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 ]

blech (1597)

  (email not shown publicly)

Journal of blech (1597)

Thursday March 25, 2004
05:18 AM

pydoc as a web server

[ #18056 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • 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?
  • ..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.
  • 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.
    • 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)

      • 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.)
        • 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.

          • 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 in the form that is
    It uses Pod::Simple.
    Alls that needed is to borrow some code
    and involve HTTP::Daemon in middle.

    had that idea a few years ago
    and i'm finally working on it
    as part of a reimplementation

    Prima has a nice pod viewer, and
    there is one for wxPerl
    ( )
    and there is Tk::Pod
    and there is even one that comes with Win32::GUI