Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: What version of Strawberry Perl to use?

by Mr. Muskrat (Abbot)
on Feb 09, 2013 at 17:33 UTC ( #1017977=note: print w/ replies, xml ) Need Help??


in reply to What version of Strawberry Perl to use?

I just installed Win32::SystemInfo on one of my PCs using Strawberry Perl 5.12.3.

Here's the code that doesn't throw an error (but it certainly does not work):

use Win32::SystemInfo; my %mHash = (TotalPhys => 0, AvailPhys => 0); if (Win32::SystemInfo::MemoryStatus(%mHash)) { print $mHash{TotalPhys}; }

Output: 4294967295 (It doesn't work because total physical memory is 16 GB.)

This code throws a similar but different error to what you described (update: bug 65287):

require Win32::SystemInfo; my %mHash = (TotalPhys => 0, AvailPhys => 0); if (Win32::SystemInfo::MemoryStatus(%mHash)) { print $mHash{TotalPhys}; }

Output: Can't use string ("AvailPhys") as a HASH ref while "strict refs" in use at C:/strawberry/perl/site/lib/Win32/SystemInfo.pm line 231.

I'll try it under Strawberry Perl 5.16 and update this post afterwards.

Updates below...

Build failure under Strawberry Perl 5.16.2.1 reported to the author. Same error you reported above.

It looked to be related to bug 48008 so I changed the source as described. The error went away but new problems cropped up so I updated the bug report.


Comment on Re: What version of Strawberry Perl to use?
Select or Download Code
Re^2: What version of Strawberry Perl to use?
by gepebril69 (Beadle) on Feb 11, 2013 at 21:42 UTC

    Thx for the help

    I just noted that my old environment was 5.12.3.0-32bit and my new environment 5.12.3.0-64bit

    My early conclusion is that the problem can lie in the fact that the problem only occurs in the 64bit Strawberry Perl environment, and not the 32 one. I will test it later-on.

      Chad Johnston is working on an update of Win32::SystemInfo. I tested an early version of it a few hours ago and provided some additional patches that appear to fix the remaining 64-bit issues.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017977]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-08-02 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (54 votes), past polls