>On Dec 28, 2004, at 1:26 PM, Stas Bekman wrote:
it can't be any simpler:
That wasn't the whole script, but I found it on search.cpan.org. Here's how to get it working with Module::Build right now:
use strict; use warnings FATAL => 'all';
use Apache2;
use Apache::TestMB;
# prerequisites my %require = ( # the keepalive constants and the keepalives() method added in 1.9913 "mod_perl" => "1.9915", "Apache::Test" => "1.10", # ipv6 fixes 'perl' => 6.006,
perl 6? :)
);
my $build_pkg = eval { require Apache::TestMB } ? 'Apache::TestMB' : 'Module::Build';
why Apache::TestMB? It should be ModPerl::MB when it'll appear, right?
why the fallback for Module::Build? Shouldn't it just die then?
what if none exists, should Module::Install be used to require Module::Build?
my $build = $build_pkg->new( module_name => 'Apache::Filter::HTTPHeadersFixup', license => 'perl', requires => \%require, build_requires => { Apache::TestMB => 0 }, create_makefile_pl => 'passthrough', craete_readme => 1, ); $build->create_build_script;
After the release of Module::Build 0.27, you can just do this (no more need to eval TestMB):
when will that be released? I guess I need to require that version then.
use strict; use warnings FATAL => 'all';
use Apache2; use Apache::TestMB;
# prerequisites my %require = ( # the keepalive constants and the keepalives() method added in 1.9913 "mod_perl" => "1.9915", "Apache::Test" => "1.10", # ipv6 fixes 'perl' => 6.006, );
my $build = Module::Build->new( module_name => 'Apache::Filter::HTTPHeadersFixup', license => 'perl', requires => \%require, build_requires => { Apache::TestMB => 0 }, create_makefile_pl => 'passthrough', craete_readme => 1, build_class => 'Apache::TestMB', ); $build->create_build_script;
So the only remaining part is to override Module::Build to place modules under Apache2/ if mp2 was built this way. Could you post an override that unconditionally overrides that and I'll adjust it to figure it out dynamically?
Thanks David.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html