ExtUtils::Install - install files from here to there

- NAME
- SYNOPSIS
- DESCRIPTION

- Functions

- ENVIRONMENT
- AUTHOR
- LICENSE

# NAME

ExtUtils::Install - install files from here to there

# SYNOPSIS

      use ExtUtils::Install;

      install({ 'blib/lib' => 'some/install/dir' } );

      uninstall($packlist);

      pm_to_blib({ 'lib/Foo/Bar.pm' => 'blib/lib/Foo/Bar.pm' });

# DESCRIPTION

Handles the installing and uninstalling of perl modules, scripts, man pages, etc...

Both `install()` and `uninstall()` are specific to the way ExtUtils::MakeMaker handles the installation and deinstallation of perl modules. They are not designed as general purpose tools.

On some operating systems such as Win32 installation may not be possible until after a reboot has occured. This can have varying consequences: removing an old DLL does not impact programs using the new one, but if a new DLL cannot be installed properly until reboot then anything depending on it must wait. The package variable

      $ExtUtils::Install::MUST_REBOOT

is used to store this status.

If this variable is true then such an operation has occured and anything depending on this module cannot proceed until a reboot has occured.

If this value is defined but false then such an operation has ocurred, but should not impact later operations.

## Functions

install

          install(\%from_to);
          install(\%from_to, $verbose, $dont_execute, $uninstall_shadows, $skip);

  Copies each directory tree of %from_to to its corresponding value preserving timestamps and permissions.

  There are two keys with a special meaning in the hash: "read" and "write". These contain packlist files. After the copying is done, `install()` will write the list of target files to $from_to{write}. If $from_to{read} is given the contents of this file will be merged into the written file. The read and the written file may be identical, but on AFS it is quite likely that people are installing to a different directory than the one where the files later appear.

  If $verbose is true, will print out each file removed. Default is false. This is "make install VERBINST=1". $verbose values going up to 5 show increasingly more diagnostics output.

  If $dont_execute is true it will only print what it was going to do without actually doing it. Default is false.

  If $uninstall_shadows is true any differing versions throughout @INC will be uninstalled. This is "make install UNINST=1"

  As of 1.37_02 `install()` supports the use of a list of patterns to filter out files that shouldn't be installed. If $skip is omitted or undefined then install will try to read the list from INSTALL.SKIP in the CWD. This file is a list of regular expressions and is just like the MANIFEST.SKIP file used by the ExtUtils::Manifest manpage.

  A default site INSTALL.SKIP may be provided by setting then environment variable EU_INSTALL_SITE_SKIPFILE, this will only be used when there isn't a distribution specific INSTALL.SKIP. If the environment variable EU_INSTALL_IGNORE_SKIP is true then no install file filtering will be performed.

  If $skip is undefined then the skip file will be autodetected and used if it is found. If $skip is a reference to an array then it is assumed the array contains the list of patterns, if $skip is a true non reference it is assumed to be the filename holding the list of patterns, any other value of $skip is taken to mean that no install filtering should occur.

install_default DISCOURAGED

          install_default();
          install_default($fullext);

  Calls `install()` with arguments to copy a module from blib/ to the default site installation location.

  $fullext is the name of the module converted to a directory (ie. Foo::Bar would be Foo/Bar). If $fullext is not specified, it will attempt to read it from @ARGV.

  This is primarily useful for install scripts.

  NOTE This function is not really useful because of the hard-coded install location with no way to control site vs core vs vendor directories and the strange way in which the module name is given. Consider its use discouraged.

uninstall

          uninstall($packlist_file);
          uninstall($packlist_file, $verbose, $dont_execute);

  Removes the files listed in a $packlist_file.

  If $verbose is true, will print out each file removed. Default is false.

  If $dont_execute is true it will only print what it was going to do without actually doing it. Default is false.

pm_to_blib

          pm_to_blib(\%from_to, $autosplit_dir);
          pm_to_blib(\%from_to, $autosplit_dir, $filter_cmd);

  Copies each key of %from_to to its corresponding value efficiently. Filenames with the extension .pm are autosplit into the $autosplit_dir. Any destination directories are created.

  $filter_cmd is an optional shell command to run each .pm file through prior to splitting and copying. Input is the contents of the module, output the new module contents.

  You can have an environment variable PERL_INSTALL_ROOT set which will be prepended as a directory to each installed file (and directory).

# ENVIRONMENT

PERL_INSTALL_ROOT

  Will be prepended to each install path.

EU_INSTALL_IGNORE_SKIP

  Will prevent the automatic use of INSTALL.SKIP as the install skip file.

EU_INSTALL_SITE_SKIPFILE

  If there is no INSTALL.SKIP file in the make directory then this value can be used to provide a default.

# AUTHOR

Original author lost in the mists of time. Probably the same as Makemaker.

Production release currently maintained by demerphq `yves at cpan.org`

Send bug reports via http://rt.cpan.org/. Please send your generated Makefile along with your report.

# LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

ExtUtils::Install - install files from here to there