{
    "mode": "perldoc",
    "parameter": "Module::Build",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Module%3A%3ABuild/json",
    "generated": "2026-06-09T15:33:24Z",
    "synopsis": "Standard process for building & installing modules:\nperl Build.PL\n./Build\n./Build test\n./Build install\nOr, if you're on a platform (like DOS or Windows) that doesn't require the \"./\" notation, you\ncan do this:\nperl Build.PL\nBuild\nBuild test\nBuild install",
    "sections": {
        "NAME": {
            "content": "Module::Build - Build and install Perl modules\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "Standard process for building & installing modules:\n\nperl Build.PL\n./Build\n./Build test\n./Build install\n\nOr, if you're on a platform (like DOS or Windows) that doesn't require the \"./\" notation, you\ncan do this:\n\nperl Build.PL\nBuild\nBuild test\nBuild install\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"Module::Build\" is a system for building, testing, and installing Perl modules. It is meant to\nbe an alternative to \"ExtUtils::MakeMaker\". Developers may alter the behavior of the module\nthrough subclassing. It also does not require a \"make\" on your system - most of the\n\"Module::Build\" code is pure-perl and written in a very cross-platform way.\n\nSee \"COMPARISON\" for more comparisons between \"Module::Build\" and other installer tools.\n\nTo install \"Module::Build\", and any other module that uses \"Module::Build\" for its installation\nprocess, do the following:\n\nperl Build.PL       # 'Build.PL' script creates the 'Build' script\n./Build             # Need ./ to ensure we're using this \"Build\" script\n./Build test        # and not another one that happens to be in the PATH\n./Build install\n\nThis illustrates initial configuration and the running of three 'actions'. In this case the\nactions run are 'build' (the default action), 'test', and 'install'. Other actions defined so\nfar include:\n\nbuild                          manifest\nclean                          manifestskip\ncode                           manpages\nconfigdata                    pardist\ndiff                           ppd\ndist                           ppmdist\ndistcheck                      prereqdata\ndistclean                      prereqreport\ndistdir                        pureinstall\ndistinstall                    realclean\ndistmeta                       retest\ndistsign                       skipcheck\ndisttest                       test\ndocs                           testall\nfakeinstall                    testcover\nhelp                           testdb\nhtml                           testpod\ninstall                        testpodcoverage\ninstalldeps                    versioninstall\n\nYou can run the 'help' action for a complete list of actions.\n",
            "subsections": []
        },
        "GUIDE TO DOCUMENTATION": {
            "content": "The documentation for \"Module::Build\" is broken up into sections:\n\nGeneral Usage (Module::Build)\nThis is the document you are currently reading. It describes basic usage and background\ninformation. Its main purpose is to assist the user who wants to learn how to invoke and\ncontrol \"Module::Build\" scripts at the command line.\n\nAuthoring Reference (Module::Build::Authoring)\nThis document describes the structure and organization of \"Module::Build\", and the relevant\nconcepts needed by authors who are writing Build.PL scripts for a distribution or\ncontrolling \"Module::Build\" processes programmatically.\n\nAPI Reference (Module::Build::API)\nThis is a reference to the \"Module::Build\" API.\n\nCookbook (Module::Build::Cookbook)\nThis document demonstrates how to accomplish many common tasks. It covers general command\nline usage and authoring of Build.PL scripts. Includes working examples.\n",
            "subsections": []
        },
        "ACTIONS": {
            "content": "There are some general principles at work here. First, each task when building a module is\ncalled an \"action\". These actions are listed above; they correspond to the building, testing,\ninstalling, packaging, etc., tasks.\n\nSecond, arguments are processed in a very systematic way. Arguments are always key=value pairs.\nThey may be specified at \"perl Build.PL\" time (i.e. \"perl Build.PL destdir=/my/secret/place\"),\nin which case their values last for the lifetime of the \"Build\" script. They may also be\nspecified when executing a particular action (i.e. \"Build test verbose=1\"), in which case their\nvalues last only for the lifetime of that command. Per-action command line parameters take\nprecedence over parameters specified at \"perl Build.PL\" time.\n\nThe build process also relies heavily on the \"Config.pm\" module. If the user wishes to override\nany of the values in \"Config.pm\", she may specify them like so:\n\nperl Build.PL --config cc=gcc --config ld=gcc\n\nThe following build actions are provided by default.\n\nbuild\n[version 0.01]\n\nIf you run the \"Build\" script without any arguments, it runs the \"build\" action, which in\nturn runs the \"code\" and \"docs\" actions.\n\nThis is analogous to the \"MakeMaker\" *make all* target.\n\nclean\n[version 0.01]\n\nThis action will clean up any files that the build process may have created, including the\n\"blib/\" directory (but not including the \"build/\" directory and the \"Build\" script itself).\n\ncode\n[version 0.20]\n\nThis action builds your code base.\n\nBy default it just creates a \"blib/\" directory and copies any \".pm\" and \".pod\" files from\nyour \"lib/\" directory into the \"blib/\" directory. It also compiles any \".xs\" files from\n\"lib/\" and places them in \"blib/\". Of course, you need a working C compiler (probably the\nsame one that built perl itself) for the compilation to work properly.\n\nThe \"code\" action also runs any \".PL\" files in your lib/ directory. Typically these create\nother files, named the same but without the \".PL\" ending. For example, a file\nlib/Foo/Bar.pm.PL could create the file lib/Foo/Bar.pm. The \".PL\" files are processed first,\nso any \".pm\" files (or other kinds that we deal with) will get copied correctly.\n\nconfigdata\n[version 0.26]\n\n...\n\ndiff\n[version 0.14]\n\nThis action will compare the files about to be installed with their installed counterparts.\nFor .pm and .pod files, a diff will be shown (this currently requires a 'diff' program to be\nin your PATH). For other files like compiled binary files, we simply report whether they\ndiffer.\n\nA \"flags\" parameter may be passed to the action, which will be passed to the 'diff' program.\nConsult your 'diff' documentation for the parameters it will accept - a good one is \"-u\":\n\n./Build diff flags=-u\n\ndist\n[version 0.02]\n\nThis action is helpful for module authors who want to package up their module for source\ndistribution through a medium like CPAN. It will create a tarball of the files listed in\nMANIFEST and compress the tarball using GZIP compression.\n\nBy default, this action will use the \"Archive::Tar\" module. However, you can force it to use\nbinary \"tar\" and \"gzip\" executables by supplying an explicit \"tar\" (and optional \"gzip\")\nparameter:\n\n./Build dist --tar C:\\path\\to\\tar.exe --gzip C:\\path\\to\\zip.exe\n\ndistcheck\n[version 0.05]\n\nReports which files are in the build directory but not in the MANIFEST file, and vice versa.\n(See \"manifest\" for details.)\n\ndistclean\n[version 0.05]\n\nPerforms the 'realclean' action and then the 'distcheck' action.\n\ndistdir\n[version 0.05]\n\nCreates a \"distribution directory\" named \"$distname-$distversion\" (if that directory\nalready exists, it will be removed first), then copies all the files listed in the MANIFEST\nfile to that directory. This directory is what the distribution tarball is created from.\n\ndistinstall\n[version 0.37]\n\nPerforms the 'distdir' action, then switches into that directory and runs a \"perl Build.PL\",\nfollowed by the 'build' and 'install' actions in that directory. Use PERLMBOPT or\n.modulebuildrc to set options that should be applied during subprocesses\n\ndistmeta\n[version 0.21]\n\nCreates the META.yml file that describes the distribution.\n\nMETA.yml is a file containing various bits of *metadata* about the distribution. The\nmetadata includes the distribution name, version, abstract, prerequisites, license, and\nvarious other data about the distribution. This file is created as META.yml in a simplified\nYAML format.\n\nMETA.yml file must also be listed in MANIFEST - if it's not, a warning will be issued.\n\nThe current version of the META.yml specification can be found on CPAN as CPAN::Meta::Spec.\n\ndistsign\n[version 0.16]\n\nUses \"Module::Signature\" to create a SIGNATURE file for your distribution, and adds the\nSIGNATURE file to the distribution's MANIFEST.\n\ndisttest\n[version 0.05]\n\nPerforms the 'distdir' action, then switches into that directory and runs a \"perl Build.PL\",\nfollowed by the 'build' and 'test' actions in that directory. Use PERLMBOPT or\n.modulebuildrc to set options that should be applied during subprocesses\n\ndocs\n[version 0.20]\n\nThis will generate documentation (e.g. Unix man pages and HTML documents) for any\ninstallable items under blib/ that contain POD. If there are no \"bindoc\" or \"libdoc\"\ninstallation targets defined (as will be the case on systems that don't support Unix\nmanpages) no action is taken for manpages. If there are no \"binhtml\" or \"libhtml\"\ninstallation targets defined no action is taken for HTML documents.\n\nfakeinstall\n[version 0.02]\n\nThis is just like the \"install\" action, but it won't actually do anything, it will just\nreport what it *would* have done if you had actually run the \"install\" action.\n\nhelp\n[version 0.03]\n\nThis action will simply print out a message that is meant to help you use the build process.\nIt will show you a list of available build actions too.\n\nWith an optional argument specifying an action name (e.g. \"Build help test\"), the 'help'\naction will show you any POD documentation it can find for that action.\n\nhtml\n[version 0.26]\n\nThis will generate HTML documentation for any binary or library files under blib/ that\ncontain POD. The HTML documentation will only be installed if the install paths can be\ndetermined from values in \"Config.pm\". You can also supply or override install paths on the\ncommand line by specifying \"installpath\" values for the \"binhtml\" and/or \"libhtml\"\ninstallation targets.\n\nWith an optional \"htmllinks\" argument set to a false value, you can skip the search for\nother documentation to link to, because that can waste a lot of time if there aren't any\nlinks to generate anyway:\n\n./Build html --htmllinks 0\n\ninstall\n[version 0.01]\n\nThis action will use \"ExtUtils::Install\" to install the files from \"blib/\" into the system.\nSee \"INSTALL PATHS\" for details about how Module::Build determines where to install things,\nand how to influence this process.\n\nIf you want the installation process to look around in @INC for other versions of the stuff\nyou're installing and try to delete it, you can use the \"uninst\" parameter, which tells\n\"ExtUtils::Install\" to do so:\n\n./Build install uninst=1\n\nThis can be a good idea, as it helps prevent multiple versions of a module from being\npresent on your system, which can be a confusing situation indeed.\n\ninstalldeps\n[version 0.36]\n\nThis action will use the \"cpanclient\" parameter as a command to install missing\nprerequisites. You will be prompted whether to install optional dependencies.\n\nThe \"cpanclient\" option defaults to 'cpan' but can be set as an option or in\n.modulebuildrc. It must be a shell command that takes a list of modules to install as\narguments (e.g. 'cpanp -i' for CPANPLUS). If the program part is a relative path (e.g.\n'cpan' or 'cpanp'), it will be located relative to the perl program that executed Build.PL.\n\n/opt/perl/5.8.9/bin/perl Build.PL\n./Build installdeps --cpanclient 'cpanp -i'\n# installs to 5.8.9\n\nmanifest\n[version 0.05]\n\nThis is an action intended for use by module authors, not people installing modules. It will\nbring the MANIFEST up to date with the files currently present in the distribution. You may\nuse a MANIFEST.SKIP file to exclude certain files or directories from inclusion in the\nMANIFEST. MANIFEST.SKIP should contain a bunch of regular expressions, one per line. If a\nfile in the distribution directory matches any of the regular expressions, it won't be\nincluded in the MANIFEST.\n\nThe following is a reasonable MANIFEST.SKIP starting point, you can add your own stuff to\nit:\n\n^build\n^Build$\n^blib\n~$\n\\.bak$\n^MANIFEST\\.SKIP$\nCVS\n\nSee the \"distcheck\" and \"skipcheck\" actions if you want to find out what the \"manifest\"\naction would do, without actually doing anything.\n\nmanifestskip\n[version 0.3608]\n\nThis is an action intended for use by module authors, not people installing modules. It will\ngenerate a boilerplate MANIFEST.SKIP file if one does not already exist.\n\nmanpages\n[version 0.28]\n\nThis will generate man pages for any binary or library files under blib/ that contain POD.\nThe man pages will only be installed if the install paths can be determined from values in\n\"Config.pm\". You can also supply or override install paths by specifying there values on the\ncommand line with the \"bindoc\" and \"libdoc\" installation targets.\n\npardist\n[version 0.2806]\n\nGenerates a PAR binary distribution for use with PAR or PAR::Dist.\n\nIt requires that the PAR::Dist module (version 0.17 and up) is installed on your system.\n\nppd [version 0.20]\n\nBuild a PPD file for your distribution.\n\nThis action takes an optional argument \"codebase\" which is used in the generated PPD file to\nspecify the (usually relative) URL of the distribution. By default, this value is the\ndistribution name without any path information.\n\nExample:\n\n./Build ppd --codebase \"MSWin32-x86-multi-thread/Module-Build-0.21.tar.gz\"\n\nppmdist\n[version 0.23]\n\nGenerates a PPM binary distribution and a PPD description file. This action also invokes the\n\"ppd\" action, so it can accept the same \"codebase\" argument described under that action.\n\nThis uses the same mechanism as the \"dist\" action to tar & zip its output, so you can supply\n\"tar\" and/or \"gzip\" parameters to affect the result.\n\nprereqdata\n[version 0.32]\n\nThis action prints out a Perl data structure of all prerequisites and the versions required.\nThe output can be loaded again using \"eval()\". This can be useful for external tools that\nwish to query a Build script for prerequisites.\n\nprereqreport\n[version 0.28]\n\nThis action prints out a list of all prerequisites, the versions required, and the versions\nactually installed. This can be useful for reviewing the configuration of your system prior\nto a build, or when compiling data to send for a bug report.\n\npureinstall\n[version 0.28]\n\nThis action is identical to the \"install\" action. In the future, though, when \"install\"\nstarts writing to the file $(INSTALLARCHLIB)/perllocal.pod, \"pureinstall\" won't, and that\nwill be the only difference between them.\n\nrealclean\n[version 0.01]\n\nThis action is just like the \"clean\" action, but also removes the \"build\" directory and the\n\"Build\" script. If you run the \"realclean\" action, you are essentially starting over, so you\nwill have to re-create the \"Build\" script again.\n\nretest\n[version 0.2806]\n\nThis is just like the \"test\" action, but doesn't actually build the distribution first, and\ndoesn't add blib/ to the load path, and therefore will test against a *previously* installed\nversion of the distribution. This can be used to verify that a certain installed\ndistribution still works, or to see whether newer versions of a distribution still pass the\nold regression tests, and so on.\n\nskipcheck\n[version 0.05]\n\nReports which files are skipped due to the entries in the MANIFEST.SKIP file (See \"manifest\"\nfor details)\n\ntest\n[version 0.01]\n\nThis will use \"Test::Harness\" or \"TAP::Harness\" to run any regression tests and report their\nresults. Tests can be defined in the standard places: a file called \"test.pl\" in the\ntop-level directory, or several files ending with \".t\" in a \"t/\" directory.\n\nIf you want tests to be 'verbose', i.e. show details of test execution rather than just\nsummary information, pass the argument \"verbose=1\".\n\nIf you want to run tests under the perl debugger, pass the argument \"debugger=1\".\n\nIf you want to have Module::Build find test files with different file name extensions, pass\nthe \"testfileexts\" argument with an array of extensions, such as \"[qw( .t .s .z )]\".\n\nIf you want test to be run by \"TAP::Harness\", rather than \"Test::Harness\", pass the argument\n\"tapharnessargs\" as an array reference of arguments to pass to the TAP::Harness\nconstructor.\n\nIn addition, if a file called \"visual.pl\" exists in the top-level directory, this file will\nbe executed as a Perl script and its output will be shown to the user. This is a good place\nto put speed tests or other tests that don't use the \"Test::Harness\" format for output.\n\nTo override the choice of tests to run, you may pass a \"testfiles\" argument whose value is\na whitespace-separated list of test scripts to run. This is especially useful in\ndevelopment, when you only want to run a single test to see whether you've squashed a\ncertain bug yet:\n\n./Build test --testfiles t/somethingfailing.t\n\nYou may also pass several \"testfiles\" arguments separately:\n\n./Build test --testfiles t/one.t --testfiles t/two.t\n\nor use a \"glob()\"-style pattern:\n\n./Build test --testfiles 't/01-*.t'\n\ntestall\n[version 0.2807]\n\n[Note: the 'testall' action and the code snippets below are currently in alpha stage, see\n<http://www.nntp.perl.org/group/perl.module.build/2007/03/msg584.html> ]\n\nRuns the \"test\" action plus each of the \"test$type\" actions defined by the keys of the\n\"testtypes\" parameter.\n\nCurrently, you need to define the ACTIONtest$type method yourself and enumerate them in the\ntesttypes parameter.\n\nmy $mb = Module::Build->subclass(\ncode => q(\nsub ACTIONtestspecial { shift->generictest(type => 'special'); }\nsub ACTIONtestauthor  { shift->generictest(type => 'author'); }\n)\n)->new(\n...\ntesttypes  => {\nspecial => '.st',\nauthor  => ['.at', '.pt' ],\n},\n...\n\ntestcover\n[version 0.26]\n\nRuns the \"test\" action using \"Devel::Cover\", generating a code-coverage report showing which\nparts of the code were actually exercised during the tests.\n\nTo pass options to \"Devel::Cover\", set the $DEVELCOVEROPTIONS environment variable:\n\nDEVELCOVEROPTIONS=-ignore,Build ./Build testcover\n\ntestdb\n[version 0.05]\n\nThis is a synonym for the 'test' action with the \"debugger=1\" argument.\n\ntestpod\n[version 0.25]\n\nThis checks all the files described in the \"docs\" action and produces \"Test::Harness\"-style\noutput. If you are a module author, this is useful to run before creating a new release.\n\ntestpodcoverage\n[version 0.28]\n\nThis checks the pod coverage of the distribution and produces \"Test::Harness\"-style output.\nIf you are a module author, this is useful to run before creating a new release.\n\nversioninstall\n[version 0.16]\n\nNote: since \"only.pm\" is so new, and since we just recently added support for it here\ntoo, this feature is to be considered experimental.\n\nIf you have the \"only.pm\" module installed on your system, you can use this action to\ninstall a module into the version-specific library trees. This means that you can have\nseveral versions of the same module installed and \"use\" a specific one like this:\n\nuse only MyModule => 0.55;\n\nTo override the default installation libraries in \"only::config\", specify the \"versionlib\"\nparameter when you run the \"Build.PL\" script:\n\nperl Build.PL --versionlib /my/version/place/\n\nTo override which version the module is installed as, specify the \"version\" parameter when\nyou run the \"Build.PL\" script:\n\nperl Build.PL --version 0.50\n\nSee the \"only.pm\" documentation for more information on version-specific installs.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "Command Line Options",
                    "content": "The following options can be used during any invocation of \"Build.PL\" or the Build script,\nduring any action. For information on other options specific to an action, see the documentation\nfor the respective action.\n\nNOTE: There is some preliminary support for options to use the more familiar long option style.\nMost options can be preceded with the \"--\" long option prefix, and the underscores changed to\ndashes (e.g. \"--use-rcfile\"). Additionally, the argument to boolean options is optional, and\nboolean options can be negated by prefixing them with \"no\" or \"no-\" (e.g. \"--noverbose\" or\n\"--no-verbose\").\n\nquiet\nSuppress informative messages on output.\n\nverbose\nDisplay extra information about the Build on output. \"verbose\" will turn off \"quiet\"\n\ncpanclient\nSets the \"cpanclient\" command for use with the \"installdeps\" action. See \"installdeps\" for\nmore details.\n\nusercfile\nLoad the ~/.modulebuildrc option file. This option can be set to false to prevent the custom\nresource file from being loaded.\n\nallowmbmismatch\nSuppresses the check upon startup that the version of Module::Build we're now running under\nis the same version that was initially invoked when building the distribution (i.e. when the\n\"Build.PL\" script was first run). As of 0.3601, a mismatch results in a warning instead of a\nfatal error, so this option effectively just suppresses the warning.\n\ndebug\nPrints Module::Build debugging information to STDOUT, such as a trace of executed build\nactions.\n\nDefault Options File (.modulebuildrc)\n[version 0.28]\n\nWhen Module::Build starts up, it will look first for a file, $ENV{HOME}/.modulebuildrc. If it's\nnot found there, it will look in the .modulebuildrc file in the directories referred to by the\nenvironment variables \"HOMEDRIVE\" + \"HOMEDIR\", \"USERPROFILE\", \"APPDATA\", \"WINDIR\", \"SYS$LOGIN\".\nIf the file exists, the options specified there will be used as defaults, as if they were typed\non the command line. The defaults can be overridden by specifying new values on the command\nline.\n\nThe action name must come at the beginning of the line, followed by any amount of whitespace and\nthen the options. Options are given the same as they would be on the command line. They can be\nseparated by any amount of whitespace, including newlines, as long there is whitespace at the\nbeginning of each continued line. Anything following a hash mark (\"#\") is considered a comment,\nand is stripped before parsing. If more than one line begins with the same action name, those\nlines are merged into one set of options.\n\nBesides the regular actions, there are two special pseudo-actions: the key \"*\" (asterisk)\ndenotes any global options that should be applied to all actions, and the key 'BuildPL'\nspecifies options to be applied when you invoke \"perl Build.PL\".\n\n*           verbose=1   # global options\ndiff        flags=-u\ninstall     --installbase /home/ken\n--installpath html=/home/ken/docs/html\ninstalldeps --cpanclient 'cpanp -i'\n\nIf you wish to locate your resource file in a different location, you can set the environment\nvariable \"MODULEBUILDRC\" to the complete absolute path of the file containing your options.\n"
                },
                {
                    "name": "Environment variables",
                    "content": "MODULEBUILDRC\n[version 0.28]\n\nSpecifies an alternate location for a default options file as described above.\n\nPERLMBOPT\n[version 0.36]\n\nCommand line options that are applied to Build.PL or any Build action. The string is split\nas the shell would (e.g. whitespace) and the result is prepended to any actual command-line\narguments.\n"
                }
            ]
        },
        "INSTALL PATHS": {
            "content": "[version 0.19]\n\nWhen you invoke Module::Build's \"build\" action, it needs to figure out where to install things.\nThe nutshell version of how this works is that default installation locations are determined\nfrom Config.pm, and they may be overridden by using the \"installpath\" parameter. An\n\"installbase\" parameter lets you specify an alternative installation root like /home/foo, and a\n\"destdir\" lets you specify a temporary installation directory like /tmp/install in case you want\nto create bundled-up installable packages.\n\nNatively, Module::Build provides default installation locations for the following types of\ninstallable items:\n\nlib Usually pure-Perl module files ending in .pm.\n\narch\n\"Architecture-dependent\" module files, usually produced by compiling XS, Inline, or similar\ncode.\n\nscript\nPrograms written in pure Perl. In order to improve reuse, try to make these as small as\npossible - put the code into modules whenever possible.\n\nbin \"Architecture-dependent\" executable programs, i.e. compiled C code or something. Pretty rare\nto see this in a perl distribution, but it happens.\n\nbindoc\nDocumentation for the stuff in \"script\" and \"bin\". Usually generated from the POD in those\nfiles. Under Unix, these are manual pages belonging to the 'man1' category.\n\nlibdoc\nDocumentation for the stuff in \"lib\" and \"arch\". This is usually generated from the POD in\n.pm files. Under Unix, these are manual pages belonging to the 'man3' category.\n\nbinhtml\nThis is the same as \"bindoc\" above, but applies to HTML documents.\n\nlibhtml\nThis is the same as \"libdoc\" above, but applies to HTML documents.\n\nFour other parameters let you control various aspects of how installation paths are determined:\n\ninstalldirs\nThe default destinations for these installable things come from entries in your system's\n\"Config.pm\". You can select from three different sets of default locations by setting the\n\"installdirs\" parameter as follows:\n\n'installdirs' set to:\ncore          site                vendor\n\nuses the following defaults from Config.pm:\n\nlib     => installprivlib  installsitelib      installvendorlib\narch    => installarchlib  installsitearch     installvendorarch\nscript  => installscript   installsitescript   installvendorscript\nbin     => installbin      installsitebin      installvendorbin\nbindoc  => installman1dir  installsiteman1dir  installvendorman1dir\nlibdoc  => installman3dir  installsiteman3dir  installvendorman3dir\nbinhtml => installhtml1dir installsitehtml1dir installvendorhtml1dir [*]\nlibhtml => installhtml3dir installsitehtml3dir installvendorhtml3dir [*]\n\n* Under some OS (eg. MSWin32) the destination for HTML documents is\ndetermined by the C<Config.pm> entry C<installhtmldir>.\n\nThe default value of \"installdirs\" is \"site\". If you're creating vendor distributions of\nmodule packages, you may want to do something like this:\n\nperl Build.PL --installdirs vendor\n\nor\n\n./Build install --installdirs vendor\n\nIf you're installing an updated version of a module that was included with perl itself (i.e.\na \"core module\"), then you may set \"installdirs\" to \"core\" to overwrite the module in its\npresent location.\n\n(Note that the 'script' line is different from \"MakeMaker\" - unfortunately there's no such\nthing as \"installsitescript\" or \"installvendorscript\" entry in \"Config.pm\", so we use the\n\"installsitebin\" and \"installvendorbin\" entries to at least get the general location right.\nIn the future, if \"Config.pm\" adds some more appropriate entries, we'll start using those.)\n\ninstallpath\nOnce the defaults have been set, you can override them.\n\nOn the command line, that would look like this:\n\nperl Build.PL --installpath lib=/foo/lib --installpath arch=/foo/lib/arch\n\nor this:\n\n./Build install --installpath lib=/foo/lib --installpath arch=/foo/lib/arch\n\ninstallbase\nYou can also set the whole bunch of installation paths by supplying the \"installbase\"\nparameter to point to a directory on your system. For instance, if you set \"installbase\" to\n\"/home/ken\" on a Linux system, you'll install as follows:\n\nlib     => /home/ken/lib/perl5\narch    => /home/ken/lib/perl5/i386-linux\nscript  => /home/ken/bin\nbin     => /home/ken/bin\nbindoc  => /home/ken/man/man1\nlibdoc  => /home/ken/man/man3\nbinhtml => /home/ken/html\nlibhtml => /home/ken/html\n\nNote that this is *different* from how \"MakeMaker\"'s \"PREFIX\" parameter works.\n\"installbase\" just gives you a default layout under the directory you specify, which may\nhave little to do with the \"installdirs=site\" layout.\n\nThe exact layout under the directory you specify may vary by system - we try to do the\n\"sensible\" thing on each platform.\n\ndestdir\nIf you want to install everything into a temporary directory first (for instance, if you\nwant to create a directory tree that a package manager like \"rpm\" or \"dpkg\" could create a\npackage from), you can use the \"destdir\" parameter:\n\nperl Build.PL --destdir /tmp/foo\n\nor\n\n./Build install --destdir /tmp/foo\n\nThis will effectively install to \"/tmp/foo/$sitelib\", \"/tmp/foo/$sitearch\", and the like,\nexcept that it will use \"File::Spec\" to make the pathnames work correctly on whatever\nplatform you're installing on.\n\nprefix\nProvided for compatibility with \"ExtUtils::MakeMaker\"'s PREFIX argument. \"prefix\" should be\nused when you want Module::Build to install your modules, documentation, and scripts in the\nsame place as \"ExtUtils::MakeMaker\"'s PREFIX mechanism.\n\nThe following are equivalent.\n\nperl Build.PL --prefix /tmp/foo\nperl Makefile.PL PREFIX=/tmp/foo\n\nBecause of the complex nature of the prefixification logic, the behavior of PREFIX in\n\"MakeMaker\" has changed subtly over time. Module::Build's --prefix logic is equivalent to\nthe PREFIX logic found in \"ExtUtils::MakeMaker\" 6.30.\n\nThe maintainers of \"MakeMaker\" do understand the troubles with the PREFIX mechanism, and\nadded INSTALLBASE support in version 6.31 of \"MakeMaker\", which was released in 2006.\n\nIf you don't need to retain compatibility with old versions (pre-6.31) of\n\"ExtUtils::MakeMaker\" or are starting a fresh Perl installation we recommend you use\n\"installbase\" instead (and \"INSTALLBASE\" in \"ExtUtils::MakeMaker\"). See \"Installing in the\nsame location as ExtUtils::MakeMaker\" in Module::Build::Cookbook for further information.\n",
            "subsections": []
        },
        "COMPARISON": {
            "content": "A comparison between \"Module::Build\" and other CPAN distribution installers.\n\n*   ExtUtils::MakeMaker requires \"make\" and use of a Makefile. \"Module::Build\" does not, nor do\nother pure-perl installers following the Build.PL spec such as Module::Build::Tiny. In\npractice, this is usually not an issue for the end user, as \"make\" is already required to\ninstall most CPAN modules, even on Windows.\n\n*   ExtUtils::MakeMaker has been a core module in every version of Perl 5, and must maintain\ncompatibility to install the majority of CPAN modules. \"Module::Build\" was added to core in\nPerl 5.10 and removed from core in Perl 5.20, and (like ExtUtils::MakeMaker) is only updated\nto fix critical issues and maintain compatibility. \"Module::Build\" and other non-core\ninstallers like Module::Build::Tiny are installed from CPAN by declaring themselves as a\n\"configure\" phase prerequisite, and in this way any installer can be used in place of\nExtUtils::MakeMaker.\n\n*   Customizing the build process with ExtUtils::MakeMaker involves overriding certain methods\nthat form the Makefile by defining the subs in the \"MY::\" namespace, requiring in-depth\nknowledge of Makefile, but allowing targeted customization of the entire build. Customizing\n\"Module::Build\" involves subclassing \"Module::Build\" itself, adding or overriding pure-perl\nmethods that represent build actions, which are invoked as arguments passed to the generated\n\"./Build\" script. This is a simpler concept but requires redefining the standard build\nactions to invoke your customizations. Module::Build::Tiny does not allow for customization.\n\n*   \"Module::Build\" provides more features and a better experience for distribution authors than\nExtUtils::MakeMaker. However, tools designed specifically for authoring, such as Dist::Zilla\nand its spinoffs Dist::Milla and Minilla, provide these features and more, and generate a\nconfigure script (Makefile.PL/Build.PL) that will use any of the various installers\nseparately on the end user side. App::ModuleBuildTiny is an alternative standalone authoring\ntool for distributions using Module::Build::Tiny, which requires only a simple two-line\nBuild.PL.\n",
            "subsections": []
        },
        "TO DO": {
            "content": "The current method of relying on time stamps to determine whether a derived file is out of date\nisn't likely to scale well, since it requires tracing all dependencies backward, it runs into\nproblems on NFS, and it's just generally flimsy. It would be better to use an MD5 signature or\nthe like, if available. See \"cons\" for an example.\n\n- append to perllocal.pod\n- add a 'plugin' functionality\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Ken Williams <kwilliams@cpan.org>\n\nDevelopment questions, bug reports, and patches should be sent to the Module-Build mailing list\nat <module-build@perl.org>.\n\nBug reports are also welcome at <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Build>.\n\nThe latest development version is available from the Git repository at\n<https://github.com/Perl-Toolchain-Gang/Module-Build>\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": "",
            "subsections": [
                {
                    "name": "perl",
                    "content": "ExtUtils::MakeMaker\n\nMETA.yml Specification: CPAN::Meta::Spec\n\n<http://www.dsmit.com/cons/>\n\n<http://search.cpan.org/dist/PerlBuildSystem/>\n"
                }
            ]
        }
    },
    "summary": "Module::Build - Build and install Perl modules",
    "flags": [],
    "examples": [],
    "see_also": []
}