Browser connection

Tkil tkil-sdpm at scrye.com
Mon Oct 28 02:23:14 CST 2002


~sdpm~
>>>>> "Joel" == Joel Fentin <joel at fentin.com> writes:

Joel> Somebody (Tony?) mentioned at the last meeting that it is
Joel> possible access a perl program in a browser without needing to
Joel> run a personal server. Right now using an Apache server in my
Joel> laptop, I put something like the following in the address window
Joel> of the browser: http://127.0.0.1/cgi-bin/MyProg.pl

Joel> If I am not using the Apache server, how is it done?

You basically want to run a simple HTTP server (probably written in
perl) that can set up the CGI environment for your script.  Basically,
you want a replacement for Apache httpd in this case.  (Which makes
sense; you want a bicycle to get to the corner store, not a tank in
which to drive through buildings to get to the corner.)

Bob and I were experimenting with one at work, something like
"phttpd.pl" -- yeah, google for that.  If you can't find it, I can
upload the version that I cleaned up a little bit.  There's also
something in either the libnet bundle and/or the LWP bundle that can
do servers fairly gracefully.

Note that writing such a beast is pretty easy.  If you have a static
situation, you don't need configuration parsing nor the flexibility
that requires.  So, you just set up a listening socket, handle one
connection at a time, set up the environment, call the CGI script, and
loop.

t.
~sdpm~

The posting address is: san-diego-pm-list at hfb.pm.org

List requests should be sent to: majordomo at hfb.pm.org

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at happyfunball.pm.org> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at happyfunball.pm.org> .
This is the general rule for most mailing lists when you need
to contact a human.




More information about the San-Diego-pm mailing list