Fred Moyer wrote:
Fred Moyer wrote:
Here's the code I'm using. I'm guessing that get_config() may not
return what I'm looking for during startup since it functions properly
at runtime. Any ideas? $pkg_global will be a template object, which
is why I want to construct it during startup. I can make a new object
with each handler call but I was hoping to avoid that.
Aha - simple solution is use the first instance of get_config() in the
handler and cache it. Sorry for the noise - got caught up in 'why isnt
it working when maybe it should'. Still a bit curious why it doesn't
work with a ServerUtil->server object during startup, should any one
familiar with the details care to indulge me I would be delighted.
use Apache2::ServerUtil;
my $s = Apache2::ServerUtil->server;
This value takes the global server_rec object which btw is not thread safe
according to mod_perl.h.
This value is not yet set in startup.pl in the 'Config' phases.
After all, what server would you be taking about ?
The parent, the child ?
You might try set PerlTrace i
if you want to see some debugging assuming you got MP_TRACE=1 in your
Makefile.pl line one way or another.
Checkout src/modules/perl/modperl.c and look for modperl_global_get_server_rec
--
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."