=head1 NAME Apache::src - Methods for locating and parsing bits of Apache source code =head1 Synopsis use Apache::src (); my $src = Apache::src->new; =head1 Description This module provides methods for locating and parsing bits of Apache source code. =head1 Methods =over 4 =item new Create an object blessed into the B class. my $src = Apache::src->new; =item dir Top level directory where source files are located. my $dir = $src->dir; -d $dir or die "can't stat $dir $!\n"; =item main Apache's source tree was reorganized during development of version 1.3. So, common header files such as C are in different directories between versions less than 1.3 and those equal to or greater. This method will return the right directory. Example: -e join "/", $src->main, "httpd.h" or die "can't stat httpd.h\n"; =item find Searches for apache source directories, return a list of those found. Example: for my $dir ($src->find) { my $yn = prompt "Configure with $dir ?", "y"; ... } =item inc Print include paths for MakeMaker's B argument to C. Example: use ExtUtils::MakeMaker; use Apache::src (); WriteMakefile( 'NAME' => 'Apache::Module', 'VERSION' => '0.01', 'INC' => Apache::src->new->inc, ); =item module_magic_number Return the B defined in the apache source. Example: my $mmn = $src->module_magic_number; =item httpd_version Return the server version. Example: my $v = $src->httpd_version; =item otherldflags Return other ld flags for MakeMaker's B argument to C. 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. Example: use ExtUtils::MakeMaker; use Apache::src (); WriteMakefile( 'NAME' => 'Apache::Module', 'VERSION' => '0.01', 'INC' => Apache::src->new->inc, 'dynamic_lib' => { 'OTHERLDFLAGS' => Apache::src->new->otherldflags, }, ); =back =head1 Author Doug MacEachern =cut