How do YOU manage Perl modules when using a package manager?
Since this question was originally asked, perlbrew has been released. It makes installing custom, self-contained perl installs trivial. And switching between those versions is just as easy:
perlbrew switch $version
How can I package up my Perl app's dependencies for deployment?
As mentioned in the comments above, Pinto may suit your needs as it creates your own CPAN repo.
Pinto has two primary goals. First, Pinto seeks to address the problem
of instability in the CPAN mirrors. Distribution archives are
constantly added and removed from the CPAN, so if you use it to build
a system or application, you may not get the same result twice.
Second, Pinto seeks to encourage developers to use the CPAN toolchain
for building, testing, and dependency management of their own local
software, even if they never plan to release it to the CPAN.Pinto accomplishes these goals by providing tools for creating and
managing your own custom repositories of distribution archives. These
repositories can contain any distribution archives you like, and can
be used with the standard CPAN toolchain. The tools also support
various operations that enable you to deal with common problems that
arise during the development process.
Second Answer
Alternatively, if you are only going to deploy to Ubuntu, you can turn CPAN modules - and your own into Debian packages with dh-make-perl. You can then host them in your own repo with reprepro. The beauty of this is that you can update the packages and do a
apt-get update
apt-get upgrade
on the client machines, so long as they have your own repo as a source
Windows batch file to install multiple perl modules - only the first line runs
In my Perl installation the command ppm
is a batch file: ppm.bat
(not an .exe
)
When you call one batch file from another, the calling batch file is terminated together with the called batch file.
You need to use call
in order to be able to run another batch file from within one batch file.
call ppm install Chart
call ppm install Template-GD
call ppm install MIME-tools
call ppm install XML-Twig
call ppm install PatchReader
What's the name of Perl distribution units?
Distribution (or "dist" for short).
The name for a Perl distribution unit is distribution, so cpanm XML::LibXML
installs the XML-LibXML distribution, because it includes the specified XML::LibXML module.
Example 1
Example 2
Note that linux distributions usually have a package manager such as apt
or yum
, and many Perl distributions are made available as packages for those package managers. Someone using those package managers might refer to Perl distributions as packages, but that's not standard Perl jargon.
Related Topics
How to Know the Script File Name in a Bash Script
How to Access Physical Addresses from User Space in Linux
Asynchronous Io Io_Submit Latency in Ubuntu Linux
Performing Http Requests With Curl (Using Proxy)
Appending a Line to a File Only If It Does Not Already Exist
Sorting Multiple Keys With Unix Sort
Get Destination Address of a Received Udp Packet
What Is the Runtime Performance Cost of a Docker Container
Ld Cannot Find an Existing Library
Is There Any API For Determining the Physical Address from Virtual Address in Linux
How to Set the Working Directory of the Parent Process
How to Use Local Docker Images With Minikube
Awk or Sed to Remove All Text After X Occurence in Each Line of File
How to Scroll Up/Down on the Console of a Linux Vm
How to Change the Output Color of Echo in Linux
Using Awk to Count the Number of Occurrences of a Word in a Column