Apache2-API

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

    sudo make install

If you have Apache/modperl2 installed, this will also prepare the Makefile and run test under modperl.

The Makefile.PL tries hard to find your Apache configuration, but you can give it a hand by specifying some command line parameters.

For example:

    perl Makefile.PL -apxs /usr/bin/apxs -port 1234
    # which will also set the path to httpd_conf, otherwise
    perl Makefile.PL -httpd_conf /etc/apache2/apache2.conf

    # then
    make
    make test
    # or
    # t/TEST
    sudo make install

You can also enable a lot of debugging output with:

    API_DEBUG=1 perl Makefile.PL

And if your terminal supports it, you can show output in colours with:

    APACHE_TEST_COLOR=1 perl Makefile.PL

See also [modperl testing documentation](https://perl.apache.org/docs/general/testing/testing.html)

But, if for some reason, you do not want to perform the mod\_perl tests, you can use `NO_MOD_PERL=1` when calling `perl Makefile.PL`, such as:

    NO_MOD_PERL=1 perl Makefile.PL
    make
    make test
    sudo make install

To run individual test, you can do, for example:

    t/TEST t/01.api.t

or, in verbose mode:

    t/TEST -verbose t/01.api.t

## Makefile.PL options

Here are the available options to use when building the `Makefile.PL`:

- `-access_module_name`

    access module name

- `-apxs`

    location of apxs (default is from [Apache2::BuildConfig](https://metacpan.org/pod/Apache2%3A%3ABuildConfig))

- `-auth_module_name`

    auth module name

- `-bindir`

    Apache bin/ dir (default is `apxs -q BINDIR`)

- `-cgi_module_name`

    cgi module name

- `-defines`

    values to add as `-D` defines (for example, `"VAR1 VAR2"`)

- `-documentroot`

    DocumentRoot (default is `$ServerRoot/htdocs`

- `-group`

    Group to run test server as (default is `$GROUP`)

- `-httpd`

    server to use for testing (default is `$bindir/httpd`)

- `-httpd_conf`

    inherit config from this file (default is apxs derived)

- `-httpd_conf_extra`

    inherit additional config from this file

- `-libmodperl`

    path to mod\_perl's .so (full or relative to LIBEXECDIR)

- `-limitrequestline`

    global LimitRequestLine setting (default is `128`)

- `-maxclients`

    maximum number of concurrent clients (default is minclients+1)

- `-minclients`

    minimum number of concurrent clients (default is `1`)

- `-perlpod`

    location of perl pod documents (for testing downloads)

- `-php_module_name`

    php module name

- `-port`

    Port \[port\_number|select\] (default `8529`)

- `-proxyssl_url`

    url for testing ProxyPass / https (default is localhost)

- `-sbindir`

    Apache sbin/ dir (default is `apxs -q SBINDIR`)

- `-servername`

    ServerName (default is `localhost`)

- `-serverroot`

    ServerRoot (default is `$t_dir`)

- `-src_dir`

    source directory to look for `mod_foos.so`

- `-ssl_module_name`

    ssl module name

- `-sslca`

    location of SSL CA (default is `$t_conf/ssl/ca`)

- `-sslcaorg`

    SSL CA organization to use for tests (default is asf)

- `-sslproto`

    SSL/TLS protocol version(s) to test

- `-startup_timeout`

    seconds to wait for the server to start (default is `60`)

- `-t_conf`

    the conf/ test directory (default is `$t_dir/conf`)

- `-t_conf_file`

    test httpd.conf file (default is `$t_conf/httpd.conf`)

- `-t_dir`

    the t/ test directory (default is `$top_dir/t`)

- `-t_logs`

    the logs/ test directory (default is `$t_dir/logs`)

- `-t_pid_file`

    location of the pid file (default is `$t_logs/httpd.pid`)

- `-t_state`

    the state/ test directory (default is `$t_dir/state`)

- `-target`



( run in 0.529 second using v1.01-cache-2.11-cpan-2398b32b56e )