I don't understand the fact that i would be using CGI? Is it because of "use CGI qw(:standard)"? I defined the right properties in httpd.conf. What should i use instead to request the id parameter?
On 18/04/2008, Tomas Doran <[EMAIL PROTECTED]> wrote: > > > On Fri, 2008-04-18 at 11:49 +0200, Ferdy Galema wrote: > > Hello, > > > > Let's say I'm running the following snippet in apache2/mod_perl, all > > with the default configuration: > > > > #========================================# > > #!/usr/bin/perl > > > > use strict; > > use CGI qw(:standard); > > use MogileFS::Client; > > <snip> > > > #just serve the image directly for now > > print "Content-type: image/jpeg\n\n"; > > print $$image; > > #========================================# > > > That doesn't look like mod_perl to me? Looks like an old style CGI. > > > > -Does it get initialised everytime a request is made? Is that okay > > performance wise? > > > Yes it does. That's not too bad performance wise, but not the best if > you're trying to shave your request down to ms.. However loading perl > (and loading / compiling the modules) on each request (as you appear to > be a CGI) will be a much bigger overhead than connecting to mogileFS > here as you're a CGI. > > > > If not, can it be made global in a way? > > > Yes, just use a closure to hold the mogile object, and it'll stay > connected. > > Cheers > Tom > > >
