The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Sys::Info::Driver::Windows::OS - Windows backend for Sys::Info::OS

SYNOPSIS

This is a private sub-class.

DESCRIPTION

This document describes version 0.78 of Sys::Info::Driver::Windows::OS released on 17 April 2011.

This document only discusses the driver specific parts.

METHODS

build

cdkey

domain_name

node_name

edition

fs

init

is_win95

is_win9x

is_winnt

is_root

login_name

logon_server

meta

name

product_type

tick_count

tz

uptime

bitness

Please see Sys::Info::OS for definitions of these methods and more.

version

Version method returns the Windows version in %d.%d.%d format. Possible version values and corresponding names are:

   Version   Windows
   -------   -------
   0.0.0     Win32s
   1.4.0     Windows 95
   1.4.10    Windows 98
   1.4.90    Windows Me
   2.3.51    Windows NT 3.51
   2.4.0     Windows NT 4
   2.5.0     Windows 2000
   2.5.1     Windows XP
   2.5.2     Windows Server 2003
   2.6.0     Windows Vista
   2.6.0     Windows Server 2008(*)
   2.6.1     Windows 7(**)

It is also possible to get the short version (5.1 instead of 2.5.1 for XP) if you pass the short parameter with a true value:

    my $v = $os->version( short => 1 );

(*) Unfortunately Windows Server 2008 has the same version number as Vista. One needs to check the name method to differentiate:

    if ( $os->version eq '2.6.0' ) {
        if ( $os->name eq 'Windows Server 2008' ) {
            print "We have the server version, all right";
        }
        else {
            print "Vista";
        }
    }
    else {
        print "Old Technology";
    }

(**) Yes, that is correct. "Windows 7" is not Windows version 7. It's the marketing name.

SEE ALSO

Win32, Sys::Info, Sys::Info::OS, http://www.codeguru.com/cpp/w-p/system/systeminformation/article.php/c8973, http://msdn.microsoft.com/en-us/library/cc216469.aspx, http://msdn.microsoft.com/en-us/library/ms724358(VS.85).aspx .

AUTHOR

Burak Gursoy <burak@cpan.org>.

COPYRIGHT

Copyright 2006 - 2011 Burak Gursoy. All rights reserved.

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.2 or, at your option, any later version of Perl 5 you may have available.