[rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs"
13 views
Skip to first unread message
Albert via RT
unread,
Feb 11, 2013, 5:42:00 PM2/11/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Mon Feb 11 17:41:59 2013: Request 83237 was acted upon.
Transaction: Correspondence added by gepebril
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: compuvi...@gmail.com Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83237 >
Thanks for the reply and testing.
> So what is the failing code? I tried a "make test" on Win32:SystemInfo
> and it passed. I also tried
I never done this make test, do you have the cli how to test that?
> and saw nothing (like warnings/dies) in console. Using ::API 0.75 on
> 32bit winxp.
I tried to replicate my old environment with autobundle and it worked,
but not for the Win32::SystemInfo module. It mentioned I could only
install it with force. I just found out that my old environment is
5.12.3.0-32bit and not 5.12.3.0-64bit which I used on the new
environment. The problem only occurs on the new environment. I run on
both environments Win7 64 bits. So early conclusion is that the problem
only occurs on 64 bits versions of Strawberry Perl, not on the 32 bits
version. I will check it hopefully tomorrow.
Albert via RT
unread,
Feb 12, 2013, 3:57:55 PM2/12/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Tue Feb 12 15:57:54 2013: Request 83237 was acted upon.
Transaction: Correspondence added by gepebril
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: compuvi...@gmail.com Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83237 >
I will check it hopefully tomorrow.
Yup the problem didn't occur in the 32 bits (latest) version of Perl
Strawberry. Should Win32::SystemInfo be compatible with the 64 release
of Strawberry Perl?
Daniel Dragan via RT
unread,
Feb 13, 2013, 2:44:44 AM2/13/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Wed Feb 13 02:44:43 2013: Request 83237 was acted upon.
Transaction: Correspondence added by BULKDD
On Tue Feb 12 15:57:54 2013, gepebril wrote:
> I will check it hopefully tomorrow.
>
> Yup the problem didn't occur in the 32 bits (latest) version of Perl
> Strawberry. Should Win32::SystemInfo be compatible with the 64 release
> of Strawberry Perl?
I reproduced it ("Can't use string ("Win32::API::Struct") as a HASH ref
while "strict refs"") only on x64 Perl with a nmake test. 32 bit Perl
passed an nmake test. Win32::API is supposed to support x64 as good as
32 bits. If the user's app that uses Win32::API is written *correctly*,
his app will work transparently on x64 and 32 bit. I will investigate it
further tomorrow.
On Mon Feb 11 17:41:59 2013, gepebril wrote:
> Thanks for the reply and testing.
>
> > So what is the failing code? I tried a "make test" on Win32:SystemInfo
> > and it passed. I also tried
> I never done this make test, do you have the cli how to test that?
Google "perl make test" no quotes. I specifically used nmake (not make)
since I use Visual C, not Cygwin/Linux.
Albert via RT
unread,
Feb 13, 2013, 6:04:29 AM2/13/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Wed Feb 13 06:04:28 2013: Request 83237 was acted upon.
Transaction: Correspondence added by gepebril
> I reproduced it ("Can't use string ("Win32::API::Struct") as a HASH ref
> while "strict refs"") only on x64 Perl with a nmake test. 32 bit Perl
> passed an nmake test. Win32::API is supposed to support x64 as good as
> 32 bits. If the user's app that uses Win32::API is written *correctly*,
> his app will work transparently on x64 and 32 bit. I will investigate it
> further tomorrow.
Aha, thanks for taking the time to try to reproduce it. Good news. A bug
is bug when it can be reproduced. I used the sample from the Cpan module
Win32::SystemInfo so that part should be correctly. Or are you referring
to Win:System32Info that is not using Win32::API correctly?
> Google "perl make test" no quotes. I specifically used nmake (not make)
> since I use Visual C, not Cygwin/Linux.
Ok, I forgot. You have to use make when you don't use cpan -> install
but download the module manually. As for the last two years everything
with Perl went so smoothly I stopped using it.
Albert via RT
unread,
Feb 13, 2013, 6:12:09 AM2/13/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Wed Feb 13 06:12:08 2013: Request 83237 was acted upon.
Transaction: Correspondence added by gepebril
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: compuvi...@gmail.com Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83237 >
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
Daniel Dragan via RT
unread,
Feb 13, 2013, 12:52:51 PM2/13/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Wed Feb 13 12:52:50 2013: Request 83237 was acted upon.
Transaction: Correspondence added by BULKDD
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
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.
Daniel Dragan via RT
unread,
Feb 13, 2013, 7:19:34 PM2/13/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Wed Feb 13 19:19:32 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: compuvi...@gmail.com Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83237 >
On Wed Feb 13 12:52:50 2013, BULKDD wrote:
>
> 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.
>
>
So What I understand from this webpage:
https://github.com/iamthechad/perl-win32-systeminfo/issues/1 is that
iamthechad is the owner of the module and don't have time any more to
fix it. It seems if that is the case you can make the specific module
available for adoption, so somebody else can take over. Sounds like a
nice solution.
I found that other people have also probs with the 64 bits version
Until this happens I will continue to work on the 32 bits Perl version
Chad Johnston via RT
unread,
Feb 15, 2013, 12:24:07 AM2/15/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Fri Feb 15 00:24:06 2013: Request 83237 was acted upon.
Transaction: Correspondence added by CJOHNSTON
On Thu Feb 14 13:56:10 2013, gepebril wrote:
> @bulk88
>
> Thanks for al the time and research.
>
> So What I understand from this webpage:
> https://github.com/iamthechad/perl-win32-systeminfo/issues/1 is that
> iamthechad is the owner of the module and don't have time any more to
> fix it. It seems if that is the case you can make the specific module
> available for adoption, so somebody else can take over. Sounds like a
> nice solution.
>
> I found that other people have also probs with the 64 bits version
>
> Until this happens I will continue to work on the 32 bits Perl version
So, I don't blog much and I haven't fixed my broken contact form. It's
taken me a couple of days to build an environment where I could work on
this since I've moved away from Windows.
I've updated 48008, but the gist right now is that the changes
identified fail under ActivePerl. I haven't even tried any other distros
yet. I've started a feature branch at
https://github.com/iamthechad/perl-win32-systeminfo/tree/v012 in case
anybody wants to take a look.
Daniel Dragan via RT
unread,
Feb 16, 2013, 2:10:57 PM2/16/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Sat Feb 16 14:10:56 2013: Request 83237 was acted upon.
Transaction: Correspondence added by BULKDD
On Fri Feb 15 00:24:06 2013, CJOHNSTON wrote:
>
> So, I don't blog much and I haven't fixed my broken contact form. It's
> taken me a couple of days to build an environment where I could work on
> this since I've moved away from Windows.
>
> I've updated 48008, but the gist right now is that the changes
> identified fail under ActivePerl. I haven't even tried any other distros
> yet. I've started a feature branch at
> https://github.com/iamthechad/perl-win32-systeminfo/tree/v012 in case
> anybody wants to take a look.
I tested the newly released 0.12 of Win32-SystemInfo (
http://search.cpan.org/~cjohnston/Win32-SystemInfo-0.12/ ). nmake test and
__________________________________________
use Win32::SystemInfo;
my %mHash = (TotalPhys => 0, AvailPhys => 0, MemLoad => 0);
if (Win32::SystemInfo::MemoryStatus(%mHash)) {0;}
__________________________________________
don't fail anymore as they did in 0.11. So I am closing this bug.
Albert via RT
unread,
Feb 21, 2013, 8:54:35 AM2/21/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libw...@perl.org
Thu Feb 21 08:54:33 2013: Request 83237 was acted upon.
Transaction: Correspondence added by gepebril
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: compuvi...@gmail.com
> I tested the newly released 0.12 of Win32-SystemInfo (
> http://search.cpan.org/~cjohnston/Win32-SystemInfo-0.12/ ). nmake test
and
> __________________________________________
> use Win32::SystemInfo;
> my %mHash = (TotalPhys => 0, AvailPhys => 0, MemLoad => 0);
> if (Win32::SystemInfo::MemoryStatus(%mHash)) {0;}
> __________________________________________
> don't fail anymore as they did in 0.11. So I am closing this bug.