The simplest way to do this is to quit the interactive shell by typing
quit
and reenter it. But if you insist here is how to make it work
without quitting the shell. You really want to skip this 🙂
If you want to continue working with CPAN
without
quitting the shell, you must:
-
remember the value
of makepl_arg -
change it to suit
your new installation -
build and install
mod_perl -
restore it after
completing mod_perl installation
this is quite a cumbersome task as of this writing, but I believe that
CPAN.pm
will eventually be improved to handle this more easily.
So if you are still with me, start the shell as usual:
% perl -MCPAN -eshellFirst, read the value of the
makepl_arg
:cpan> o conf makepl_argPREFIX=/home/stasIt will be something like
PREFIX=/home/stas
if you configured
CPAN.pm
to install modules locally. Save this value:cpan> o conf makepl_arg.save PREFIX=/home/stasSecond, set a new value, to be used by the mod_perl installation process.
(You can add parameters to this line, or remove them, according to your needs.)
To wit:cpan> o conf makepl_arg 'DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 PREFIX=/home/stas APACHE_PREFIX=/home/stas/apache'Third, let
CPAN.pm
build and install mod_perl for you:cpan> install mod_perlFourth, reset the original value to
makepl_arg
. We do this by
printing the value of the saved variable and assigning it to
makepl_arg
:cpan> o conf makepl_arg.savePREFIX=/home/stascpan> o conf makepl_arg PREFIX=/home/stasNot so neat, but a working solution. You could have written the value on a
piece of paper instead of saving it tomakepl_arg.save
, but you
are more likely to make a mistake that way.References
-
The Apache site’s URL: http://www.apache.org
-
The mod_perl site’s URL: http://perl.apache.org
-
CPAN is the Comprehensive Perl Archive Network. The master site’s URL
is http://cpan.org/. CPAN is mirrored at more
than one hundred sites around the world. (http://cpan.org/SITES.html)
About the Author
Stas Bekman is an author of
the mod_perl Guide and is currently
co-athoring a book about mod_perl for O’Reilly and
Associates, Inc together with Eric
Cholet. He is a member of the Apache
Software Foundation. You can find more about his works and joys at his
personal web site.