Skip Menu |

This queue is for tickets about the Sys-Info-Driver-Windows CPAN distribution.

Report information
The Basics
Id: 114022
Status: new
Priority: 0/
Queue: Sys-Info-Driver-Windows

People
Owner: Nobody in particular
Requestors: Tim.Boughen [...] tollgroup.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Include Windows 10 in OS.pm
Date: Wed, 27 Apr 2016 02:02:29 +0000
To: "bug-Sys-Info-Driver-Windows [...] rt.cpan.org" <bug-Sys-Info-Driver-Windows [...] rt.cpan.org>
From: Tim Boughen <Tim.Boughen [...] tollgroup.com>
$os->name(long=> 1) returns "Windows NT 2.10.0 build 10240" My script my $info = Sys::Info->new; my $cpu = $info->device('CPU'); my $computer = sprintf "%s (%s bit)", scalar $cpu->identify, $cpu->bitness; my $os = $info->os; my ($bitReturn); if ( $os->bitness ) { $bitReturn = $os->bitness; } else { $bitReturn = &bitter(); } my $winver = sprintf "%s (%s bit)", $os->name(long => 1), $bitReturn; sub bitter { my $Register = "Software\\Wow6432Node"; my ($hkey,$bitReturn); if ($HKEY_LOCAL_MACHINE->Open($Register,$hkey)) { $bitReturn = "64"; } else { $bitReturn = "32" } return $bitReturn; } print "$winver\n";