Re: [cgiirc-general] cgiirc2
Brought to you by:
dgl
|
From: Jonas L. <jo...@li...> - 2003-11-13 09:18:25
|
David Leadbeater <dg...@dg...> writes: > Franki wrote: >> Its an excellent idea to use HTML::Template.. I've been using that on >> pretty much every perl web app I've written for a couple of years now.. > > Yeah, it takes a bit of getting used to but it's nice and very simple > too.. I have used TT (Template Toolkit) for a long time now and thinks that is the most complete and flexible solution. http://www.tt2.org/ > The thing is mod_perl or anything that is in the webserver will be > using more than one process so the memory savings would go. I have previously used mod_perl just to implement a client that communicate requests to singel server process. You start up the server and the clients just sends the request to you and gets the ready page. This is the client part, that could be run with or whithout mod_perl (with Apache::Registry) #!/usr/bin/perl -w use strict; use CGI; use IO::Socket; use FreezeThaw qw( freeze ); my $q = new CGI; my $sock = new IO::Socket::INET ( PeerAddr => 'localhost', PeerPort => '7788', Proto => 'tcp', ); die "Could not create socket: $!\n" unless $sock; my $value = freeze [ $q, [%ENV], ]; my $length = length $value; print $sock "$length\x00$value"; while( $_ = <$sock> ) { print( $_ ); } __END__ -- / Jonas - http://jonas.liljegren.org/myself/en/index.html |