Perrin Harkins schreef:
On 7/11/07, Christiaan Kras <[EMAIL PROTECTED]> wrote:
Thanks. I will try that. So basicly, the modules that are loaded at the
first request will stay in memory, but @INC will get reset?
Yes. It's a simulation of CGI behavior. The only reason your CGI
scripts don't have this problem is that they execute the "use lib" on
every request, since they are compiling from scratch every time.
I've read about it. I was sure I checked it.
Wow. I never noticed it. In my app I have runmode that shows me %ENV and
@INC. At the first request my custom path was in there. And at the
second request it wasn't. But after a few more requests it's still
there. Weird behaviour?
You're probably just seeing a new child process compile the script for
the first time.
Just a quick note: unshift removes the first record from the array.
No, it adds to the beginning of the array.
- Perrin
Oops, my bad. *ashamed*
Anyway. I've tested it, and now in the runmode that show's me @INC it
keeps the path I've set. I've tried a number of Excel exports as well
and none of them were faulty. However, I will keep a look at my logfile.
But I hope this solves the problem.
By the way, I've used push() to add my path to @INC before. But that
didn't work out. Was that because push() puts the path at the end of
@INC? Shouldn't really matter should it? Although it's possible I used
it after loading my modules (not in the startup sub).
For now I seem to be helped. Thanks again :-).
--
Christiaan Kras