On Mon, 2003-11-10 at 22:07, Anatoly Vorobey wrote:
> In fact, some of the stuff I'm
> preloading aren't .pm modules, they're .pl libraries I want to 
> "require" rather than "use".

Be careful with the .pl libs.  If they export functions (i.e. do not
have their own package namepsace), the functions will be loaded into the
package that your startup.pl runs in, not the ones that your other
scripts are running in.

> (my guess is that requiring at runtime is fine, since both compile
> time and runtime of that script happen while processing the PerlRequire
> directive in the config file, but perhaps I'm missing something here?)

You are right about that.

> So the way I solved it was by appending to the end of my startup script 
> a statement deleting it from %INC: delete $INC{"/path/to/script.pl"};
> Then after restart the script is run again and all the 
> Apache->httpd_conf directives are executed. Is that a reasonable way
> to solve this problem, or does it have some gotchas/drawbacks I'm
> not aware of?

It sounds reasonable to me.  I'd say use that for now and try playing
with a RestartHandler later.

- Perrin

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to