{
    "mode": "perldoc",
    "parameter": "Perl::OSType",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Perl%3A%3AOSType/json",
    "generated": "2026-06-14T00:21:31Z",
    "synopsis": "use Perl::OSType ':all';\n$currenttype = ostype();\n$othertype = ostype('dragonfly'); # gives 'Unix'",
    "sections": {
        "NAME": {
            "content": "Perl::OSType - Map Perl operating system names to generic types\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 1.010\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Perl::OSType ':all';\n\n$currenttype = ostype();\n$othertype = ostype('dragonfly'); # gives 'Unix'\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Modules that provide OS-specific behaviors often need to know if the current operating system\nmatches a more generic type of operating systems. For example, 'linux' is a type of 'Unix'\noperating system and so is 'freebsd'.\n\nThis module provides a mapping between an operating system name as given by $^O and a more\ngeneric type. The initial version is based on the OS type mappings provided in Module::Build and\nExtUtils::CBuilder. (Thus, Microsoft operating systems are given the type 'Windows' rather than\n'Win32'.)\n",
            "subsections": []
        },
        "USAGE": {
            "content": "No functions are exported by default. The export tag \":all\" will export all functions listed\nbelow.\n\nostype()\n$ostype = ostype();\n$ostype = ostype('MSWin32');\n\nReturns a single, generic OS type for a given operating system name. With no arguments, returns\nthe OS type for the current value of $^O. If the operating system is not recognized, the\nfunction will return the empty string.\n\nisostype()\n$iswindows = isostype('Windows');\n$isunix    = isostype('Unix', 'dragonfly');\n\nGiven an OS type and OS name, returns true or false if the OS name is of the given type. As with\n\"ostype\", it will use the current operating system as a default if no OS name is provided.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "*   Devel::CheckOS\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Bugs / Feature Requests\nPlease report any bugs or feature requests through the issue tracker at\n<https://github.com/Perl-Toolchain-Gang/Perl-OSType/issues>. You will be notified automatically\nof any progress on your issue.\n",
            "subsections": [
                {
                    "name": "Source Code",
                    "content": "This is open source software. The code repository is available for public review and\ncontribution under the terms of the license.\n\n<https://github.com/Perl-Toolchain-Gang/Perl-OSType>\n\ngit clone https://github.com/Perl-Toolchain-Gang/Perl-OSType.git\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "David Golden <dagolden@cpan.org>\n",
            "subsections": []
        },
        "CONTRIBUTORS": {
            "content": "*   Chris 'BinGOs' Williams <chris@bingosnet.co.uk>\n\n*   David Golden <xdg@xdg.me>\n\n*   Graham Ollis <plicease@cpan.org>\n\n*   Jonas B. Nielsen <jonasbn@hoarfrost.local>\n\n*   Owain G. Ainsworth <oga@nicotinebsd.org>\n\n*   Paul Green <Paul.Green@stratus.com>\n\n*   Piotr Roszatycki <piotr.roszatycki@gmail.com>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 2016 by David Golden.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
            "subsections": []
        }
    },
    "summary": "Perl::OSType - Map Perl operating system names to generic types",
    "flags": [],
    "examples": [],
    "see_also": []
}