NAME

Siebel::AssertOS - verifies if the OS is supported by Siebel applications

SYNOPSIS

    package Your::Package;
        use Siebel::AssertOS;

DESCRIPTION

This modules will help identifying if the current OS that is running is supported by Siebel applications. If not, the module will die, forcing the code to stop being executed.

This is particulary useful for automated tests.

The list of supported OS is as defined by Oracle documentation regarding Siebel 8.2 and the list of OS from Devel::CheckOS distribution. Actually, Siebel::AssertOS is based on Devel::CheckOS, borrowing code from it, but does not depend on it.

Regarding supported Linux distributions, this module will also validate if the code is running on a supported by Siebel distribution.

EXPORT

None, but the functions below can be used by calling them with the complete package name (Siebel::AssertOS::FUNCTION).

die_if_os_isnt

Expects an optional string parameter with the operational system name. If not given, it will assume $^O as default.

It will execute os_is with the operational system name, calling die_unsuported if the return value from os_is is false.

Beware that the given parameter must follow the same provided by $^O, including case and format. die_if_os_isnt is called by default when the module is imported to another package.

die_unsupported

Expects a string as parameter.

Will execute die with a message telling that the parameter is not supported.

os_is

Expects a string as parameter, being the string the OS name.

Returns true or false depending on the give value. The string is restricted by those return by $^O special variable.

SEE ALSO

AUTHOR

Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 of Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

This file is part of Siebel GNU Tools project.

Siebel GNU Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Siebel GNU Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Siebel GNU Tools. If not, see <http://www.gnu.org/licenses/>.