CINXE.COM
perlmodinstall - Installing CPAN Modules - Perldoc Browser
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>perlmodinstall - Installing CPAN Modules - Perldoc Browser</title> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser"> <link rel="canonical" href="https://perldoc.perl.org/perlmodinstall"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" /> <style> body { background: #f4f4f5; color: #020202; } .navbar-dark { background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%); background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%); background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0); background-repeat: repeat-x; } .navbar-dark .navbar-nav .nav-link, .navbar-dark .navbar-nav .nav-link:focus { color: #fff } .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 } #wrapperlicious { margin: 0 auto; font: 0.9em 'Helvetica Neue', Helvetica, sans-serif; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0; } #wrapperlicious h1 { font-size: 1.5em } #wrapperlicious h2 { font-size: 1.3em } #wrapperlicious h3 { font-size: 1.1em } #wrapperlicious h4 { font-size: 0.9em } #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3, #wrapperlicious h4, #wrapperlicious dt { color: #020202; margin-top: 1em; margin-bottom: 1em; position: relative; font-weight: bold; } #wrapperlicious a { color: inherit; text-decoration: underline } #wrapperlicious #toc { text-decoration: none } #wrapperlicious a:hover { color: #2a2a2a } #wrapperlicious a img { border: 0 } #wrapperlicious :not(pre) > code { color: inherit; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; font: 0.9em Consolas, Menlo, Monaco, monospace; padding: 0.3em; } #wrapperlicious dd { margin: 0; margin-left: 2em; } #wrapperlicious dt { color: #2a2a2a; font-weight: bold; margin-left: 0.9em; } #wrapperlicious p { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious li > p { margin-bottom: 0; margin-top: 0; } #wrapperlicious pre { border: 1px solid #c1c1c1; border-radius: 3px; font: 100% Consolas, Menlo, Monaco, monospace; margin-bottom: 1em; margin-top: 1em; } #wrapperlicious pre > code { display: block; background-color: #f6f6f6; font: 0.9em Consolas, Menlo, Monaco, monospace; line-height: 1.5em; text-align: left; white-space: pre; padding: 1em; } #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious ul { list-style-type: square; } #wrapperlicious ul ul { margin-bottom: 0px; margin-top: 0px; } #footer { font-size: 0.8em; padding-top: 0.5em; text-align: center; } #more { display: inline; font-size: 0.8em; } #perldocdiv { background-color: #fff; border: 1px solid #c1c1c1; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; margin-left: auto; margin-right: auto; padding: 3em; padding-top: 1em; max-width: 960px; } #moduleversion { float: right } #wrapperlicious .leading-notice { font-style: italic; padding-left: 1em; margin-top: 1em; margin-bottom: 1em; } #wrapperlicious .permalink { display: none; left: -0.75em; position: absolute; padding-right: 0.25em; text-decoration: none; } #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink, #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink, #wrapperlicious dt:hover .permalink { display: block; } </style> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KVNWBNT5FB'); gtag('config', 'UA-50555-3'); </script> </head> <body> <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" href="/"><img src="/images/perl_camel_30.png" width="30" height="30" class="d-inline-block align-top" alt="Perl Camel Logo"> Perldoc Browser</a> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav mr-auto"> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.005_02</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-stable"> <a class="dropdown-item" href="/perlmodinstall">Latest</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1/perlmodinstall">5.40.1</a> <a class="dropdown-item" href="/5.40.0/perlmodinstall">5.40.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3/perlmodinstall">5.38.3</a> <a class="dropdown-item" href="/5.38.2/perlmodinstall">5.38.2</a> <a class="dropdown-item" href="/5.38.1/perlmodinstall">5.38.1</a> <a class="dropdown-item" href="/5.38.0/perlmodinstall">5.38.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.36.3/perlmodinstall">5.36.3</a> <a class="dropdown-item" href="/5.36.2/perlmodinstall">5.36.2</a> <a class="dropdown-item" href="/5.36.1/perlmodinstall">5.36.1</a> <a class="dropdown-item" href="/5.36.0/perlmodinstall">5.36.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.34.3/perlmodinstall">5.34.3</a> <a class="dropdown-item" href="/5.34.2/perlmodinstall">5.34.2</a> <a class="dropdown-item" href="/5.34.1/perlmodinstall">5.34.1</a> <a class="dropdown-item" href="/5.34.0/perlmodinstall">5.34.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.32.1/perlmodinstall">5.32.1</a> <a class="dropdown-item" href="/5.32.0/perlmodinstall">5.32.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.30.3/perlmodinstall">5.30.3</a> <a class="dropdown-item" href="/5.30.2/perlmodinstall">5.30.2</a> <a class="dropdown-item" href="/5.30.1/perlmodinstall">5.30.1</a> <a class="dropdown-item" href="/5.30.0/perlmodinstall">5.30.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.28.3/perlmodinstall">5.28.3</a> <a class="dropdown-item" href="/5.28.2/perlmodinstall">5.28.2</a> <a class="dropdown-item" href="/5.28.1/perlmodinstall">5.28.1</a> <a class="dropdown-item" href="/5.28.0/perlmodinstall">5.28.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.26.3/perlmodinstall">5.26.3</a> <a class="dropdown-item" href="/5.26.2/perlmodinstall">5.26.2</a> <a class="dropdown-item" href="/5.26.1/perlmodinstall">5.26.1</a> <a class="dropdown-item" href="/5.26.0/perlmodinstall">5.26.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.24.4/perlmodinstall">5.24.4</a> <a class="dropdown-item" href="/5.24.3/perlmodinstall">5.24.3</a> <a class="dropdown-item" href="/5.24.2/perlmodinstall">5.24.2</a> <a class="dropdown-item" href="/5.24.1/perlmodinstall">5.24.1</a> <a class="dropdown-item" href="/5.24.0/perlmodinstall">5.24.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.22.4/perlmodinstall">5.22.4</a> <a class="dropdown-item" href="/5.22.3/perlmodinstall">5.22.3</a> <a class="dropdown-item" href="/5.22.2/perlmodinstall">5.22.2</a> <a class="dropdown-item" href="/5.22.1/perlmodinstall">5.22.1</a> <a class="dropdown-item" href="/5.22.0/perlmodinstall">5.22.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.20.3/perlmodinstall">5.20.3</a> <a class="dropdown-item" href="/5.20.2/perlmodinstall">5.20.2</a> <a class="dropdown-item" href="/5.20.1/perlmodinstall">5.20.1</a> <a class="dropdown-item" href="/5.20.0/perlmodinstall">5.20.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.4/perlmodinstall">5.18.4</a> <a class="dropdown-item" href="/5.18.3/perlmodinstall">5.18.3</a> <a class="dropdown-item" href="/5.18.2/perlmodinstall">5.18.2</a> <a class="dropdown-item" href="/5.18.1/perlmodinstall">5.18.1</a> <a class="dropdown-item" href="/5.18.0/perlmodinstall">5.18.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.16.3/perlmodinstall">5.16.3</a> <a class="dropdown-item" href="/5.16.2/perlmodinstall">5.16.2</a> <a class="dropdown-item" href="/5.16.1/perlmodinstall">5.16.1</a> <a class="dropdown-item" href="/5.16.0/perlmodinstall">5.16.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.14.4/perlmodinstall">5.14.4</a> <a class="dropdown-item" href="/5.14.3/perlmodinstall">5.14.3</a> <a class="dropdown-item" href="/5.14.2/perlmodinstall">5.14.2</a> <a class="dropdown-item" href="/5.14.1/perlmodinstall">5.14.1</a> <a class="dropdown-item" href="/5.14.0/perlmodinstall">5.14.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.12.5/perlmodinstall">5.12.5</a> <a class="dropdown-item" href="/5.12.4/perlmodinstall">5.12.4</a> <a class="dropdown-item" href="/5.12.3/perlmodinstall">5.12.3</a> <a class="dropdown-item" href="/5.12.2/perlmodinstall">5.12.2</a> <a class="dropdown-item" href="/5.12.1/perlmodinstall">5.12.1</a> <a class="dropdown-item" href="/5.12.0/perlmodinstall">5.12.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.10.1/perlmodinstall">5.10.1</a> <a class="dropdown-item" href="/5.10.0/perlmodinstall">5.10.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.9/perlmodinstall">5.8.9</a> <a class="dropdown-item" href="/5.8.8/perlmodinstall">5.8.8</a> <a class="dropdown-item" href="/5.8.7/perlmodinstall">5.8.7</a> <a class="dropdown-item" href="/5.8.6/perlmodinstall">5.8.6</a> <a class="dropdown-item" href="/5.8.5/perlmodinstall">5.8.5</a> <a class="dropdown-item" href="/5.8.4/perlmodinstall">5.8.4</a> <a class="dropdown-item" href="/5.8.3/perlmodinstall">5.8.3</a> <a class="dropdown-item" href="/5.8.2/perlmodinstall">5.8.2</a> <a class="dropdown-item" href="/5.8.1/perlmodinstall">5.8.1</a> <a class="dropdown-item" href="/5.8.0/perlmodinstall">5.8.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.6.2/perlmodinstall">5.6.2</a> <a class="dropdown-item" href="/5.6.1/perlmodinstall">5.6.1</a> <a class="dropdown-item" href="/5.6.0/perlmodinstall">5.6.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_04/perlmodinstall">5.005_04</a> <a class="dropdown-item" href="/5.005_03/perlmodinstall">5.005_03</a> <a class="dropdown-item active" href="/5.005_02/perlmodinstall">5.005_02</a> <a class="dropdown-item" href="/5.005_01/perlmodinstall">5.005_01</a> <a class="dropdown-item" href="/5.005/perlmodinstall">5.005</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-dev"> <a class="dropdown-item" href="/blead/perlmodinstall">blead</a> <a class="dropdown-item" href="/5.41.10/perlmodinstall">5.41.10</a> <a class="dropdown-item" href="/5.41.9/perlmodinstall">5.41.9</a> <a class="dropdown-item" href="/5.41.8/perlmodinstall">5.41.8</a> <a class="dropdown-item" href="/5.41.7/perlmodinstall">5.41.7</a> <a class="dropdown-item" href="/5.41.6/perlmodinstall">5.41.6</a> <a class="dropdown-item" href="/5.41.5/perlmodinstall">5.41.5</a> <a class="dropdown-item" href="/5.41.4/perlmodinstall">5.41.4</a> <a class="dropdown-item" href="/5.41.3/perlmodinstall">5.41.3</a> <a class="dropdown-item" href="/5.41.2/perlmodinstall">5.41.2</a> <a class="dropdown-item" href="/5.41.1/perlmodinstall">5.41.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1-RC1/perlmodinstall">5.40.1-RC1</a> <a class="dropdown-item" href="/5.40.0-RC2/perlmodinstall">5.40.0-RC2</a> <a class="dropdown-item" href="/5.40.0-RC1/perlmodinstall">5.40.0-RC1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.39.10/perlmodinstall">5.39.10</a> <a class="dropdown-item" href="/5.39.9/perlmodinstall">5.39.9</a> <a class="dropdown-item" href="/5.39.8/perlmodinstall">5.39.8</a> <a class="dropdown-item" href="/5.39.7/perlmodinstall">5.39.7</a> <a class="dropdown-item" href="/5.39.6/perlmodinstall">5.39.6</a> <a class="dropdown-item" href="/5.39.5/perlmodinstall">5.39.5</a> <a class="dropdown-item" href="/5.39.4/perlmodinstall">5.39.4</a> <a class="dropdown-item" href="/5.39.3/perlmodinstall">5.39.3</a> <a class="dropdown-item" href="/5.39.2/perlmodinstall">5.39.2</a> <a class="dropdown-item" href="/5.39.1/perlmodinstall">5.39.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3-RC1/perlmodinstall">5.38.3-RC1</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-nav"> <a class="dropdown-item" href="/5.005_02/perl">Perl</a> <a class="dropdown-item" href="/5.005_02/perlintro">Intro</a> <a class="dropdown-item" href="/5.005_02/perl#Tutorials">Tutorials</a> <a class="dropdown-item" href="/5.005_02/perlfaq">FAQs</a> <a class="dropdown-item" href="/5.005_02/perl#Reference-Manual">Reference</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_02/perlop">Operators</a> <a class="dropdown-item" href="/5.005_02/functions">Functions</a> <a class="dropdown-item" href="/5.005_02/variables">Variables</a> <a class="dropdown-item" href="/5.005_02/modules">Modules</a> <a class="dropdown-item" href="/5.005_02/perlutil">Utilities</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_02/perldelta">Release Notes</a> <a class="dropdown-item" href="/5.005_02/perlcommunity">Community</a> <a class="dropdown-item" href="/5.005_02/perlhist">History</a> </div> </li> </ul> <ul class="navbar-nav"> <script> function set_expand (expand) { var perldocdiv = document.getElementById('perldocdiv'); var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width'); var expanded = (width == '' || width == 'none') ? true : false; if (expand === null) { expand = !expanded; } if ((expand && !expanded) || (!expand && expanded)) { perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px'); var button_classlist = document.getElementById('content-expand-button').classList; if (expand) { button_classlist.add('btn-light'); button_classlist.remove('btn-outline-light'); } else { button_classlist.add('btn-outline-light'); button_classlist.remove('btn-light'); } } return expand; } function toggle_expand () { var expand = set_expand(null); document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC'; } function read_expand () { return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function () { if (read_expand()) { set_expand(true); } }); } else if (read_expand()) { set_expand(true); } </script> <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-4" onclick="toggle_expand()">Expand</button> </ul> <form class="form-inline" method="get" action="/5.005_02/search"> <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search" value=""> </form> </div> </nav> <div id="wrapperlicious" class="container-fluid"> <div id="perldocdiv"> <div id="links"> <a href="/5.005_02/perlmodinstall">perlmodinstall</a> <div id="more"> (<a href="/5.005_02/perlmodinstall.txt">source</a>, <a href="https://metacpan.org/pod/perlmodinstall">CPAN</a>) </div> </div> <div class="leading-notice"> You are viewing the version of this documentation from Perl 5.005_02. <a href="/perlmodinstall">View the latest version</a> </div> <h1><a id="toc">CONTENTS</a></h1> <ul> <li> <a class="text-decoration-none" href="#NAME">NAME</a> </li> <li> <a class="text-decoration-none" href="#DESCRIPTION">DESCRIPTION</a> <ul> <li> <a class="text-decoration-none" href="#PREAMBLE">PREAMBLE</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#HEY">HEY</a> </li> <li> <a class="text-decoration-none" href="#AUTHOR">AUTHOR</a> </li> <li> <a class="text-decoration-none" href="#COPYRIGHT">COPYRIGHT</a> </li> </ul> <h1 id="NAME"><a class="permalink" href="#NAME">#</a>NAME</h1> <p>perlmodinstall - Installing CPAN Modules</p> <h1 id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">#</a>DESCRIPTION</h1> <p>You can think of a module as the fundamental unit of reusable Perl code; see <a href="/5.005_02/perlmod">perlmod</a> for details. Whenever anyone creates a chunk of Perl code that they think will be useful to the world, they register as a Perl developer at http://www.perl.com/CPAN/modules/04pause.html so that they can then upload their code to the CPAN. The CPAN is the Comprehensive Perl Archive Network and can be accessed at http://www.perl.com/CPAN/.</p> <p>This documentation is for people who want to download CPAN modules and install them on their own computer.</p> <h2 id="PREAMBLE"><a class="permalink" href="#PREAMBLE">#</a>PREAMBLE</h2> <p>You have a file ending in .tar.gz (or, less often, .zip). You know there's a tasty module inside. There are four steps you must now take:</p> <dl> <dt id="DECOMPRESS-the-file"><a class="permalink" href="#DECOMPRESS-the-file">#</a><a id="DECOMPRESS"></a><b>DECOMPRESS</b> the file</dt> <dd> </dd> <dt id="UNPACK-the-file-into-a-directory"><a class="permalink" href="#UNPACK-the-file-into-a-directory">#</a><a id="UNPACK"></a><b>UNPACK</b> the file into a directory</dt> <dd> </dd> <dt id="BUILD-the-module-(sometimes-unnecessary)"><a class="permalink" href="#BUILD-the-module-(sometimes-unnecessary)">#</a><a id="BUILD"></a><a id="BUILD-the-module-sometimes-unnecessary"></a><b>BUILD</b> the module (sometimes unnecessary)</dt> <dd> </dd> <dt id="INSTALL-the-module."><a class="permalink" href="#INSTALL-the-module.">#</a><a id="INSTALL"></a><a id="INSTALL-the-module"></a><b>INSTALL</b> the module.</dt> <dd> </dd> </dl> <p>Here's how to perform each step for each operating system. This is <i>not</i> a substitute for reading the README and INSTALL files that might have come with your module!</p> <p>Also note that these instructions are tailored for installing the module into your system's repository of Perl modules. But you can install modules into any directory you wish. For instance, where I say <code>perl Makefile.PL</code>, you can substitute <code>perl Makefile.PL PREFIX=/my/perl_directory</code> to install the modules into <code>/my/perl_directory</code>. Then you can use the modules from your Perl programs with <code>use lib "/my/perl_directory/lib/site_perl";</code> or sometimes just <code>use "/my/perl_directory";</code>.</p> <ul> <li><p><b>If you're on Unix,</b></p> <p>You can use Andreas Koenig's CPAN module ( http://www.perl.com/CPAN/modules/by-module/CPAN ) to automate the following steps, from DECOMPRESS through INSTALL.</p> <p>A. DECOMPRESS</p> <p>Decompress the file with <code>gzip -d yourmodule.tar.gz</code></p> <p>You can get gzip from ftp://prep.ai.mit.edu/pub/gnu.</p> <p>Or, you can combine this step with the next to save disk space:</p> <pre><code class="plaintext">gzip -dc yourmodule.tar.gz | tar -xof -</code></pre> <p>B. UNPACK</p> <p>Unpack the result with <code>tar -xof yourmodule.tar</code></p> <p>C. BUILD</p> <p>Go into the newly-created directory and type:</p> <pre><code class="plaintext">perl Makefile.PL make make test</code></pre> <p>D. INSTALL</p> <p>While still in that directory, type:</p> <pre><code class="plaintext">make install</code></pre> <p>Make sure you have the appropriate permissions to install the module in your Perl 5 library directory. Often, you'll need to be root.</p> <p>That's all you need to do on Unix systems with dynamic linking. Most Unix systems have dynamic linking -- if yours doesn't, or if for another reason you have a statically-linked perl, <b>and</b> the module requires compilation, you'll need to build a new Perl binary that includes the module. Again, you'll probably need to be root.</p> </li> <li><p><b>If you're running Windows 95 or NT with the ActiveState port of Perl</b></p> <pre><code class="plaintext">A. DECOMPRESS</code></pre> <p>You can use the shareware Winzip ( http://www.winzip.com ) to decompress and unpack modules.</p> <pre><code class="plaintext">B. UNPACK</code></pre> <p>If you used WinZip, this was already done for you.</p> <pre><code class="plaintext">C. BUILD</code></pre> <p>Does the module require compilation (i.e. does it have files that end in .xs, .c, .h, .y, .cc, .cxx, or .C)? If it does, you're on your own. You can try compiling it yourself if you have a C compiler. If you're successful, consider uploading the resulting binary to the CPAN for others to use. If it doesn't, go to INSTALL.</p> <pre><code class="plaintext">D. INSTALL</code></pre> <p>Copy the module into your Perl's <i>lib</i> directory. That'll be one of the directories you see when you type</p> <pre><code>perl -e 'print "@INC"'</code></pre> </li> <li><p><b>If you're running Windows 95 or NT with the core Windows distribution of Perl,</b></p> <pre><code class="plaintext">A. DECOMPRESS</code></pre> <p>When you download the module, make sure it ends in either <code>.tar.gz</code> or <code>.zip</code>. Windows browsers sometimes download <code>.tar.gz</code> files as <code>_tar.tar</code>, because early versions of Windows prohibited more than one dot in a filename.</p> <p>You can use the shareware WinZip ( http://www.winzip.com ) to decompress and unpack modules.</p> <p>Or, you can use InfoZip's <code>unzip</code> utility ( http://www.cdrom.com/pub/infozip/Info-Zip.html ) to uncompress <code>.zip</code> files; type <code>unzip yourmodule.zip</code> in your shell.</p> <p>Or, if you have a working <code>tar</code> and <code>gzip</code>, you can type</p> <pre><code class="plaintext">gzip -cd yourmodule.tar.gz | tar xvf -</code></pre> <p>in the shell to decompress <code>yourmodule.tar.gz</code>. This will UNPACK your module as well.</p> <pre><code class="plaintext">B. UNPACK</code></pre> <p>All of the methods in DECOMPRESS will have done this for you.</p> <pre><code class="plaintext">C. BUILD</code></pre> <p>Go into the newly-created directory and type:</p> <pre><code class="plaintext">perl Makefile.PL dmake dmake test</code></pre> <p>Depending on your perl configuration, <code>dmake</code> might not be available. You might have to substitute whatever <code>perl -V:make</code> says. (Usually, that will be <code>nmake</code> or <code>make</code>.)</p> <pre><code class="plaintext">D. INSTALL</code></pre> <p>While still in that directory, type:</p> <pre><code class="plaintext">dmake install</code></pre> </li> <li><p><b>If you're using a Macintosh,</b></p> <p>A. DECOMPRESS</p> <p>You can either use StuffIt Expander ( http://www.aladdinsys.com/ ) in combination with <i>DropStuff with Expander Enhancer</i> (shareware), or the freeware MacGzip ( http://persephone.cps.unizar.es/general/gente/spd/gzip/gzip.html ).</p> <p>B. UNPACK</p> <p>If you're using DropStuff or Stuffit, you can just extract the tar archive. Otherwise, you can use the freeware <i>suntar</i> ( http://www.cirfid.unibo.it/~speranza ).</p> <p>C. BUILD</p> <p>Does the module require compilation?</p> <p>1. If it does,</p> <p>Overview: You need MPW and a combination of new and old CodeWarrior compilers for MPW and libraries. Makefiles created for building under MPW use the Metrowerks compilers. It's most likely possible to build without other compilers, but it has not been done successfully, to our knowledge. Read the documentation in MacPerl: Power and Ease ( http://www.ptf.com/macperl/ ) on porting/building extensions, or find an existing precompiled binary, or hire someone to build it for you.</p> <p>Or, ask someone on the mac-perl mailing list (mac-perl@iis.ee.ethz.ch) to build it for you. To subscribe to the mac-perl mailing list, send mail to mac-perl-request@iis.ee.ethz.ch.</p> <p>2. If the module doesn't require compilation, go to INSTALL.</p> <p>D. INSTALL</p> <p>Make sure the newlines for the modules are in Mac format, not Unix format. Move the files manually into the correct folders.</p> <p>Move the files to their final destination: This will most likely be in <code>$ENV{MACPERL}site_lib:</code> (i.e., <code>HD:MacPerl folder:site_lib:</code>). You can add new paths to the default <code>@INC</code> in the Preferences menu item in the MacPerl application (<code>$ENV{MACPERL}site_lib:</code> is added automagically). Create whatever directory structures are required (i.e., for <code>Some::Module</code>, create <code>$ENV{MACPERL}site_lib:Some:</code> and put <code>Module.pm</code> in that directory).</p> <p>Run the following script (or something like it):</p> <pre><code>#!perl -w use AutoSplit; my $dir = "${MACPERL}site_perl"; autosplit("$dir:Some:Module.pm", "$dir:auto", 0, 1, 1);</code></pre> <p>Eventually there should be a way to automate the installation process; some solutions exist, but none are ready for the general public yet.</p> </li> <li><p><b>If you're on the DJGPP port of DOS,</b></p> <pre><code class="plaintext">A. DECOMPRESS</code></pre> <p>djtarx ( ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/ ) will both uncompress and unpack.</p> <pre><code class="plaintext">B. UNPACK</code></pre> <p>See above.</p> <pre><code class="plaintext">C. BUILD</code></pre> <p>Go into the newly-created directory and type:</p> <pre><code class="plaintext">perl Makefile.PL make make test</code></pre> <p>You will need the packages mentioned in <code>Readme.dos</code> in the Perl distribution.</p> <pre><code class="plaintext">D. INSTALL</code></pre> <p>While still in that directory, type:</p> <pre><code class="plaintext">make install </code></pre> <p>You will need the packages mentioned in Readme.dos in the Perl distribution.</p> </li> <li><p><b>If you're on OS/2,</b></p> <p>Get the EMX development suite and gzip/tar, from either Hobbes ( http://hobbes.nmsu.edu ) or Leo ( http://www.leo.org ), and then follow the instructions for Unix.</p> </li> <li><p><b>If you're on VMS,</b></p> <p>When downloading from CPAN, save your file with a <code>.tgz</code> extension instead of <code>.tar.gz</code>. All other periods in the filename should be replaced with underscores. For example, <code>Your-Module-1.33.tar.gz</code> should be downloaded as <code>Your-Module-1_33.tgz</code>.</p> <p>A. DECOMPRESS</p> <p>Type</p> <pre><code class="plaintext">gzip -d Your-Module.tgz</code></pre> <p>or, for zipped modules, type</p> <pre><code class="plaintext">unzip Your-Module.zip</code></pre> <p>Executables for gzip, zip, and VMStar ( Alphas: http://www.openvms.digital.com/cd/000TOOLS/ALPHA/ and Vaxen: http://www.openvms.digital.com/cd/000TOOLS/VAX/ ).</p> <p>gzip and tar are also available at ftp://ftp.digital.com/pub/VMS.</p> <p>Note that GNU's gzip/gunzip is not the same as Info-ZIP's zip/unzip package. The former is a simple compression tool; the latter permits creation of multi-file archives.</p> <p>B. UNPACK</p> <p>If you're using VMStar:</p> <pre><code class="plaintext">VMStar xf Your-Module.tar</code></pre> <p>Or, if you're fond of VMS command syntax:</p> <pre><code class="plaintext">tar/extract/verbose Your_Module.tar</code></pre> <p>C. BUILD</p> <p>Make sure you have MMS (from Digital) or the freeware MMK ( available from MadGoat at http://www.madgoat.com ). Then type this to create the DESCRIP.MMS for the module:</p> <pre><code class="plaintext">perl Makefile.PL</code></pre> <p>Now you're ready to build:</p> <pre><code class="plaintext">mms mms test</code></pre> <p>Substitute <code>mmk</code> for <code>mms</code> above if you're using MMK.</p> <p>D. INSTALL</p> <p>Type</p> <pre><code class="plaintext">mms install</code></pre> <p>Substitute <code>mmk</code> for <code>mms</code> above if you're using MMK.</p> </li> <li><p><b>If you're on MVS</b>,</p> <p>Introduce the .tar.gz file into an HFS as binary; don't translate from ASCII to EBCDIC.</p> <p>A. DECOMPRESS</p> <pre><code class="plaintext">Decompress the file with C<gzip -d yourmodule.tar.gz> You can get gzip from http://www.s390.ibm.com/products/oe/bpxqp1.html.</code></pre> <p>B. UNPACK</p> <p>Unpack the result with</p> <pre><code class="plaintext">pax -o to=IBM-1047,from=ISO8859-1 -r < yourmodule.tar</code></pre> <p>The BUILD and INSTALL steps are identical to those for Unix. Some modules generate Makefiles that work better with GNU make, which is available from http://www.mks.com/s390/gnu/index.htm.</p> </li> </ul> <h1 id="HEY"><a class="permalink" href="#HEY">#</a>HEY</h1> <p>If you have any suggested changes for this page, let me know. Please don't send me mail asking for help on how to install your modules. There are too many modules, and too few Orwants, for me to be able to answer or even acknowledge all your questions. Contact the module author instead, or post to comp.lang.perl.modules, or ask someone familiar with Perl on your operating system.</p> <h1 id="AUTHOR"><a class="permalink" href="#AUTHOR">#</a>AUTHOR</h1> <p>Jon Orwant</p> <p>orwant@tpj.com</p> <p>The Perl Journal, http://tpj.com</p> <p>with invaluable help from Brandon Allbery, Charles Bailey, Graham Barr, Dominic Dunlop, Jarkko Hietaniemi, Ben Holzman, Tom Horsley, Nick Ing-Simmons, Tuomas J. Lukka, Laszlo Molnar, Chris Nandor, Alan Olsen, Peter Prymmer, Gurusamy Sarathy, Christoph Spalinger, Dan Sugalski, Larry Virden, and Ilya Zakharevich.</p> <p>July 22, 1998</p> <h1 id="COPYRIGHT"><a class="permalink" href="#COPYRIGHT">#</a>COPYRIGHT</h1> <p>Copyright (C) 1998 Jon Orwant. All Rights Reserved.</p> <p>Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this permission notice are preserved on all copies.</p> <p>Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided also that they are marked clearly as modified versions, that the authors' names and title are unchanged (though subtitles and additional authors' names may be added), and that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.</p> <p>Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions.</p> </div> <div id="footer"> <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p> <p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script> <script src="/js/highlight.pack.js"></script> <script>hljs.highlightAll();</script> </body> </html>