Howdy,
I have an application that's pure mod_perl -- its modules use the request
object to do a few bits of work like reading parameters, query string,
specialized logging, dealing with NOT_MODIFIED, and so on. Normal stuff
provided by the methods of Apache, Apache::Util, Apache::URI and
Apache::Connection.
Now, I'd like to use a few of my modules under CGI -- for an administration
part of the application that's bigger and not used enough to use up space
in the mod_perl server. But it would be nice to have a common code base.
So, I'm writing a replacement module of those classes and supporting just
the few methods I need. I'm using CGI.pm, URI, HTTP::Date and so on to
handle those few mod_perl methods I'm using in my modules.
For example, I have a function that does specialized logging that I want to
use both under mod_perl and CGI. So, this would work under CGI
my $r = Apache->request;
my $remote = $r->connection->remote_ip;
where in the replacement package Apache::Connection:
sub remote_ip { $ENV{REMOTE_ADDR} }
Before I spend much time, has this already been done?
Might be kind of cool if one could get new CGI programmers to write all
their CGI applications like mod_perl handlers -- could run as CGI on other
servers, but when they want speed they are ready to use mod_perl.
Anyway, does a mod_perl emulator for CGI exist?
Bill Moseley
mailto:[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]