Tue Jan 08 17:49:05 2013: Request 82572 was acted upon.
Transaction: Ticket created by thoke
Queue: Win32
Subject: Using Win32.pm on Windows 2012 results in "Unknown Windows
version [2:6:2]" warning
Broken in: 0.45
Severity: Critical
Owner: Nobody
Requestors: [email protected]
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=82572 >Using Strawberry Perl 5.16.1.1 (problem exists in 5.16.2.1 as well), Win32.pm doesn't support Windows Server 2012 and produces the following error: Unknown Windows version [2:6:2] at C:/temp/strawberry-perl-5.16.1.1/perl/lib/Win32.pm line 530. A simple script demonstrates the error I see: use Win32; my ( $os_name, undef ) = Win32::GetOSName(); die "os_name undef!" unless (defined $os_name); print "os_name: $os_name\n"; --- Prior to patching Win32.pm, the output on a Windows Server 2012 system is as follows: >perl win2012_demo.pl Unknown Windows version [2:6:2] at C:/temp/strawberry-perl-5.16.1.1/perl/lib/Win32.pm line 530. os_name undef! at win2012_demo.pl line 9. By applying the attached patch, I'm able to successfully execute my script: >perl win2012_demo.pl os_name: Win2012 --- I've also included test cases in the patch for Windows 2012 Standard and Datacenter as well as Windows 8 and Windows 8 Professional. Thanks -Tim
Win2012_Win8.patch
Description: Binary data
