Re: [mp1] Alternative for CHECK
On Thursday, February 20, 2003, at 10:51 PM, Stas Bekman wrote: Why not? Use a separate module to drive the others? package My::PostConfig; BEGIN { # whatever needs to be done for other modules } 1; startup.pl: --- use My::PostConfig Excellent point, and a quick experiment on my end shows that this does do what I need. I have two different modules to be loaded for this project, so I just make sure that one loads after the other does, and it all works. Thanks for the nudge, Stas, it was just what I needed. Regards, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]
[mp1] Alternative for CHECK
Hi All, I'm writing a module that will run in Apache and has important code that needs to run after all modules have loaded but before Apache forks and starts serving requests. Since mod_perl 1.x ignores CHECK and INIT blocks, and BEGIN blocks run too early for what I'm doing, I was wondering if there's a hook in the mod_perl API where I can run some code just before before Apache forks and starts serving requests? If you must know what I'm doing, I'm looking for stuff in the symbol table. TIA! David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]
Re: [mp1] Alternative for CHECK
David Wheeler wrote: Hi All, I'm writing a module that will run in Apache and has important code that needs to run after all modules have loaded but before Apache forks and starts serving requests. Since mod_perl 1.x ignores CHECK and INIT blocks, and BEGIN blocks run too early for what I'm doing, I was wondering if there's a hook in the mod_perl API where I can run some code just before before Apache forks and starts serving requests? If you must know what I'm doing, I'm looking for stuff in the symbol table. PerlChildInitHandler? e.g. used by Apache::DBI to pre-connect to the db. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [mp1] Alternative for CHECK
On Thursday, February 20, 2003, at 07:04 PM, Stas Bekman wrote: PerlChildInitHandler? e.g. used by Apache::DBI to pre-connect to the db. Yeah, but I was looking for something pre-fork. Anything come to mind? Thanks, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]
Re: [mp1] Alternative for CHECK
David Wheeler wrote: On Thursday, February 20, 2003, at 07:04 PM, Stas Bekman wrote: PerlChildInitHandler? e.g. used by Apache::DBI to pre-connect to the db. Yeah, but I was looking for something pre-fork. Anything come to mind? startup.pl? in 2.0 you have: PerlPostConfigHandler http://perl.apache.org/docs/2.0/user/handlers/server.html#PerlPostConfigHandler __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [mp1] Alternative for CHECK
On Thursday, February 20, 2003, at 09:41 PM, Stas Bekman wrote: startup.pl? Won't work too well in a module, I think. I have a workaround for my problem for now, but it ain't pretty. in 2.0 you have: PerlPostConfigHandler http://perl.apache.org/docs/2.0/user/handlers/ server.html#PerlPostConfigHandler Oooh, yes, that's exactly what I want. Will have to port it all when the time comes. Waiting for the mod_perl 2 momentum, now, Regards, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]
Re: [mp1] Alternative for CHECK
David Wheeler wrote: On Thursday, February 20, 2003, at 09:41 PM, Stas Bekman wrote: startup.pl? Won't work too well in a module, I think. I have a workaround for my problem for now, but it ain't pretty. Why not? Use a separate module to drive the others? package My::PostConfig; BEGIN { # whatever needs to be done for other modules } 1; startup.pl: --- use My::PostConfig __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com