.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.48) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "ExtUtils::InstallPaths 3" .TH ExtUtils::InstallPaths 3 2026-08-18 "perl v5.44.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 5 \& use ExtUtils::InstallPaths; \& use ExtUtils::Install \*(Aqinstall\*(Aq; \& GetOptions(\emy %opt, \*(Aqinstall_base=s\*(Aq, \*(Aqinstall_path=s%\*(Aq, \*(Aqinstalldirs=s\*(Aq, \*(Aqdestdir=s\*(Aq, \*(Aqprefix=s\*(Aq, \*(Aquninst:1\*(Aq, \*(Aqverbose:1\*(Aq); \& my $paths = ExtUtils::InstallPaths\->new(%opt, dist_name => $dist_name); \& install($paths\->install_map, $opt{verbose}, 0, $opt{uninst}); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module tries to make install path resolution as easy as possible. .PP When you want to install a module, it needs to figure out where to install things. The nutshell version of how this works is that default installation locations are determined from ExtUtils::Config, and they may be individually overridden by using the \f(CW\*(C`install_path\*(C'\fR attribute. An \f(CW\*(C`install_base\*(C'\fR attribute lets you specify an alternative installation root like \fI/home/foo\fR and \f(CW\*(C`prefix\*(C'\fR does something similar in a rather different (and more complicated) way. \f(CW\*(C`destdir\*(C'\fR lets you specify a temporary installation directory like \fI/tmp/install\fR in case you want to create bundled\-up installable packages. .PP The following types are supported by default. .IP \(bu 4 lib .Sp Usually pure\-Perl module files ending in \fI.pm\fR or \fI.pod\fR. .IP \(bu 4 arch .Sp "Architecture\-dependent" module files, usually produced by compiling XS, Inline, or similar code. .IP \(bu 4 script .Sp Programs written in pure Perl. In order to improve reuse, you may want to make these as small as possible \- put the code into modules whenever possible. .IP \(bu 4 bin .Sp "Architecture\-dependent" executable programs, i.e. compiled C code or something. Pretty rare to see this in a perl distribution, but it happens. .IP \(bu 4 bindoc .Sp Documentation for the stuff in \f(CW\*(C`script\*(C'\fR and \f(CW\*(C`bin\*(C'\fR. Usually generated from the POD in those files. Under Unix, these are manual pages belonging to the \*(Aqman1\*(Aq category. Unless explicitly set, this is only available on platforms supporting manpages. .IP \(bu 4 libdoc .Sp Documentation for the stuff in \f(CW\*(C`lib\*(C'\fR and \f(CW\*(C`arch\*(C'\fR. This is usually generated from the POD in \fI.pm\fR and \fI.pod\fR files. Under Unix, these are manual pages belonging to the \*(Aqman3\*(Aq category. Unless explicitly set, this is only available on platforms supporting manpages. .IP \(bu 4 binhtml .Sp This is the same as \f(CW\*(C`bindoc\*(C'\fR above, but applies to HTML documents. Unless explicitly set, this is only available when perl was configured to do so. .IP \(bu 4 libhtml .Sp This is the same as \f(CW\*(C`libdoc\*(C'\fR above, but applies to HTML documents. Unless explicitly set, this is only available when perl was configured to do so. .PP Create a new ExtUtils::InstallPaths object. \fBAll attributes are valid arguments\fR to the constructor, as well as this: .IP \(bu 4 install_path .Sp This must be a hashref with the type as keys and the destination as values. .IP \(bu 4 install_base_relpaths .Sp This must be a hashref with types as keys and a path relative to the install_base as value. .IP \(bu 4 prefix_relpaths .Sp This must be a hashref any of these three keys: core, vendor, site. Each of the values mush be a hashref with types as keys and a path relative to the prefix as value. You probably want to make these three hashrefs identical. .IP \(bu 4 original_prefix .Sp This must be a hashref with the legal installdirs values as keys and the prefix directories as values. .IP \(bu 4 install_sets .Sp This mush be a hashref with the legal installdirs are keys, and the values being hashrefs with types as keys and locations as values. .PP Return a map suitable for use with ExtUtils::Install. \fBIn most cases, this is the only method you\*(Aqll need\fR. .PP Returns the destination of a certain type. .PP Return a list of all supported install types in the current configuration. .PP Given a file type, will return true if the file type would normally be installed when neither install\-base nor prefix has been set. I.e. it will be true only if the path is set from the configuration object or set explicitly by the user via install_path. .PP Gets the install path for a certain type. .PP Get the path for a certain \f(CW$type\fR with a certain \f(CW$installdirs\fR. .PP Get the relative paths for use with install_base for a certain type. .PP Gets the path of a certain \f(CW$type\fR and \f(CW$installdirs\fR relative to the prefix. .PP Get the default relative path to use in case the config install paths cannot be prefixified. You do not want to use this to get any relative path, but may require it to set it for custom types. .PP Get the original prefix for a certain type of \f(CW$installdirs\fR. .PP The default destinations for these installable things come from entries in your system\*(Aqs configuration. You can select from three different sets of default locations by setting the \f(CW\*(C`installdirs\*(C'\fR parameter as follows: .PP .Vb 2 \& \*(Aqinstalldirs\*(Aq set to: \& core site vendor \& \& uses the following defaults from ExtUtils::Config: \& \& lib => installprivlib installsitelib installvendorlib \& arch => installarchlib installsitearch installvendorarch \& script => installscript installsitescript installvendorscript \& bin => installbin installsitebin installvendorbin \& bindoc => installman1dir installsiteman1dir installvendorman1dir \& libdoc => installman3dir installsiteman3dir installvendorman3dir \& binhtml => installhtml1dir installsitehtml1dir installvendorhtml1dir [*] \& libhtml => installhtml3dir installsitehtml3dir installvendorhtml3dir [*] \& \& * Under some OS (eg. MSWin32) the destination for HTML documents is determined by the C entry C. .Ve .PP The default value of \f(CW\*(C`installdirs\*(C'\fR is "site". .PP You can also set the whole bunch of installation paths by supplying the \f(CW\*(C`install_base\*(C'\fR parameter to point to a directory on your system. For instance, if you set \f(CW\*(C`install_base\*(C'\fR to "/home/ken" on a Linux system, you\*(Aqll install as follows: .PP .Vb 8 \& lib => /home/ken/lib/perl5 \& arch => /home/ken/lib/perl5/i386\-linux \& script => /home/ken/bin \& bin => /home/ken/bin \& bindoc => /home/ken/man/man1 \& libdoc => /home/ken/man/man3 \& binhtml => /home/ken/html \& libhtml => /home/ken/html .Ve .PP This sets a prefix, identical to ExtUtils::MakeMaker\*(Aqs PREFIX option. This does something similar to \f(CW\*(C`install_base\*(C'\fR in a much more complicated way. .PP The ExtUtils::Config object used for this object. .PP The verbosity of ExtUtils::InstallPaths. It defaults to 0 .PP Together with \f(CW\*(C`module_name\*(C'\fR this controls whether a packlist will be added; it defaults to 1. .PP The name of the current module. .PP The name of the main module of the package. This is required for packlist creation, but in the future it may be replaced by dist_name. It defaults to \f(CW\*(C`dist_name =~ s/\-/::/gr\*(C'\fR if dist_name is set. .PP If you want to install everything into a temporary directory first (for instance, if you want to create a directory tree that a package manager like \f(CW\*(C`rpm\*(C'\fR or \f(CW\*(C`dpkg\*(C'\fR could create a package from), you can use the \f(CW\*(C`destdir\*(C'\fR parameter. E.g. Setting \f(CW\*(C`destdir\*(C'\fR to \f(CW"/tmp/foo"\fR will effectively install to "/tmp/foo/$sitelib", "/tmp/foo/$sitearch", and the like, except that it will use \f(CW\*(C`File::Spec\*(C'\fR to make the pathnames work correctly on whatever platform you\*(Aqre installing on. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP \(bu 4 Build.PL spec .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 449:" 4 .IX Item "Around line 449:" Unknown directive: =method .IP "Around line 477:" 4 .IX Item "Around line 477:" Unknown directive: =method .IP "Around line 481:" 4 .IX Item "Around line 481:" Unknown directive: =method .IP "Around line 485:" 4 .IX Item "Around line 485:" Unknown directive: =method .IP "Around line 489:" 4 .IX Item "Around line 489:" Unknown directive: =method .IP "Around line 493:" 4 .IX Item "Around line 493:" Unknown directive: =method .IP "Around line 497:" 4 .IX Item "Around line 497:" Unknown directive: =method .IP "Around line 501:" 4 .IX Item "Around line 501:" Unknown directive: =method .IP "Around line 505:" 4 .IX Item "Around line 505:" Unknown directive: =method .IP "Around line 509:" 4 .IX Item "Around line 509:" Unknown directive: =method .IP "Around line 513:" 4 .IX Item "Around line 513:" Unknown directive: =method .IP "Around line 517:" 4 .IX Item "Around line 517:" Unknown directive: =attr .IP "Around line 539:" 4 .IX Item "Around line 539:" Unknown directive: =attr .IP "Around line 552:" 4 .IX Item "Around line 552:" Unknown directive: =attr .IP "Around line 556:" 4 .IX Item "Around line 556:" Unknown directive: =attr .IP "Around line 560:" 4 .IX Item "Around line 560:" Unknown directive: =attr .IP "Around line 564:" 4 .IX Item "Around line 564:" Unknown directive: =attr .IP "Around line 568:" 4 .IX Item "Around line 568:" Unknown directive: =attr .IP "Around line 572:" 4 .IX Item "Around line 572:" Unknown directive: =attr .IP "Around line 576:" 4 .IX Item "Around line 576:" Unknown directive: =attr