Apache2::Build(3)
π Apache2::Build(3) β User Contributed Perl Documentation π
okay so bestie, welcome to the <pink>Apache2::Build(3)</pink> manual page β it's User Contributed Perl Documentation, and we are officially in the <purple>build-helper zone</purple> π
This module is literally about locating and parsing bits of Apache source code. no cap, it's useful.
πΈ NAME πΈ
Apache2::Build β Methods for locating and parsing bits of Apache source code
β¨ SYNOPSIS β¨
use Apache2::Build ();
my $build = Apache2::Build->new;
# rebuild mod_perl 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. It's giving very "I know where the source lives" energy π
Since mod_perl 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 mod_perl source directory and run:
% cd modperl-2.0
% perl -MApache2::Build -e rebuild
If you want to rebuild not yet installed, but already built mod_perl, run from its root directory:
% perl -Ilib -MApache2::Build -e rebuild
π METHODS π
Here come the methods, bestie β one by one, in order, `no skips π«Ά
π οΈ new
Create an object blessed into the Apache2::Build class. Classic Perl object moment, fr fr.
my $build = Apache2::Build->new;
π dir
Top level directory where source files are located. Like, the big folder energy.
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. Yes, it returns a list, bestie.
Example:
for my $dir ($build->find) {
my $yn = prompt "Configure with $dir ?", "y";
...
}
π inc
Print include paths for MakeMaker's INC argument to "WriteMakefile". Very MakeMaker-coded, very slay.
Example:
use ExtUtils::MakeMaker;
use Apache2::Build ();
WriteMakefile(
'NAME' => 'Apache2::Module',
'VERSION' => '0.01',
'INC' => Apache2::Build->new->inc,
);
π’ module_magic_number
Return the MODULE_MAGIC_NUMBER defined in the apache source. Iconic constant behavior β¨
Example:
my $mmn = $build->module_magic_number;
π httpd_version
Return the server version. Short, sweet, to the point.
Example:
my $v = $build->httpd_version;
π otherldflags
Return other ld flags for MakeMaker's dynamic_lib argument to "WriteMakefile". This might be needed on systems like AIX that need special flags to the linker to be able to reference mod_perl or httpd symbols. It's giving very specific linker needs, and we respect it π
Example:
use ExtUtils::MakeMaker;
use Apache2::Build ();
WriteMakefile(
'NAME' => 'Apache2::Module',
'VERSION' => '0.01',
'INC' => Apache2::Build->new->inc,
'dynamic_lib' => {
'OTHERLDFLAGS' => Apache2::Build->new->otherldflags,
},
);
π AUTHOR π
Doug MacEachern β author credit, periodt π
mwah π β this page is from perl v5.42.3, dated 2023-10-21, and it's the Apache2::Build(3) manual. byeee π«Άβ¨
π¦ where this page comes from
- nixos 26.05: mod_perl 2.0.13
- nixpkgs unstable: mod_perl 2.0.13
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms