Skip Menu |

This queue is for tickets about the Win32-Process-Info CPAN distribution.

Report information
The Basics
Id: 8984
Status: resolved
Priority: 0/
Queue: Win32-Process-Info

People
Owner: Nobody in particular
Requestors: pmkumaar [...] starhub.net.sg
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.002
Fixed in: (no value)



Subject: $ENV{PERL_WIN32_PROCESS_INFO_VARIANT} = 'NT'
Hi, Win32::Process::Info::NT Version = 1.002 It seems that setting the Env Variable: $ENV{PERL_WIN32_PROCESS_INFO_VARIANT} = 'NT'; does not persuade the system to adopt the 'NT' Variant. The only way that it can be done is by invoking the command below: Win32::Process::Info->Set (variant => 'NT'); It would be good if you can verify - is this a bug? Thank you and best regards. pmkumaar Show quoted text
>>
[guest - Sat Dec 18 00:12:43 2004]: Show quoted text
> Hi, > > Win32::Process::Info::NT Version = 1.002 > > It seems that setting the Env Variable: > $ENV{PERL_WIN32_PROCESS_INFO_VARIANT} = 'NT'; > does not persuade the system to adopt the 'NT' Variant. > > The only way that it can be done is by invoking the command below: > Win32::Process::Info->Set (variant => 'NT'); > > It would be good if you can verify - is this a bug? >
Well, it's probably actually a feature. The thing is, the environment variable is consulted when the module is loaded, and changing it thereafter does no good. I'm going to revise the docs (again!) to reflect this. I suppose you _could_ code something like BEGIN { $ENV{PERL_WIN32_PROCESS_INFO_VARIANT} = 'NT'; } use Win32::Process::Info; if you were dead set on manipulating the environment variable. The static "Set" is my preferred way to change the behaviour of the code programattically. Unless you want to specify the variant when you instantiate the object, which is also supported. The environment variables were sort of for global configuration of the module - so that someone who only wanted to use the NT variant could create a system-wide (or user-wide) environment variable and set it as desired. Slight change of subject: The docs say that objects have the 'variant' attribute, but it's read-only. This is currently false, but it was supposed to be true. Another thing to be fixed in 1.003.