geektron has asked for the wisdom of the Perl Monks concerning the following question:

In order to get all my modules, tests, etc. together I've recently started using ExtUtils::ModuleBuilder to create my stubs and just develop from there. Since I'm working on code that will eventually go into an appliation, I decided the best thing to do (for now) would be to do the initial coding/testing outside of the webroot for the app, then use the  make install target to put the completed code ( after testing ) into the right place.

My relevant filesystem info:

-- /home/httpd-test/ ---- build/ ---- port8080/ ---- port8090/
and so on.

the module libs, tests, etc. are currently under  build/, and i want them to end up in  port8080/. i thought i could do this via the following:

perl Makefile.PL \ PREFIX=/home/httpd-test/port8091/www/ \ LIB=plugins
but, when i run  make -n install, i get:
bash-2.05a$ sudo make install Installing plugins/plugins/ConferenceNameBuilder.pm Writing plugins/i386-linux/auto/ConferenceNameBuilder/.packlist Appending installation info to plugins/i386-linux/perllocal.pod
with no mention of prefix ... and the install failed, because the only 'ComferenceNameBuilder.pm' on my system are the ones written for development.

I'd like to pass the right args into  perl Makefile.PL, but if making a custom Makefile.PL is the right thing to do, i'll do that.

OR ... if ExtUtils::ModuleBuilder has options that i'm missing, i'll GLADLY use those ...

Replies are listed 'Best First'.
Re: ExtUtils::MakeMaker ( or ExtUtils::ModuleMaker ? ) question
by chas (Priest) on Feb 25, 2005 at 02:31 UTC
    The documentation in ExtUtils::MakeMaker says
    "setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB,INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX)"
    This probably explains why your PREFIX declaration seemed to have no effect.
    (I've usually set PREFIX and LIB to the same thing, and that seemed to work well. I remember noticing that if I only set one of them (PREFIX is recommended in many sources), I then had some problems. The explanations in MakeMaker have always seemed a bit cryptic to me.)
    chas
    (Update: I realized after I responded that you seemed to be asking about ExtUtils::ModuleMaker since that's what you are using...I don't have that and haven't ever used it.)