Apache2-API

 view release on metacpan or  search on metacpan

lib/Apache2/API.pm  view on Meta::CPAN

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 L<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 C<NO_MOD_PERL=1> when calling C<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

=head2 Makefile.PL options

Here are the available options to use when building the C<Makefile.PL>:

=over 4

=item C<-access_module_name>

access module name

=item C<-apxs>

location of apxs (default is from L<Apache2::BuildConfig>)

=item C<-auth_module_name>

auth module name

=item C<-bindir>

Apache bin/ dir (default is C<apxs -q BINDIR>)

=item C<-cgi_module_name>

cgi module name

=item C<-defines>

values to add as C<-D> defines (for example, C<"VAR1 VAR2">)

=item C<-documentroot>

DocumentRoot (default is C<$ServerRoot/htdocs>

=item C<-group>

Group to run test server as (default is C<$GROUP>)

=item C<-httpd>

server to use for testing (default is C<$bindir/httpd>)

=item C<-httpd_conf>

inherit config from this file (default is apxs derived)

=item C<-httpd_conf_extra>

inherit additional config from this file

=item C<-libmodperl>

path to mod_perl's .so (full or relative to LIBEXECDIR)

=item C<-limitrequestline>

global LimitRequestLine setting (default is C<128>)

=item C<-maxclients>

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

=item C<-minclients>

minimum number of concurrent clients (default is C<1>)

=item C<-perlpod>

location of perl pod documents (for testing downloads)

=item C<-php_module_name>

php module name

=item C<-port>

Port [port_number|select] (default C<8529>)

=item C<-proxyssl_url>

url for testing ProxyPass / https (default is localhost)

=item C<-sbindir>

Apache sbin/ dir (default is C<apxs -q SBINDIR>)

=item C<-servername>

ServerName (default is C<localhost>)

=item C<-serverroot>

ServerRoot (default is C<$t_dir>)

=item C<-src_dir>

source directory to look for C<mod_foos.so>

=item C<-ssl_module_name>

ssl module name

=item C<-sslca>

location of SSL CA (default is C<$t_conf/ssl/ca>)

=item C<-sslcaorg>

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

=item C<-sslproto>

SSL/TLS protocol version(s) to test

=item C<-startup_timeout>

seconds to wait for the server to start (default is C<60>)

=item C<-t_conf>

the conf/ test directory (default is C<$t_dir/conf>)

=item C<-t_conf_file>

test httpd.conf file (default is C<$t_conf/httpd.conf>)

=item C<-t_dir>

the t/ test directory (default is C<$top_dir/t>)

=item C<-t_logs>

the logs/ test directory (default is C<$t_dir/logs>)

=item C<-t_pid_file>

location of the pid file (default is C<$t_logs/httpd.pid>)

=item C<-t_state>

the state/ test directory (default is C<$t_dir/state>)

=item C<-target>



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