Perrin Harkins wrote:

On Mon, 2003-06-09 at 12:12, Shannon Eric Peevey wrote:


PS Am having problems with the compile time loading of modules depending on the existence of either modperl1 or 2... "use" dies and "require" is not importing the symbols correctly at runtime...



If you read the docs for "use" (perldoc -f use), you will see that "use" is just like:

BEGIN { require Module; import Module LIST; }

If you want to import things correctly when using require, you have to
call import yourself.

- Perrin


Yeah, I've been messing with that, but it seems to me that I need something similar to a preprocessor directive, where I can load the appropriate "use MODULE" lines into the module bases upon which version of modperl they have installed. Is it possible to use the BEGIN {} subroutine as this?

speeves
cws




Reply via email to