Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

geoff (2013)

  reversethis-{gro ... om} {ta} {ffoeg}

see [] for personal information, links to presentations, GPG key, and so on.

Journal of geoff (2013)

Friday March 07, 2003
02:03 PM

Makefile.PL woes

[ #10942 ]
I realized today that my latest version of Apache::Clean for mod_perl 2.0 had a serious problem - it installed itself like any other module, under $Config{sitelib}/Apache/

while this may at first seem ok, mod_perl 2.0 has this strange ability to install itself under Apache2/, so that if you

use Apache2 ();

mod_perl will look for stuff under $Config{sitelib}/Apache2/Apache/. so, if the rest of the server is configured under Apache2, installing this new package would still work, but it would clobber the existing Apache::Clean in the mod_perl 1.0 installation. Of course, Apache::Clean is just an example - this kind of stuff has to be figured out before we can expect people to start porting their modules over to mod_perl 2.0.

after a few hours of fighting with ExtUtils::MakeMaker and pouring over the mod_perl 2.0 Makefile.PL and other innards, I finally found a way to install relative to Apache/ or Apache2/, depending on how mod_perl was built, that seems to work. it's even pretty simple (though not at all intuitive) once you know the magic formula. it looks something like

my %apache2 =
    ? ( macro => { MOD_INSTALL => ModPerl::MM::mod_install(), }, )
    : ();

*MY::constants = \&ModPerl::MM::MY::constants;
*MY::post_initialize = \&ModPerl::MM::MY::post_initialize;

  'NAME'         => 'Apache::Clean',
  'VERSION_FROM' => '',
  'PREREQ_PM'    => {
    'HTML::Clean' => 0.8,
    mod_perl      => 1.99

check out the latest version if you're interested in swiping the code.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.