lib::Apache::srcU(s3e)r

lib::Apache::srcU(s3e)r

Apache::SIG Home Page Subroutines Index Apache::StatINC


my $src = Apache::src->new;

       for my $path ($src->find) {
           my $mmn = $src->module_magic_number($path);
           my $v   = $src->httpd_version($path);
           next unless $v;
           print "path = $path ($mmn,$v)\n";
           my $dir = $src->prompt("Configure with $path?"); }

NNAAMMEE
       Apache::src - Methods for locating and parsing bits of
       Apache source code

SSYYNNOOPPSSIISS
        use Apache::src ();
        my $src = Apache::src->new;

DDEESSCCRRIIPPTTIIOONN
       This module provides methods for locating and parsing bits
       of Apache source code.

MMEETTHHOODDSS
       new Create an object blessed into the AAppaacchhee::::ssrrcc 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";

       main
           Apache's source tree was reorganized during
           development of version 1.3.  So, common header files
           such as httpd.h 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";

       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";
               ...
            }

       inc Print include paths for MakeMaker's IINNCC argument to
           WriteMakefile.

           Example:

            use ExtUtils::MakeMaker;

            use Apache::src ();

            WriteMakefile(
                'NAME'    => 'Apache::Module',
                'VERSION' => '0.01',
                'INC'     => Apache::src->new->inc,
            );

       module_magic_number
           Return the MMOODDUULLEE__MMAAGGIICC__NNUUMMBBEERR defined in the apache
           source.

           Example:

            my $mmn = $src->module_magic_number;

       httpd_version
           Return the server version.

           Example:

            my $v = $src->httpd_version;

AAUUTTHHOORR
       Doug MacEachern


Apache::SIG Home Page Subroutines Index Apache::StatINC