On Fri, Nov 17, 2000 at 11:53:05AM -0800, Bill Moseley wrote:
>
> 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.
One possibility is to
require My::Memory::Hog ;
once you know it needs to be used, then to suicide your process when done
with the request. That's not always a good idea, if your childinit takes
a long time, for instance, but it may simplify your life to not have to
worry about the two different environments.
> Before I spend much time, has this already been done?
I do exactly this for a largish chunk of code, I have a Safari::Request
object that I fill in from a comand-line or CGI script. You might also
look at Apache::FakeRequest. I can send you mine (I posted it to this
list or another list recently).
There is definitely a recurring interest in runnng mod_perl scripts from
command line and via CGI. That's not feasible for all scripts, but for
the more "plain vanilla" ones, it should be.
- Barrie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]