| Previous | Next
ExtUtils::MakeMakerWrites a Makefile for module installation. Provides a function, If you are a Perl developer writing a module, you should run h2xs to generate the template for your module. Among other things, h2xs creates a file called Makefile.PL, and it's Makefile.PL that runs MakeMaker. On the other hand, if you are installing a module, you can usually just run the Makefile.PL that came with the module, perhaps adding a PREFIX argument if you are installing the module locally (see "Installing Perl"). In either case, you shouldn't need to run ExtUtils::MakeMaker directly unless you have special requirements. A typical call to MakeMaker might look like this example from the CGI distribution:
MakeMaker attributes can be passed as arguments to perl Makefile.PL PREFIX=/home/mydir/Perl/Modules To see what MakeMaker is doing, you can say: perl Makefile.PL verbose The following attributes can be specified:
The following lowercase attributes can be used to pass parameters to the methods that implement the corresponding part of the Makefile:
If specifying attributes isn't sufficient to accomplish what you want, you can define your own subroutines in the Makefile.PL that return the text to be written to the Makefile. You can also override MakeMaker's subroutines (described in "ExtUtils::MM_Unix") this way. |