How does one build and install a local Perl module? I downloaded the code for a module that won't compile as-is so I mucked around in the code. I'd like to build it and install it. I sort of have the build down using the makefile although I would like to know how to specify "osname" in the makefile. So a .pm and .bundle file are created. I tried to do a make install but from what I see that neither file was installed in the proper location. I am doing this on a MacOS system and I have perlbrew installed. Every post I see for installing modules only discuss using cpan to install from the remote cpan repository. I'll have to post another question on why so many modules I attempt to install as-is fail, grrrrr.
Asked
Active
Viewed 397 times
-1
-
1Needs more detail. Is this a distribution (i.e. does it come with a `Makefile.PL` file? Unit tests in a `t` directory?)? Does the module contain XS/C code that must be compiled to your local architecture, and is that where the problem occurred? What is the module? Could it be publicly available and popular enough that someone here might have installation experience with that particular module? – mob Apr 27 '20 at 16:35
1 Answers
1
If it has a Build.PL
:
perl Build.PL
./Build test
./Build install
Otherwise:
perl Makefile.PL
make test
make install
(This assumes all dependencies are installed.)

ikegami
- 367,544
- 15
- 269
- 518