NAME
Apache2::Build - Methods for locating and parsing bits of Apache source
codeSYNOPSIS
use Apache2::Build ();
my $build = Apache2::Build->new;
# rebuild modperl with build opts from the previous build
% cd modperl-2.0
% perl -MApache2::Build -e rebuild
DESCRIPTION
This module provides methods for locating and parsing bits of Apache source code. Since modperl remembers what build options were used to build it, you can use this knowledge to rebuild it using the same options. Simply chdir to the modperl source directory and run:% cd modperl-2.0
% perl -MApache2::Build -e rebuild
If you want to rebuild not yet installed, but already built modperl, run from its root directory:% perl -Ilib -MApache2::Build -e rebuild
MMEETTHHOODDSS new Create an object blessed into the AAppaacchhee22::::BBuuiilldd class.my $build = Apache2::Build->new;
dir Top level directory where source files are located.my $dir = $build->dir;
-d $dir or die "can't stat $dir $!\n";
find Searches for apache source directories, return a list of those found. Example:for my $dir ($build->find) {
my $yn = prompt "Configure with $dir ?", "y";
... } inc Print include paths for MakeMaker's IINNCC argument to "WriteMakefile". Example: use ExtUtils::MakeMaker;use Apache2::Build ();
WriteMakefile('NAME' => 'Apache2::Module',
'VERSION' => '0.01','INC' => Apache2::Build->new->inc,
); modulemagicnumber Return the MMOODDUULLEEMMAAGGIICCNNUUMMBBEERR defined in the apache source. Example:my $mmn = $build->modulemagicnumber;
httpdversion Return the server version. Example:my $v = $build->httpdversion;
otherldflags Return other ld flags for MakeMaker's ddyynnaammiicclliibb argument to "WriteMakefile". This might be needed on systems like AIX that need special flags to the linker to be able to reference modperl or httpd symbols. Example: use ExtUtils::MakeMaker;use Apache2::Build ();
WriteMakefile('NAME' => 'Apache2::Module',
'VERSION' => '0.01','INC' => Apache2::Build->new->inc,
'dynamiclib' => {'OTHERLDFLAGS' => Apache2::Build->new->otherldflags,
}, ); AUTHOR Doug MacEachernperl v5.8.8 2010-12-08 Apache2::Build(3)