Are you saying that the second time you run that use, it doesn't reload an already loaded module? That's just how Perl works, but you can use workarounds like Apache2::Reload. | [reply] |
no, it falls out... the module is not available.
Thu Apr 23 14:20:57 2009 error client xxxx Undefined subroutine &plugin23::test called at ..
the only way to keep it in enviroment is to trigger the function calling 'use' for each run
| [reply] |
use called a second time doesn't reload the module, since it checks %INC (see perlvar) and, if the module is already in that hash, the underlying require just returns 1, so no loading. You would have to undef $INC{$module} for the use to reload the module. Keep in mind that in %INC the key for Some::Module is Some/Module.pm.
Aa Corion said, you could use Apache::Reload for those packages; if you have changing packages where methods/functions are organized into files, you could use AutoReloader.
| [reply] [d/l] [select] |
Is this a CGI script or a mod_perl Registry script (or ...)? Could you please clarify what you mean by "falling out of scope"? | [reply] |
its all MP scripts, .pm modules with a set of functions each im trying to import from the main program which is a mod_perl script running backend in apache
the first run after restart loads the extra modules together with the initial enviroment.
but the 2nd run doesnt want to find them without reloading them, the initial enviroment is stable though
| [reply] |
| [reply] [d/l] [select] |