I don't believe it's safe to assume that CPU bitness == OS bitness.
You cannot run a 64-bit build of an OS on a 32-bit processor.
You can run a 32-bit build of an OS on an (intel) 64-bit processor, but that is done by running the CPU in 32-bit compatibility mode, when for all intents and purposes, it is a 32-bit processor. So, whilst it may be possible to distinguish between the two scenarios, there is little benefit in doing so as none of the 64-bit facilities would be available to you.
Leastwise, none that I can think of.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [Watch: Dir/Any] |
So the module returns 32-bit for a 64-bit CPU running a 32-bit OS?
| [reply] [Watch: Dir/Any] |
So the module
Which module?
Assuming you mean Sys::Info, (Not that I would use that suite of modules anyway.), I have no idea, but it should.
Specifically, the code that deals with 'bitness' queries is Sys::Info::Base which is the base class for Sys::Info::OS. So the question being asked in your scenario above is the bitness of the OS, which should be 32-bit regardless of whether it is running on a 32-bit or 64-bit cpu. And if that is not what the module returns, it is wrong(ly specified).
The answer to what the OP really needs to know will always come back to why he needs to know it. With all the possibilities we have these days:
- 32-bit Perl running under a 32-bit OS on a 32-bit processor.
- 32-bit Perl running under a 32-bit OS on a 64-bit processor
- 32-bit Perl running under a 64-bit OS on a 64-bit processor
- 64-bit Perl running under a 64-bit OS on a 64-bit processor
- 32-bit Perl running under a 32-bit OS within a VM emulating a 32-bit processor, guesting on a 32-bit OS running on a 32-bit processor.
- 32-bit Perl running under a 32-bit OS within a VM emulating a 32-bit processor, guesting on a 32-bit OS running on a 64-bit processor.
- 32-bit Perl running under a 32-bit OS within a VM emulating a 32-bit processor, guesting on a 64-bit OS running on a 64-bit processor.
- 32-bit Perl running under a 32-bit OS within a VM emulating a 64-bit processor, guesting on a 64-bit OS running on a 64-bit processor.
- 32-bit Perl running under a 64-bit OS within a VM emulating a 64-bit processor, guesting on a 64-bit OS running on a 64-bit processor.
- 64-bit Perl running under a 64-bit OS within a VM emulating a 64-bit processor, guesting on a 64-bit OS running on a 64-bit processor.
- Other?
working out which piece of information is actually relevant to the OPs purpose is impossible until he states that purpose.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [Watch: Dir/Any] |
Hi davido,
A couple of questions:
- What's your Sys::Info::Driver::Windows::OS and Sys::Info and perl versions?
- ActivePerl, Strawbery or your own build of perl?
- What's your Windows version (XP, Vista, 7, etc)?
- How did you install Sys::Info::Driver::Windows? (ppm, gcc, cl)?
Thanks,
Burak | [reply] [Watch: Dir/Any] |
| [reply] [Watch: Dir/Any] [d/l] [select] |
Thanks, I'll take a look when I have the time.
| [reply] [Watch: Dir/Any] |