NAME
Games::Golf::OS - An Operating System detector for Games::Golf
SYNOPSIS
# nothing is exported by default
use Games::Golf::OS;
print "Doing Windows!" if Games::Golf::OS::is_Windows();
# but you can ask for it
use Games::Golf::OS qw/ :functions /;
print "We don't do no Windows" unless is_Windows();
DESCRIPTION
Games::Golf has a complicated way to capture output and errput, which depends on the operating system it's running on. This module provide several functions that do the boring tests for us.
There are two tags: :functions
exports all functions except os_name(), while :windows
only exports the three functions related to the Microsoft Windows operating system.
AVAILABLE METHODS
Several boolean methods are avalaible. The names should be self-explanatory. All the methods return ""
for false. Some specific details can be returned for true.
- is_Windows()
-
Return the variant (
"9x"
or"NT"
) if the system is a Microsoft Windows variant. - is_Windows9x()
-
Return true (
"9x"
) is we are running under some Windows 95 subsystem. (Windows 95, Windows 98.) - is_WindowsNT()
-
Return true (
"NT"
) is we are running under some Windows NT subsystem. (Windows NT, Windows 2000, Windows XP.) - is_Unix()
-
Return the Unix variant if the system is some flavour of Unix. (We don't do "vanilla" Unix, though.)
- os_name()
-
For those who really want it, you can also get the string used internally to store the OS representation. You have to explicitely ask for it to be exported.
AUTHORS
Philippe 'BooK' Bruhat.
See Games::Golf or the included AUTHORS file for the complete list of authors.
SEE ALSO
perl(1), perlport(1), Games::Golf::TestSuite.