in reply to Re: 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 just updated the ticket with the code. 'use' or 'require' seem to be behaving same in this case.
  • Comment on Re^2: Win32 Perl fail to see the set ENV in loaded module

Replies are listed 'Best First'.
Re^3: Win32 Perl fail to see the set ENV in loaded module
by mr_mischief (Monsignor) on Apr 25, 2014 at 19:52 UTC

    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.

      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