in reply to Re^2: Win32 Perl fail to see the set ENV in loaded module
in thread Win32 Perl fail to see the set ENV in loaded module

I don't have Windows handy to test at the moment. It is my suspicion that the DLL is grabbing the environment from somewhere other than the current process. The module itself should be reflecting the current process's environment since it is part of the current process.The BEGIN block shouldn't even be necessary.

Since you're working with a specific DLL, you may want to check the programmer's documentation for that DLL.

  • Comment on Re^3: Win32 Perl fail to see the set ENV in loaded module

Replies are listed 'Best First'.
Re^4: Win32 Perl fail to see the set ENV in loaded module
by kartlee05 (Novice) on Apr 27, 2014 at 23:08 UTC
    Hi, I wrote a c program which load the dynamic library using LoadLibrary(..) call. And before doing that, I try to set the environment variable in the program using putenv(..). The dll very well can see the environment variable. I see this is an issue with perl loading the library and the environment it can use. It would be good if someone can confirm so I can file a bug. -Karthik