Wed Feb 13 12:52:50 2013: Request 83237 was acted upon. Transaction: Correspondence added by BULKDD Queue: Win32-API Subject: Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" Broken in: 0.75 Severity: Critical Owner: Nobody Requestors: compuvision...@gmail.com Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83237 >
On Wed Feb 13 06:12:08 2013, gepebril wrote: > Tobyink has mentioned regarding this issue: > - That particular message usually comes from using a sub designed to be > used as an object method as a class method instead. - > For more info: http://www.perlmonks.org/?node_id=1017850 the failure comes from "$MEMORYSTATUSEX->{dwLength} = Win32::API::Struct->sizeof($MEMORYSTATUSEX);" which was added in https://github.com/iamthechad/perl-win32-systeminfo/commit/6d1264e1899a54f1ec518ec1db4be8ea133401b3 The reason it works on 32 bits is because 2 different paths are taken in ::SystemInfo, starting at https://github.com/iamthechad/perl-win32-systeminfo/blob/e311b78194335a8cfedf8951f495264072f0161d/SystemInfo.pm#L121 . Looking at Win32::API's docs, its unclear in ::Type and ::Struct's POD what is an object method and what is a class method. I looked in ::API's test kit and all ::Struct::sizeof calls were on objects not classes. The problem in ::SystemInfo on x64 is already covered by https://rt.cpan.org/Ticket/Display.html?id=48008 . So what do you want me to do? Add class method support to the ::Struct::sizeof method, or improve the POD and say its object method only? The author of ::SystemInfo last responded in 2009 in the ::SystemInfo bug. He will ultimately have to respond to get this mess fixed. He doesn't seem to be around much anymore. His http://www.megatome.com/ blog's last post is oct 25 2012 and last CPAN upload 4.5 years ago, blog's contact page is broken http://www.megatome.com/contact/ which is domain parked to http://visitorcontact.com/embed/1876 but his github https://github.com/iamthechad?tab=activity had a push 2 days ago so there is some hope. Im filing a github bug ticket to try to contact him.