Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: What version of Strawberry Perl to use?

by Mr. Muskrat (Canon)
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/ line 231.

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

Updates below...

Build failure under Strawberry Perl 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.

Replies are listed 'Best First'.
Re^2: What version of Strawberry Perl to use?
by gepebril69 (Scribe) on Feb 11, 2013 at 21:42 UTC

    Thx for the help

    I just noted that my old environment was and my new environment

    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017977]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2018-06-20 05:56 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.