{
    "mode": "perldoc",
    "parameter": "ExtUtils::Install",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/ExtUtils%3A%3AInstall/json",
    "generated": "2026-06-03T05:24:50Z",
    "synopsis": "use ExtUtils::Install;\ninstall({ 'blib/lib' => 'some/install/dir' } );\nuninstall($packlist);\npmtoblib({ 'lib/Foo/Bar.pm' => 'blib/lib/Foo/Bar.pm' });",
    "sections": {
        "NAME": {
            "content": "ExtUtils::Install - install files from here to there\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use ExtUtils::Install;\n\ninstall({ 'blib/lib' => 'some/install/dir' } );\n\nuninstall($packlist);\n\npmtoblib({ 'lib/Foo/Bar.pm' => 'blib/lib/Foo/Bar.pm' });\n",
            "subsections": []
        },
        "VERSION": {
            "content": "2.20\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Handles the installing and uninstalling of perl modules, scripts, man pages, etc...\n\nBoth install() and uninstall() are specific to the way ExtUtils::MakeMaker handles the\ninstallation and deinstallation of perl modules. They are not designed as general purpose tools.\n\nOn some operating systems such as Win32 installation may not be possible until after a reboot\nhas occurred. This can have varying consequences: removing an old DLL does not impact programs\nusing the new one, but if a new DLL cannot be installed properly until reboot then anything\ndepending on it must wait. The package variable\n\n$ExtUtils::Install::MUSTREBOOT\n\nis used to store this status.\n\nIf this variable is true then such an operation has occurred and anything depending on this\nmodule cannot proceed until a reboot has occurred.\n\nIf this value is defined but false then such an operation has occurred, but should not impact\nlater operations.\n",
            "subsections": []
        },
        "Functions": {
            "content": "install\n# deprecated forms\ninstall(\\%fromto);\ninstall(\\%fromto, $verbose, $dryrun, $uninstallshadows,\n$skip, $alwayscopy, \\%result);\n\n# recommended form as of 1.47\ninstall([\nfromto => \\%fromto,\nverbose => 1,\ndryrun => 0,\nuninstallshadows => 1,\nskip => undef,\nalwayscopy => 1,\nresult => \\%installresults,\n]);\n\nCopies each directory tree of %fromto to its corresponding value preserving timestamps and\npermissions.\n\nThere are two keys with a special meaning in the hash: \"read\" and \"write\". These contain\npacklist files. After the copying is done, install() will write the list of target files to\n$fromto{write}. If $fromto{read} is given the contents of this file will be merged into the\nwritten file. The read and the written file may be identical, but on AFS it is quite likely that\npeople are installing to a different directory than the one where the files later appear.\n\nIf $verbose is true, will print out each file removed. Default is false. This is \"make install\nVERBINST=1\". $verbose values going up to 5 show increasingly more diagnostics output.\n\nIf $dryrun is true it will only print what it was going to do without actually doing it.\nDefault is false.\n\nIf $uninstallshadows is true any differing versions throughout @INC will be uninstalled. This\nis \"make install UNINST=1\"\n\nAs of 1.3702 install() supports the use of a list of patterns to filter out files that\nshouldn't be installed. If $skip is omitted or undefined then install will try to read the list\nfrom INSTALL.SKIP in the CWD. This file is a list of regular expressions and is just like the\nMANIFEST.SKIP file used by ExtUtils::Manifest.\n\nA default site INSTALL.SKIP may be provided by setting then environment variable\nEUINSTALLSITESKIPFILE, this will only be used when there isn't a distribution specific\nINSTALL.SKIP. If the environment variable EUINSTALLIGNORESKIP is true then no install file\nfiltering will be performed.\n\nIf $skip is undefined then the skip file will be autodetected and used if it is found. If $skip\nis a reference to an array then it is assumed the array contains the list of patterns, if $skip\nis a true non reference it is assumed to be the filename holding the list of patterns, any other\nvalue of $skip is taken to mean that no install filtering should occur.\n\nChanges As of Version 1.47\n\nAs of version 1.47 the following additions were made to the install interface. Note that the new\nargument style and use of the %result hash is recommended.\n\nThe $alwayscopy parameter which when true causes files to be updated regardless as to whether\nthey have changed, if it is defined but false then copies are made only if the files have\nchanged, if it is undefined then the value of the environment variable EUINSTALLALWAYSCOPY is\nused as default.\n\nThe %result hash will be populated with the various keys/subhashes reflecting the install.\nCurrently these keys and their structure are:\n\ninstall             => { $target    => $source },\ninstallfail        => { $target    => $source },\ninstallunchanged   => { $target    => $source },\n\ninstallfiltered    => { $source    => $pattern },\n\nuninstall           => { $uninstalled => $source },\nuninstallfail      => { $uninstalled => $source },\n\nwhere $source is the filespec of the file being installed. $target is where it is being\ninstalled to, and $uninstalled is any shadow file that is in @INC or $ENV{PERL5LIB} or other\nstandard locations, and $pattern is the pattern that caused a source file to be skipped. In\nfuture more keys will be added, such as to show created directories, however this requires\nchanges in other modules and must therefore wait.\n\nThese keys will be populated before any exceptions are thrown should there be an error.\n\nNote that all updates of the %result are additive, the hash will not be cleared before use, thus\nallowing status results of many installs to be easily aggregated.\n\nNEW ARGUMENT STYLE\n\nIf there is only one argument and it is a reference to an array then the array is assumed to\ncontain a list of key-value pairs specifying the options. In this case the option \"fromto\" is\nmandatory. This style means that you do not have to supply a cryptic list of arguments and can\nuse a self documenting argument list that is easier to understand.\n\nThis is now the recommended interface to install().\n\nRETURN\n\nIf all actions were successful install will return a hashref of the results as described above\nfor the $result parameter. If any action is a failure then install will die, therefore it is\nrecommended to pass in the $result parameter instead of using the return value. If the result\nparameter is provided then the returned hashref will be the passed in hashref.\n\ninstalldefault\n*DISCOURAGED*\n\ninstalldefault();\ninstalldefault($fullext);\n\nCalls install() with arguments to copy a module from blib/ to the default site installation\nlocation.\n\n$fullext is the name of the module converted to a directory (ie. Foo::Bar would be Foo/Bar). If\n$fullext is not specified, it will attempt to read it from @ARGV.\n\nThis is primarily useful for install scripts.\n\nNOTE This function is not really useful because of the hard-coded install location with no way\nto control site vs core vs vendor directories and the strange way in which the module name is\ngiven. Consider its use discouraged.\n\nuninstall\nuninstall($packlistfile);\nuninstall($packlistfile, $verbose, $dontexecute);\n\nRemoves the files listed in a $packlistfile.\n\nIf $verbose is true, will print out each file removed. Default is false.\n\nIf $dontexecute is true it will only print what it was going to do without actually doing it.\nDefault is false.\n\npmtoblib\npmtoblib(\\%fromto);\npmtoblib(\\%fromto, $autosplitdir);\npmtoblib(\\%fromto, $autosplitdir, $filtercmd);\n\nCopies each key of %fromto to its corresponding value efficiently. If an $autosplitdir is\nprovided, all .pm files will be autosplit into it. Any destination directories are created.\n\n$filtercmd is an optional shell command to run each .pm file through prior to splitting and\ncopying. Input is the contents of the module, output the new module contents.\n\nYou can have an environment variable PERLINSTALLROOT set which will be prepended as a\ndirectory to each installed file (and directory).\n\nBy default verbose output is generated, setting the PERLINSTALLQUIET environment variable will\nsilence this output.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "PERLINSTALLROOT\nWill be prepended to each install path.\n\nEUINSTALLIGNORESKIP\nWill prevent the automatic use of INSTALL.SKIP as the install skip file.\n\nEUINSTALLSITESKIPFILE\nIf there is no INSTALL.SKIP file in the make directory then this value can be used to\nprovide a default.\n\nEUINSTALLALWAYSCOPY\nIf this environment variable is true then normal install processes will always overwrite\nolder identical files during the install process.\n\nNote that the alias EUALWAYSCOPY will be supported if EUINSTALLALWAYSCOPY is not\ndefined until at least the 1.50 release. Please ensure you use the correct\nEUINSTALLALWAYSCOPY.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Original author lost in the mists of time. Probably the same as Makemaker.\n\nProduction release currently maintained by demerphq \"yves at cpan.org\", extensive changes by\nMichael G. Schwern.\n\nSend bug reports via http://rt.cpan.org/. Please send your generated Makefile along with your\nreport.\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "This program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nSee <http://www.perl.com/perl/misc/Artistic.html>\n",
            "subsections": []
        }
    },
    "summary": "ExtUtils::Install - install files from here to there",
    "flags": [],
    "examples": [],
    "see_also": []
}