Re: perldoc cgi script

2004-07-29 Thread Smylers
Eric Wilhelm writes:

 This allows you to access the documentation for all installed modules
 and scripts via your browser ...   if anybody knows of similar
 scripts, I would like to hear about them.

Apache::Perldoc does this (though it requires mod_perl, not just a
CGI-enabled web server).

Smylers



Re: perldoc cgi script

2004-07-29 Thread Eric Wilhelm
# The following was supposedly scribed by
# Smylers
# on Thursday 29 July 2004 01:56 am:

 This allows you to access the documentation for all installed modules
 and scripts via your browser ...   if anybody knows of similar
 scripts, I would like to hear about them.

Apache::Perldoc does this (though it requires mod_perl, not just a
CGI-enabled web server).

From reading the Apache::Perldoc source, it is exactly as the documentation 
claims A simple mod_perl handler.

That's essentially what my perldoc was yesterday morning, before I added the 
index generation,  regex name-search and etc.

As Rich says in his documentation a lot of other people have been doing this 
for ages.  If this is the case, why is pod2html being run on a pipe via a 
system command (hey, I do it to.)  Seems that it needs to be properly 
modularized, rather than the current do this front-end:

  use Pod::Html;
  pod2html @ARGV;

Then, maybe a cgi front-end and mod-perl front-end could share the same 
features (and become secure?)

I still haven't figured out where the source to search.cpan.org is.

--Eric
-- 
You can't win. You can't break even. You can't quit.
  --Ginsberg's Restatement of the Three Laws of Thermodynamics


perldoc cgi script

2004-07-28 Thread Eric Wilhelm
I've made some major updates to what was once my cobbled-together cgi script.

http://ericwilhelm.homeip.net/svn/CGI-perldoc/trunk/data/scripts/perldoc

This allows you to access the documentation for all installed modules and 
scripts via your browser (provided that you have a cgi-enabled webserver on 
your workstation.)

It also provides some other query functionality, including fetching a list of 
installed modules or scripts and listing the subroutines which are defined in 
a module (handy for rooting-out undocumented functions.)

I keep it under /var/www/cgi-bin/perldoc, so I don't consider the name to be a 
clash with the 'official' perldoc.  YOMV.

It is a work in progress, so any feedback you have would be great.

Also, if anybody knows of similar scripts, I would like to hear about them.

I'm particularly disappointed in the fact that in order to have it host it's 
own end-user documentation, the internals documentation cannot be done with 
pod.  I've adopted a feeble convention of a commented-out pod, but might be 
better off with just plain comments.

I originally wrote this to have a dynamic pod2html setup.  It also turned into 
a good way to keep multiple pages of documentation open at once (since my 
konsoles don't re-title themselves but my browser does.)

Hyperlinks should work in most cases, including builtin functions which link 
to other builtins (like grep-map.)

I wouldn't bet on security, so use at your own risk (my workstation is not on 
the public network.)  However, I have begun to move away from the backticked 
captured commands to IPC::Run (and using list-format arguments), so it is 
getting better.

Once you get it installed, fire-up your browser, go to the cgi-bin/perldoc 
page and click 'help'.

Enjoy.

--Eric
-- 
Chess is a foolish expedient for making idle people believe 
they are doing something very clever when they are only wasting 
their time.
--George Bernard Shaw


Re: perldoc cgi script

2004-07-28 Thread Dana Hudes

On Thu, 29 Jul 2004, Eric Wilhelm wrote:

 This allows you to access the documentation for all installed modules and 
 scripts via your browser (provided that you have a cgi-enabled webserver on 
 your workstation.)
 
 It also provides some other query functionality, including fetching a list of 
 installed modules or scripts and listing the subroutines which are defined in 
 a module (handy for rooting-out undocumented functions.)


I personally develop on UNIX/Linux and use Emacs , under X-windows, as my
development environment with CPerl-mode. With this I have a menu item to
bring up perldoc either on a word at cursor or arbitrary request entered 
in the 'minibuffer'. The editor frame splits into two windows and I am 
able not only to read but to copy/paste to my code as required.
If I don't know what I want, I use perlindex at the command line
and have a nightly cron job rebuilding that index.

sometimes its nice to get really pretty docs...in which case I go the web.