Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

Apache2::Build (3)

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

User Contributed Perl Documentation                          Apache2::Build(3)



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.

       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
       new Create an object blessed into the Apache2::Build 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 INC argument to
           "WriteMakefile".

           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.

           Example:

            my $mmn = $build->module_magic_number;

       httpd_version
           Return the server version.

           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.

           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



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+-----------------------------------------+
       |ATTRIBUTE TYPE |            ATTRIBUTE VALUE              |
       +---------------+-----------------------------------------+
       |Availability   | web/server/apache-24/module/apache-perl |
       +---------------+-----------------------------------------+
       |Stability      | Uncommitted                             |
       +---------------+-----------------------------------------+

NOTES
       Source code for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       https://www.apache.org/dist/perl/mod_perl-2.0.12.tar.gz.

       Further information about this software can be found on the open source
       community website at https://perl.apache.org/.



perl v5.32.0                      2022-06-28                 Apache2::Build(3)