The utility which
(a shell-builtin on my system)
shows the full path of (shell) commands
So it can query the location of installed programs, like ls
or cd
, and it also will show whether a command is, in fact, a shell command. Try which echo
for instance.
Files Makefile.PL
and/or Build.PL
come with a distribution, not with Perl. They are not programs installed on the system, and even when they are there which
cannot find them.
Make sure to read the documentation with the distribution, in tne particular instructions for how to install it, but you'll start with perl Makefile.PL
or perl Build.PL
. For example, once you found the file Makefile.PL
in the unpacked distribution, a typical process consists of running
perl Makefile.PL
make
make test
make install
A quick search reveals this guide on perlmonks. There is a lot more out there.
The Build.PL
is generally associated with Module::Build, and an installation outline is the same as above except that you use ./Build
instead of make
. With it you don't need to even have make
.
This approach is an alternative to ExtUtils::MakeMaker, which uses Makefile.PL
. Comparing these two major alternatives is tricky and I'd rather not get into that. The Module::Build
can also generate the file Makefile.PL
. Both files may be provided so that one can use either method, and this decision itself is a topic of discussions.
As for whether to use Makefile.PL
or Build.PL
for your install, I suggest to find discussions of the module, starting with its own docs, and see which one people recommend for that distribution. Most often either is fine.
Another related common type of file is Makefile
(no extension). This is run by the program make
, and often without arguments (make
finds the Makefile
). The first command above writes one such file out, and then the remaining make
commands use it to trigger actions that build (+test+install) the module.
Have you considered using cpan or cpanm instead? You can use them to install stuff as a user into a directory of your choosing. See, for instance, this post and this post.
Or, consider perlbrew for a fully contained Perl with all chosen modules, insulated from any future management of the system perl.