> -----Original Message-----
> From: Vivek Khera [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 05, 2000 10:09 AM
> To: mod_perl list
> Subject: Re: [RFC: performance] Preloading Perl Modules at Server
> Startup
> 
> 
> >>>>> "SB" == Stas Bekman <[EMAIL PROTECTED]> writes:
> 
> SB> But an even better approach is to create a separate startup file
> SB> (where you code in plain perl) and put there things like:
> 
> SB>   use DBI;
> SB>   use Carp;
> 
> SB> Then you C<require()> this startup file in I<httpd.conf> with the
> SB> C<PerlRequire> directive, placing it before the rest of 
> the mod_perl
> SB> configuration directives:
> 
> SB>   PerlRequire /path/to/start-up.pl
> 
> 
> You should recommend
> 
> use DBI ();
> use Carp ();
> 
> so that no symbols are imported into the name space of the start-up.pl
> script as it is unlikely to be needed there.
> 
> Also, I'd recommend using libapreq's Apache::Request if you don't need
> the content generating parts of CGI.pm... which leads to an
> enhancement I'd like to see Doug add to libapreq's functionality:
> 
> Currently, you need to do a call like this if you're using
> Apache::Request inside a Registry script:
> 
>  my $ar = Apache::Request->new(Apache->request()) or die 
> "Whoa Nelly!";

my $apr = Apache::Request->new(shift);

requires less typing and still has the desired effect in Regitry scripts or
handlers...

--Geoff

> 
> I'd like to see the Apache::Request->new() method automatically call
> Apache->request() if no parameters are passed to it.  Inside a
> Apache->handler, it is easy since you already have a Apache->request
> object passed to you, but in Registry, it is a lot of extra typing.
> 

Reply via email to