{
    "content": [
        {
            "type": "text",
            "text": "# Module::Build::Compat (perldoc)\n\n## NAME\n\nModule::Build::Compat - Compatibility with ExtUtils::MakeMaker\n\n## SYNOPSIS\n\n# In a Build.PL :\nuse Module::Build;\nmy $build = Module::Build->new\n( modulename => 'Foo::Bar',\nlicense     => 'perl',\ncreatemakefilepl => 'traditional' );\n...\n\n## DESCRIPTION\n\nBecause \"ExtUtils::MakeMaker\" has been the standard way to distribute modules for a long time,\nmany tools (CPAN.pm, or your system administrator) may expect to find a working Makefile.PL in\nevery distribution they download from CPAN. If you want to throw them a bone, you can use\n\"Module::Build::Compat\" to automatically generate a Makefile.PL for you, in one of several\ndifferent styles.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **WARNING**\n- **METHODS** (3 subsections)\n- **SCENARIOS**\n- **AUTHOR**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Module::Build::Compat",
        "section": "",
        "mode": "perldoc",
        "summary": "Module::Build::Compat - Compatibility with ExtUtils::MakeMaker",
        "synopsis": "# In a Build.PL :\nuse Module::Build;\nmy $build = Module::Build->new\n( modulename => 'Foo::Bar',\nlicense     => 'perl',\ncreatemakefilepl => 'traditional' );\n...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "Build",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/Build/3/json"
            },
            {
                "name": "MakeMaker",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/MakeMaker/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "WARNING",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "create_makefile_pl",
                        "lines": 44
                    },
                    {
                        "name": "run_build_pl",
                        "lines": 14
                    },
                    {
                        "name": "write_makefile",
                        "lines": 8
                    }
                ]
            },
            {
                "name": "SCENARIOS",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Module::Build::Compat - Compatibility with ExtUtils::MakeMaker\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "# In a Build.PL :\nuse Module::Build;\nmy $build = Module::Build->new\n( modulename => 'Foo::Bar',\nlicense     => 'perl',\ncreatemakefilepl => 'traditional' );\n...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Because \"ExtUtils::MakeMaker\" has been the standard way to distribute modules for a long time,\nmany tools (CPAN.pm, or your system administrator) may expect to find a working Makefile.PL in\nevery distribution they download from CPAN. If you want to throw them a bone, you can use\n\"Module::Build::Compat\" to automatically generate a Makefile.PL for you, in one of several\ndifferent styles.\n\n\"Module::Build::Compat\" also provides some code that helps out the Makefile.PL at runtime.\n",
                "subsections": []
            },
            "WARNING": {
                "content": "Note that \"Module::Build::Compat\" more often causes installation issues than solves them, and\neach of the three Makefile.PL generation styles has unique compatibility or functionality issues\nthat are unlikely to be fixed. Thus, the use of this module and \"createmakefilepl\" is\ndiscouraged.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "",
                "subsections": [
                    {
                        "name": "create_makefile_pl",
                        "content": "Creates a Makefile.PL in the current directory in one of several styles, based on the\nsupplied \"Module::Build\" object $build. This is typically controlled by passing the desired\nstyle as the \"createmakefilepl\" parameter to \"Module::Build\"'s \"new()\" method; the\nMakefile.PL will then be automatically created during the \"distdir\" action.\n\nThe currently supported styles are:\n\ntraditional\nA Makefile.PL will be created in the \"traditional\" style, i.e. it will use\n\"ExtUtils::MakeMaker\" and won't rely on \"Module::Build\" at all. In order to create the\nMakefile.PL, we'll include the \"requires\" and \"buildrequires\" dependencies as the\n\"PREREQPM\" parameter.\n\nYou don't want to use this style if during the \"perl Build.PL\" stage you ask the user\nquestions, or do some auto-sensing about the user's environment, or if you subclass\n\"Module::Build\" to do some customization, because the vanilla Makefile.PL won't do any\nof that. Many standard \"Module::Build\" features such as \"testrequires\" are also not\nsupported.\n\nsmall\nA small Makefile.PL will be created that passes all functionality through to the\nBuild.PL script in the same directory. The user must already have \"Module::Build\"\ninstalled in order to use this, or else they'll get a module-not-found error.\n\nThis style attempts (with varying success) to translate the Makefile.PL protocol to\nBuild.PL, and is unnecessary on any modern toolchain that recognizes\n\"configurerequires\" metadata described below, as Build.PL will be run by default in\nthis case. See <https://rt.cpan.org/Public/Bug/Display.html?id=75936> for an example of\nthe issues it may cause.\n\npassthrough (DEPRECATED)\nThis is just like the \"small\" option above, but if \"Module::Build\" is not already\ninstalled on the user's system, the script will offer to use \"CPAN.pm\" to download it\nand install it before continuing with the build.\n\nThis option has been deprecated and may be removed in a future version of Module::Build.\nModern CPAN.pm and CPANPLUS will recognize the \"configurerequires\" metadata property\nand install Module::Build before running Build.PL if Module::Build is listed and\nModule::Build now adds itself to configurerequires by default.\n\nPerl 5.10.1 includes \"configurerequires\" support. In the future, when\n\"configurerequires\" support is deemed sufficiently widespread, the \"passthrough\" style\nwill be removed.\n"
                    },
                    {
                        "name": "run_build_pl",
                        "content": "This method runs the Build.PL script, passing it any arguments the user may have supplied to\nthe \"perl Makefile.PL\" command. Because \"ExtUtils::MakeMaker\" and \"Module::Build\" accept\ndifferent arguments, this method also performs some translation between the two.\n\n\"runbuildpl()\" accepts the following named parameters:\n\nargs\nThe \"args\" parameter specifies the parameters that would usually appear on the command\nline of the \"perl Makefile.PL\" command - typically you'll just pass a reference to\n@ARGV.\n\nscript\nThis is the filename of the script to run - it defaults to \"Build.PL\".\n"
                    },
                    {
                        "name": "write_makefile",
                        "content": "This method writes a 'dummy' Makefile that will pass all commands through to the\ncorresponding \"Module::Build\" actions.\n\n\"writemakefile()\" accepts the following named parameters:\n\nmakefile\nThe name of the file to write - defaults to the string \"Makefile\".\n"
                    }
                ]
            },
            "SCENARIOS": {
                "content": "So, some common scenarios are:\n\n1.  Just include a Build.PL script (without a Makefile.PL script), and give installation\ndirections in a README or INSTALL document explaining how to install the module. In\nparticular, explain that the user must install \"Module::Build\" before installing your\nmodule.\n\nNote that if you do this, you may make things easier for yourself, but harder for people\nwith older versions of CPAN or CPANPLUS on their system, because those tools generally only\nunderstand the Makefile.PL/\"ExtUtils::MakeMaker\" way of doing things.\n\n2.  Include a Build.PL script and a \"traditional\" Makefile.PL, created either manually or with\n\"createmakefilepl()\". Users won't ever have to install \"Module::Build\" if they use the\nMakefile.PL, but they won't get to take advantage of \"Module::Build\"'s extra features\neither.\n\nFor good measure, of course, test both the Makefile.PL and the Build.PL before shipping.\n\n3.  Include a Build.PL script and a \"pass-through\" Makefile.PL built using\n\"Module::Build::Compat\". This will mean that people can continue to use the \"old\"\ninstallation commands, and they may never notice that it's actually doing something else\nbehind the scenes. It will also mean that your installation process is compatible with older\nversions of tools like CPAN and CPANPLUS.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Ken Williams <kwilliams@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 2001-2006 Ken Williams. All rights reserved.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Module::Build(3), ExtUtils::MakeMaker(3)\n",
                "subsections": []
            }
        }
    }
}