# info > ExtUtils::Install

---
type: CommandReference
command: ExtUtils::Install
mode: perldoc
section: 3perl
source: perldoc
---

## Quick Reference
- `use ExtUtils::Install;` — load the module
- `install({ 'blib/lib' => 'some/install/dir' });` — copy directories
- `install([ from_to => \%hash, verbose => 1, dry_run => 0, ... ]);` — install with new interface
- `uninstall($packlist);` — remove files listed in packlist
- `uninstall($packlist, 1, 1);` — verbose dry‑run uninstall
- `pm_to_blib({ 'lib/Foo/Bar.pm' => 'blib/lib/Foo/Bar.pm' });` — copy modules efficiently

## Name
ExtUtils::Install — install files from here to there

## Synopsis
perl
use ExtUtils::Install;

install({ 'blib/lib' => 'some/install/dir' });
uninstall($packlist);
pm_to_blib({ 'lib/Foo/Bar.pm' => 'blib/lib/Foo/Bar.pm' });
## Functions
- `install(\%from_to, $verbose, $dry_run, $uninstall_shadows, $skip, $always_copy, \%result)` **(deprecated)**  
  Copies directory trees, writes packlist entries.  
- `install([ from_to => \%from_to, verbose => 1, dry_run => 0, uninstall_shadows => 1, skip => undef, always_copy => 1, result => \%result ])` **(recommended)**  
  New self‑documenting argument style. `from_to` is mandatory.  
  **Parameters:**  
  - `$verbose` — true to print each file; values 1‑5 give increasing diagnostics  
  - `$dry_run` — true to only print what would happen  
  - `$uninstall_shadows` — true to uninstall shadow versions found in `@INC`  
  - `$skip` — filter patterns (undef → read `INSTALL.SKIP`; array ref → list of regexen; true scalar → filename; other false → no filtering)  
  - `$always_copy` — true → always overwrite; false → copy only if changed; undef → check `EU_INSTALL_ALWAYS_COPY` environment variable  
  - `\%result` — populated with `install`, `install_fail`, `install_unchanged`, `install_filtered`, `uninstall`, `uninstall_fail` keys; additive across calls  
  **Return:** hashref of results; dies on failure unless `\%result` passed.  

- `install_default($fullext)` — **discouraged**; installs from `blib/` to default site location using module name derived from `@ARGV` if not given.  

- `uninstall($packlist_file, $verbose, $dont_execute)`  
  Removes files listed in `$packlist_file`.  
  - `$verbose` — true to print each removed file (default false)  
  - `$dont_execute` — true to only print planned removals (default false)  

- `pm_to_blib(\%from_to, $autosplit_dir, $filter_cmd)`  
  Copies each key of `%from_to` to its value efficiently.  
  - If `$autosplit_dir` provided, `.pm` files are autosplit into it.  
  - `$filter_cmd` — optional shell command to transform each `.pm` file content before copying.  
  - Creates destination directories as needed.  

  **Global variables:**  
  - `$ExtUtils::Install::MUST_REBOOT` — true if installation requires reboot (e.g., Win32 DLL replacement).  

## Environment
- `PERL_INSTALL_ROOT` — prepended to every install path.  
- `EU_INSTALL_IGNORE_SKIP` — true to skip automatic `INSTALL.SKIP`.  
- `EU_INSTALL_SITE_SKIPFILE` — default skip file when no `INSTALL.SKIP` in CWD.  
- `EU_INSTALL_ALWAYS_COPY` — true to always overwrite during install (alias `EU_ALWAYS_COPY` temporarily).  
- `PERL_INSTALL_QUIET` — set to suppress verbose output from `pm_to_blib`.

## Examples
perl
# Simple directory copy
install({ 'blib/lib' => '/usr/local/lib/perl5' });

# New‑style install with unwinding shadows
install([
    from_to          => { 'blib/lib' => '/opt/perl/lib' },
    uninstall_shadows => 1,
    verbose           => 1,
]);

# Dry‑run uninstall
uninstall('blib/arch/.packlist', 1, 1);

# Use pm_to_blib with autosplit
pm_to_blib({ 'lib/Foo.pm' => 'blib/lib/Foo.pm' }, 'blib/auto');
## See Also
- [ExtUtils::MakeMaker](http://localhost/phpMan.php/perldoc/ExtUtils::MakeMaker)
- [ExtUtils::Manifest](http://localhost/phpMan.php/perldoc/ExtUtils::Manifest)