[Chapter 7] 7.2.16 ExtUtils::Install - Install Files from Here to There
Author: Larry Wall, Tom Christiansen & Randal L. Schwartz
Date: 1999-07-02T02:02:00Z

#

| Chapter 7 The Standard Perl Library |

### 7.2.16 ExtUtils::Install - Install Files from Here to There

    use ExtUtils::Install;
    install($hashref, $verbose, $nonono);
    uninstall($packlistfile, $verbose, $nonono);

`install()` and `uninstall()` are specific to the way ExtUtils::MakeMaker handles the platform-dependent installation and deinstallation of Perl extensions. They are not designed as general-purpose tools. If you're reading this chapter straight through (brave soul), you probably want to take a glance at the MakeMaker entry first. (Or just skip over everything in the ExtUtils package until you start writing an Ext.)

`install()` takes three arguments: a reference to a hash, a verbose switch, and a don't-really-do-it switch. The hash reference contains a mapping of directories; each key/value pair is a combination of directories to be copied. The key is a directory to copy from, and the value is a directory to copy to. The whole tree below the "from" directory will be copied, preserving timestamps and permissions.

There are two keys with a special meaning in the hash: `"read"` and `"write"`. After the copying is done, install will write the list of target files to the file named by `$hashref->{write}`. If there is another file named by `$hashref->{read}`, the contents of this file will be merged into the written file. The read and the written file may be identical, but on the Andrew File System (AFS) it is fairly likely that people are installing to a different directory than the one where the files later appear.

`uninstall()` takes as first argument a file containing filenames to be unlinked. The second argument is a verbose switch, the third is a no-don't-really-do-it-now switch (useful to know what will happen without actually doing it).

7.2.15 Exporter - Default Import Method for Modules |  | 7.2.17 ExtUtils::Liblist - Determine Libraries to Use and How to Use Them