Subject: | Win32::Env not working on Windows 7, 64bit |
Date: | Tue, 12 Jun 2012 17:51:21 +0000 |
To: | "bug-Win32-Env [...] rt.cpan.org" <bug-Win32-Env [...] rt.cpan.org> |
From: | "Chris Hamilton (Ottawa)" <chrhamilton [...] rim.com> |
Hi,
There seems to be an issue with Env.pm on the Windows 7 platform. I can query ENV_USER variables, but not ENV_SYSTEM variables... it throws the following error:
"Can't call method "ValueNames" on an undefined value at C:/Perl/lib/Win32/Env.pm line 159."
It doesn't seem to recognize the constant "ENV_SYSTEM".
Here is a sample script that displays the error:
use Win32::Env;
my $temp = GetEnv(ENV_USER, 'TEMP'); # Works...
print "TEMP: $temp\n";
my $path = GetEnv(ENV_SYSTEM, 'PATH'); # Fails...
print "PATH: $path\n";
exit;
Thank you for any help you can provide... this module is very useful to me! :)
Chris Hamilton
CAD Support Programmer - ECAD Tools Development
Research In Motion Limited
Office:
(613) 595-3202
[cid:image001.gif@01CD10F2.4538E8E0]
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.