I can see three possibilities.
-
You don't actually have a module.
As I define a module, it must have its own namespace and placed there using a package statement.
-
The runs are in different Apache processes.
Apache has many children to handle requests. Loading a module in one won't load it in the others (unless you load it in the mod_perl startup script).
-
The module is loaded, but the symbols haven't been imported into the current namespace.
use Some::Such; has two effects: require and import. A module only needs to be required once. (Subsequent calls to require are no-ops.) But you need to call import from each namespace into which you want to import.
Apache also restarts its children from time to time.
| [reply] [d/l] [select] |
Tx for the answer.
1) the module is there, it loaded and ran my test on the first page hit, the second page hit the enviroment forgot he had taken it in unless i go though the use statment again
2) just one proc. i see if the main env is reproduced and so is not the case here
3) i run the 'use' statment in the namespace i call, just use one namespace. since it imports early in the application, and oo objects are started in that namespace later in the first run, successfully, it seems strange why it would drop in the next run
| [reply] |
Apache children usually exit after some time, and the MPM worker module is no exception. How do you envision the "use" statement to survive the respawning of such children?
It would maybe help if you told us the reason why you want to avoid reissuing the use statements at all.
| [reply] [d/l] |