cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/12/27 03:50:22 Removed: pod modperl_dev.pod Log: - modperl_dev has been split into a few documents: -> user/config/config.pod -> user/install/install.pod and ceased to exist
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/12/27 03:10:04 Modified:pod modperl_dev.pod Log: 'make test' features now all live in the writing_tests document Revision ChangesPath 1.49 +2 -98 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- modperl_dev.pod 2001/12/27 09:23:14 1.48 +++ modperl_dev.pod 2001/12/27 11:10:04 1.49 @@ -206,104 +206,8 @@ =head1 'make test' Features -=head2 What Test Options are Available - -Run: - - % ./t/TEST -help - -to get the list of options you can use during testing - -=head2 'make test' Debug - -mod_perl-2.0 provides built in 'make test' debug facility. So in case -you get a core dump during make test, or just for fun, run in one shell: - - % ./t/TEST -debug - -in another shell: - - % ./t/TEST -run - -then the I<-debug> shell will have a (gdb) prompt, type 'where' for -stacktrace. - -You can change the default debugger by supplying the name of the -debugger as an argument to I<-debug>. E.g. to run the server under -C: - - % ./t/TEST -debug=ddd - -=head2 Advanced Debugging - -If you debug mod_perl internals you can set the breakpoints using the -I<-breakpoint> option, which can be repeated as many times as -needed. When you set at least one breakpoint, the server will start -running till it meets the I breakpoint. At this -point we can set the breakpoint for the mod_perl code, something we -cannot do earlier if mod_perl was built as DSO. For example: - - % ./t/TEST -debug -breakpoint=modperl_cmd_switches \ - -breakpoint=modperl_cmd_options - -will set the I and I -breakpoints and run the debugger. - -If you want to tell the debugger to jump to the start of the mod_perl -code you may run: - - % ./t/TEST -debug -breakpoint=modperl_hook_init - -In fact I<-breakpoint> automatically turns on the debug mode, so you -can run: - - % ./t/TEST -breakpoint=modperl_hook_init - - -=head2 Running Individual Tests - -Run a single test: - - % ./t/TEST protocol/echo.t - -The server will be stopped if it was already running and a new one -will be started before running the I test. At the -end of the test the server will be shut down. - -You can run groups of tests at once. - - % ./t/TEST modules protocol/echo.t - -will run all the tests in I directory, followed by -I test. - -=head2 Repeating the Tests - -By default when you run the test without I<-run-tests> option, the -server will be started before the testing and stopped at the end. If -during a debugging process you need to re-run tests without a need to -restart the server, you can start the server once: - - % ./t/TEST modules -start-httpd - -and then run the test(s) with I<-run-tests> option many times: - - % ./t/TEST -run-tests protocol/echo - -without waiting for the server to restart. - -When you are done with tests shutdown the server: - - % ./t/TEST modules -stop-httpd - -=head2 Verbose Testing - -By default print() statements in the test script are filtered out by -C. if you want the test to print what it does (if you -decide to debug some test) use C<-verbose> option: - - % t/TEST -verbose protocol/echo.t - +L<../writing_tests/writing_tests.pod> document covers the C +suite. =head1 mod_perl configuration directives
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/12/27 01:23:14 Modified:pod modperl_dev.pod Log: - the help section has moved to its own document at docs/devel/help/help.pod Revision ChangesPath 1.48 +0 -146modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- modperl_dev.pod 2001/12/24 19:28:41 1.47 +++ modperl_dev.pod 2001/12/27 09:23:14 1.48 @@ -203,152 +203,6 @@ % perl build/source_scan.pl apxs $apache_prefix/bin/apxs -=head1 Support - -The following mailing lists can be of a major interest to the mod_perl -2.0 developers: - -=head2 mod_perl 2.0 Development - -=over - -=item discussion/problems report: - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: http://marc.theaimsgroup.com/?l=apache-modperl-dev&r=1&w=2#apache-modperl-dev - -reporting: Be sure to include the output of: - - % perl build/config.pl - -which generates the output from: - -=over 4 - -=item perl -V - -=item httpd -V - -=item Makefile.PL options - -=back - -You can also use I. - -If you get segmentation faults see the I<'make test' Debug> section. - -=item cvs commits: - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: http://marc.theaimsgroup.com/?l=apache-modperl-cvs&r=1&w=2#apache-modperl-cvs - - -=back - - -=head2 Apache-Test - -The C project, originally developed as a part of mod_perl -2.0, is now a part of the Apache C project. You get this -repository automatically when checking out the mod_perl-2.0 cvs -repository. - -To retrieve the whole httpd-test project, run: - - cvs co httpd-test - -=over - -=item discussion/problems report: - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: ??? - -=item cvs commits - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: ??? - -=back - - -=head2 Apache 2.0 - -=over - -=item discussion/problems report: - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: http://marc.theaimsgroup.com/?l=apache-new-httpd&r=1&w= - -=item cvs commits - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: http://marc.theaimsgroup.com/?l=apache-cvs&r=1&w=2 - -=back - - -=head2 Apache Portable Runtime (APR) - -The Apache Portable Run-time libraries have been designed to provide a -common interface to low level routines across any platform. mod_perl -comes with a partial Perl APR API. - -=over - -=item discussion/problems report: - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: http://marc.theaimsgroup.com/?l=apr-dev&r=1&w=2 - -=item cvs commits - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: http://marc.theaimsgroup.com/?l=apr-cvs&r=1&w=2 - -=back - - - -=head2 Perl 5 - -Currently mod_perl 2.0 requires perl 5.6.x and higher. If you have -problems with Perl perl5-porters mailing list should be used. For -other lists see http://lists.perl.org/. - -=over - -=item discussion/problems report: - -mailing list subscription: mailto:[EMAIL PROTECTED] - -archive: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ -and http:[EMAIL PROTECTED]/ - -news gateway: news://news.perl.com/perl.porters-gw/ - -=item perforce - -Perl uses perforce for its source revision control, see -I manpage coming with Perl for more -information. - -mailing list subscription: [EMAIL PROTECTED] - -archive: http:[EMAIL PROTECTED]/ - -=back - - =head1 'make test' Features
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/12/24 11:28:41 Modified:pod modperl_dev.pod Log: - fix the MP_CCOPTS=-Werror example (should have no spaces) - explain how to use gdb faster under mod_perl DSO. Revision ChangesPath 1.47 +106 -1modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- modperl_dev.pod 2001/12/15 23:45:05 1.46 +++ modperl_dev.pod 2001/12/24 19:28:41 1.47 @@ -137,8 +137,11 @@ Add to compiler flags, e.g. - MP_CCOPTS = -Werror + MP_CCOPTS=-Werror +(Notice that C<-Werror> will work only with the Perl version 5.007 and +higher.) + =item MP_OPTIONS_FILE Read options from given file @@ -702,6 +705,108 @@ % gdb /home/stas/httpd-2.0/bin/httpd -command \ /home/stas/apache.org/modperl-perlmodule/t/.gdb-jump-to-init +=head2 Starting the Server Fast under gdb + +When the server is started under gdb, it first loads the symbol tables +of the dynamic libraries that it sees going to be used. Some versions +of gdb may take ages to complete this task, which makes the debugging +very irritating if you have to restart the server all the time and it +doesn't happen immediately. + +The trick is to set the C flag to 0: + + set auto-solib-add 0 + +in I<~/.gdbinit> file. + +With this setting in effect, you can load only the needed dynamic +libraries with I command. Remember that in order to set +a breakpoint and step through the code inside a certain dynamic +library you have to load it first. For example consider this gdb +commands file: + + .gdb-commands + + file ~/httpd/prefork/bin/httpd + handle SIGPIPE pass + handle SIGPIPE nostop + set auto-solib-add 0 + b ap_run_pre_config + run -DONE_PROCESS -d `pwd`/t -f `pwd`/t/conf/httpd.conf \ + -DAPACHE2 -DPERL_USEITHREADS + sharedlibrary modperl + b modperl_hook_init + # start: modperl_hook_init + continue + # restart: ap_run_pre_config + continue + # restart: modperl_hook_init + continue + b apr_poll + continue + + # load APR/PerlIO/PerlIO.so + sharedlibrary PerlIO + b PerlIOAPR_open + +which can be used as: + + % gdb -command=.gdb-commands + +This script stops in I, so you can step through +the mod_perl startup. We had to use the I so we can +load the I library as explained earlier. Since httpd +restarts on the start, we have to I until we hit +I second time, where we can set the breakpoint at +I, the very point where httpd polls for new request and run +again I so it'll stop at I. + +When gdb stops at the function I it's a time to start the +client: + + % t/TEST -run + +But before that if we want to debug the server response we need to set +breakpoints in the libraries we want to debug. For example if we want +to debug the function C which resides in +I we first load it and then we can set a +breakpoint in it. Notice that gdb may not be able to load a library if +it wasn't referenced by any of the code. In this case we have to +require this library at the server startup. In our example we load: + + PerlModule APR::PerlIO + +in I. To check which libraries' symbol tables can be +loaded in gdb, run (when the server has been started): + + gdb> info sharedlibrary + +which will also show which libraries were loaded already. + +Also notice that you don't have to type the full path of the library +when trying to load them, even a partial name will suffice. In our +commands file example we have used C instead of +saying C. + +If you want to set breakpoints and step through the code in the Perl +and APR core libraries you should load their appropriate libraries: + + gdb> sharedlibrary libperl + gdb> sharedlibrary libapr + gdb> sharedlibrary libaprutil + +Setting I to 0 makes the debugging process unusual, +since originally gdb was loading the dynamic libraries automatically, +whereas now it doesn't. This is the price one has to pay to get the +debugger starting the program very fast. Hopefully the future versions +of gdb will improve. + +Just remember that if you try to I and debugger doesn't do +anything, that means that the library the function is located in +wasn't loaded. The solution is to create a commands file as explained +in the beginning of this section and craft the startup script the way +you need to avoid extra typing and mistakes when repeating the same +debugging process again and again. =head1 Notes for Developers
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/12/15 15:45:05 Modified:lib/ModPerl BuildOptions.pm pod modperl_dev.pod Log: make MP_GENERATE_XS=1 the default Revision ChangesPath 1.13 +1 -0 modperl-2.0/lib/ModPerl/BuildOptions.pm Index: BuildOptions.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- BuildOptions.pm 2001/11/21 02:13:00 1.12 +++ BuildOptions.pm 2001/12/15 23:45:05 1.13 @@ -25,6 +25,7 @@ } $build->{MP_USE_DSO} = 1 unless $build->{MP_USE_STATIC}; +$build->{MP_GENERATE_XS} = 1 unless exists $build->{MP_GENERATE_XS}; } sub parse { 1.46 +2 -2 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- modperl_dev.pod 2001/12/13 18:09:41 1.45 +++ modperl_dev.pod 2001/12/15 23:45:05 1.46 @@ -64,8 +64,7 @@ =head2 Create the build environment % cd modperl-2.0 - % perl Makefile.PL MP_GENERATE_XS=1 \ -MP_APXS=$apache_prefix/bin/apxs && make + % perl Makefile.PL MP_APXS=$apache_prefix/bin/apxs && make I an optional list of (key,value) pairs. @@ -80,6 +79,7 @@ =item MP_GENERATE_XS Generate xs code from parsed source headers in I. +Default is 1, set to 0 to disable. =item MP_USE_DSO
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/12/13 10:09:41 Modified:pod modperl_dev.pod Log: "threaded" mpm no longer exists --enable-so is turned on by default Revision ChangesPath 1.45 +4 -6 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- modperl_dev.pod 2001/10/20 18:59:28 1.44 +++ modperl_dev.pod 2001/12/13 18:09:41 1.45 @@ -18,8 +18,7 @@ % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr-util % cd .. % ./buildconf - % ./configure --prefix=$HOME/apache-2.0 \ - --with-mpm=threaded --enable-so + % ./configure --prefix=$HOME/apache-2.0 --with-mpm=prefork % make && make install Once extracted, whenever you want to sync with the latest httpd-2.0 @@ -28,8 +27,7 @@ % cd httpd-2.0 % cvs up -dP % make distclean && ./buildconf - % ./configure --prefix=$HOME/apache-2.0 \ - --with-mpm=threaded --enable-so + % ./configure --prefix=$HOME/apache-2.0 --with-mpm=prefork % make && make install For bleeding edge Perl: @@ -44,7 +42,7 @@ % ln -s $HOME/bleedperl/bin/perl5.x.x $HOME/bleedperl/bin/perl or otherwise make sure that your perl was built with threads enabled if -you want to use the threaded MPM. +you want to use a threaded MPM. If you are re-building Perl after rsync-ing, make sure to cleanup: @@ -185,7 +183,7 @@ =head2 Configure and compile Apache % cd ../httpd-2.0 - % ./configure --with-mpm=threaded + % ./configure --with-mpm=prefork % make =head2 Howto generate source tables
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/10/20 11:59:28 Modified:.Makefile.PL lib/Apache Build.pm lib/ModPerl BuildOptions.pm pod modperl_dev.pod Log: add MP_AP_PREFIX build option; possible to derive apxs values on platforms where apxs is not supported Revision ChangesPath 1.46 +4 -1 modperl-2.0/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl-2.0/Makefile.PL,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- Makefile.PL 2001/10/17 17:38:07 1.45 +++ Makefile.PL 2001/10/20 18:59:28 1.46 @@ -47,7 +47,10 @@ set_modperl_version(); if ($build->{MP_APXS}) { -print "Using $build->{MP_APXS}\n"; +print "Using APXS => $build->{MP_APXS}\n"; +} +elsif ($build->{MP_AP_PREFIX} and -e $build->apxs(-q => 'INCLUDEDIR')) { +print "Using Apache prefix => $build->{MP_AP_PREFIX}\n"; } else { for my $path ($build->find) { 1.54 +13 -1 modperl-2.0/lib/Apache/Build.pm Index: Build.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- Build.pm 2001/10/16 20:59:15 1.53 +++ Build.pm 2001/10/20 18:59:28 1.54 @@ -36,6 +36,13 @@ our $APXS; +my %apxs_query = ( +INCLUDEDIR => 'include', +LIBEXECDIR => 'modules', +CFLAGS => undef, +PREFIX => '', +); + sub apxs { my $self = shift; @@ -71,7 +78,12 @@ last if -x $apxs; } -return '' unless $apxs and -x $apxs; +unless ($apxs and -x $apxs) { +my $prefix = $self->{MP_AP_PREFIX} || ""; +return '' unless -d $prefix and $is_query; +my $val = $apxs_query{$_[1]}; +return defined $val ? ($val ? "$prefix/$val" : $prefix) : ""; +} my $val = qx($apxs @_ 2>/dev/null); 1.11 +1 -0 modperl-2.0/lib/ModPerl/BuildOptions.pm Index: BuildOptions.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- BuildOptions.pm 2001/10/20 18:30:39 1.10 +++ BuildOptions.pm 2001/10/20 18:59:28 1.11 @@ -160,6 +160,7 @@ OPTIONS_FILE Read options from given file STATIC_EXTS Build Apache::*.xs as static extensions APXSPath to apxs +AP_PREFIXApache installation prefix XS_GLUE_DIR Directories containing extension glue INCLUDE_DIR Add directories to search for header files GENERATE_XS Generate XS code based on httpd version 1.44 +9 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- modperl_dev.pod 2001/10/20 18:30:40 1.43 +++ modperl_dev.pod 2001/10/20 18:59:28 1.44 @@ -87,6 +87,15 @@ Build mod_perl as a DSO (default) +=item MP_APXS + +Path to apxs + +=item MP_AP_PREFIX + +Apache installation prefix +(can be used to derive apxs values on platforms where apxs is not supported) + =item MP_USE_STATIC Build mod_perl static
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/10/20 11:30:40 Modified:lib/ModPerl BuildOptions.pm pod modperl_dev.pod Log: default to building mod_perl as a dso Revision ChangesPath 1.10 +4 -1 modperl-2.0/lib/ModPerl/BuildOptions.pm Index: BuildOptions.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- BuildOptions.pm 2001/09/08 18:00:49 1.9 +++ BuildOptions.pm 2001/10/20 18:30:39 1.10 @@ -23,6 +23,8 @@ if ($build->{MP_DEBUG} and $build->{MP_USE_GTOP}) { $build->{MP_USE_GTOP} = 0 unless $build->find_dlfile('gtop'); } + +$build->{MP_USE_DSO} = 1 unless $build->{MP_USE_STATIC}; } sub parse { @@ -151,7 +153,8 @@ MAINTAINER Maintainer mode: DEBUG=1 -DAP_DEBUG -Wall ... CCOPTS Add to compiler flags TRACETurn on tracing -USE_DSO Build mod_perl as a dso +USE_DSO Build mod_perl as a dso +USE_STATIC Build mod_perl static INST_APACHE2 Install *.pm relative to Apache2/ directory PROMPT_DEFAULT Accept default value for all would-be prompts OPTIONS_FILE Read options from given file 1.43 +6 -2 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- modperl_dev.pod 2001/10/19 02:17:10 1.42 +++ modperl_dev.pod 2001/10/20 18:30:40 1.43 @@ -66,7 +66,7 @@ =head2 Create the build environment % cd modperl-2.0 - % perl Makefile.PL MP_GENERATE_XS=1 MP_USE_DSO=1 \ + % perl Makefile.PL MP_GENERATE_XS=1 \ MP_APXS=$apache_prefix/bin/apxs && make I an optional list of (key,value) pairs. @@ -85,7 +85,11 @@ =item MP_USE_DSO -Build mod_perl as a DSO +Build mod_perl as a DSO (default) + +=item MP_USE_STATIC + +Build mod_perl static =item MP_STATIC_EXTS
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/10/18 19:17:10 Modified:pod modperl_dev.pod Log: - document the existance of PerlInitHandler Revision ChangesPath 1.42 +2 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- modperl_dev.pod 2001/09/28 20:23:04 1.41 +++ modperl_dev.pod 2001/10/19 02:17:10 1.42 @@ -473,6 +473,8 @@ =item PerlPostReadRequestHandler +=item PerlInitHandler + =item PerlTransHandler =back
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/09/28 13:23:04 Modified:pod modperl_dev.pod Log: document numeric equivalents of PerlTrace options Revision ChangesPath 1.41 +10 -10modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- modperl_dev.pod 2001/09/18 16:05:16 1.40 +++ modperl_dev.pod 2001/09/28 20:23:04 1.41 @@ -497,17 +497,17 @@ which sets maximum logging and debugging levels; -a combination of one or more option letters from the following list: +a combination of one or more option letters (or option numerical +equivalents) from the following list: - d directive processing - f filters - g Perl runtime interaction - h handlers - i interpreter pool management - m memory allocations - s perl sections - -or a numeric value. + d ( 1) directive processing + f ( 2) filters + g ( 4) Perl runtime interaction + h ( 8) handlers + i ( 16) interpreter pool management + m ( 32) memory allocations + s ( 64) perl sections + t (128) benchmark-ish timings When C is not specified, the tracing level will be set to the value of the MOD_PERL_TRACE environment variable.
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/09/17 19:44:49 Modified:pod modperl_dev.pod Log: clarify +Parent/+Clone differences Revision ChangesPath 1.39 +5 -4 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- modperl_dev.pod 2001/09/18 01:36:26 1.38 +++ modperl_dev.pod 2001/09/18 02:44:49 1.39 @@ -557,18 +557,19 @@ =item Parent -Create a new parent Perl interpreter for the given VirtualHost -(implies Clone). +Create a new parent Perl interpreter for the given VirtualHost and +give it its own interpreter pool (implies Clone). =item Clone -Give the VirtualHost its own interpreter pool. +Share the parent Perl interpreter, but give the VirtualHost its own +interpreter pool. Use: PerlSwitches +inherit -to inherit base PerlSwitches. +to inherit base Perl interpreter's C. =item Enable
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/09/17 18:36:26 Modified:pod modperl_dev.pod Log: s/Enabled/Enable/ following the code patch Revision ChangesPath 1.38 +1 -1 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- modperl_dev.pod 2001/09/17 13:53:07 1.37 +++ modperl_dev.pod 2001/09/18 01:36:26 1.38 @@ -570,7 +570,7 @@ to inherit base PerlSwitches. -=item Enabled +=item Enable On by default, used to disable mod_perl for a given VirtualHost.
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/09/17 06:53:07 Modified:pod modperl_dev.pod Log: PerlSwitches inherit from base only with +inherit. Revision ChangesPath 1.37 +6 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- modperl_dev.pod 2001/09/10 07:36:53 1.36 +++ modperl_dev.pod 2001/09/17 13:53:07 1.37 @@ -564,6 +564,12 @@ Give the VirtualHost its own interpreter pool. +Use: + + PerlSwitches +inherit + +to inherit base PerlSwitches. + =item Enabled On by default, used to disable mod_perl for a given VirtualHost.
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/09/10 00:36:53 Modified:pod modperl_dev.pod Log: update rsync flags to always bring perl sources to a pristine state Revision ChangesPath 1.36 +3 -1 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- modperl_dev.pod 2001/08/23 03:39:14 1.35 +++ modperl_dev.pod 2001/09/10 07:36:53 1.36 @@ -34,7 +34,9 @@ For bleeding edge Perl: - % rsync -auvz rsync://ftp.linux.activestate.com/perl-current/ perl-current + # (--delete to ensure a clean state) + % rsync -acvz --delete --force \ + rsync://ftp.linux.activestate.com/perl-current/ perl-current % cd perl-current % ./Configure -des -Dprefix=$HOME/bleedperl \ -Dusethreads -Doptimize='-g' -Dusedevel
cvs commit: modperl-2.0/pod modperl_dev.pod
stas01/08/22 20:39:14 Modified:pod modperl_dev.pod Log: mailing list update Revision ChangesPath 1.35 +1 -1 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- modperl_dev.pod 2001/08/14 04:57:18 1.34 +++ modperl_dev.pod 2001/08/23 03:39:14 1.35 @@ -266,7 +266,7 @@ =item discussion/problems report: -mailing list subscription: mailto:[EMAIL PROTECTED] +mailing list subscription: mailto:[EMAIL PROTECTED] archive: http://marc.theaimsgroup.com/?l=apache-new-httpd&r=1&w=
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/08/13 21:57:18 Modified:pod modperl_dev.pod Log: update Perl5 source control item Revision ChangesPath 1.34 +4 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- modperl_dev.pod 2001/08/12 10:22:09 1.33 +++ modperl_dev.pod 2001/08/14 04:57:18 1.34 @@ -326,6 +326,10 @@ I manpage coming with Perl for more information. +mailing list subscription: [EMAIL PROTECTED] + +archive: http:[EMAIL PROTECTED]/ + =back
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/08/08 20:29:32 Modified:pod modperl_dev.pod Log: add a note about using threaded perl Revision ChangesPath 1.32 +3 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- modperl_dev.pod 2001/08/02 04:38:11 1.31 +++ modperl_dev.pod 2001/08/09 03:29:32 1.32 @@ -41,6 +41,9 @@ % make && make test && make install % ln -s $HOME/bleedperl/bin/perl5.x.x $HOME/bleedperl/bin/perl +or otherwise make sure that your perl was built with threads enabled if +you want to use the threaded MPM. + If you are re-building Perl after rsync-ing, make sure to cleanup: % make distclean
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/07/16 19:10:26 Modified:pod modperl_dev.pod Log: adjust the docs following the change of cvs host Revision ChangesPath 1.29 +5 -5 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- modperl_dev.pod 2001/07/07 16:24:33 1.28 +++ modperl_dev.pod 2001/07/17 02:10:25 1.29 @@ -10,12 +10,12 @@ Or use anoncvs (password is "anoncvs"): - % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login - % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co modperl-2.0 - % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co httpd-2.0 + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co modperl-2.0 + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co httpd-2.0 % cd httpd-2.0/srclib - % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr - % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr-util + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr-util % cd .. % ./buildconf % ./configure --prefix=$HOME/apache-2.0 \
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/07/07 09:24:34 Modified:pod modperl_dev.pod Log: document the trick of setting the breakpoint in the mod_perl code when it's loaded via DSO Revision ChangesPath 1.28 +47 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- modperl_dev.pod 2001/06/29 07:46:02 1.27 +++ modperl_dev.pod 2001/07/07 16:24:33 1.28 @@ -475,6 +475,53 @@ PerlOptions -Authen -Authz -Access +=head1 Debug notes + +=head2 Setting gdb breakpoints with mod_perl built as DSO + +If mod_perl is built as a DSO module, you cannot set the breakpoint in +the mod_perl source files when the I program gets loaded into +the debugger. The reason is simple: At this moment I has no +idea about mod_perl module yet. After the configuration file is +processed and the mod_perl DSO module is loaded then the breakpoints +in the source of mod_perl itself can be set. + +The trick is to break at I, let it load +I, then you can set breakpoints anywhere in the modperl +code: + + % gdb httpd + (gdb) b apr_dso_load + (gdb) run -DONE_PROCESS + [New Thread 1024 (LWP 1600)] + [Switching to Thread 1024 (LWP 1600)] + + Breakpoint 1, apr_dso_load (res_handle=0xbfffb48c, path=0x811adcc +"/home/stas/apache.org/modperl-perlmodule/src/modules/perl/libmodperl.so", +pool=0x80e1a3c) at dso.c:138 + 141 void *os_handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL); + (gdb) finish + ... + Value returned is $1 = 0 + (gdb) b modperl_hook_init + (gdb) continue + +This example shows how to set a breakpoint at I. + +To automate things you can put those in the I<.gdb-jump-to-init> file: + + b apr_dso_load + run -DONE_PROCESS -d /home/stas/apache.org/modperl-perlmodule/t \ + -f /home/stas/apache.org/modperl-perlmodule/t/conf/httpd.conf + finish + b modperl_hook_init + continue + +and then start the debugger with: + + % gdb /home/stas/httpd-2.0/bin/httpd -command \ + /home/stas/apache.org/modperl-perlmodule/t/.gdb-jump-to-init + =head1 Notes for Developers
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/04/24 23:10:07 Modified:pod modperl_dev.pod Log: Perl does not use cvs Revision ChangesPath 1.22 +1 -1 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- modperl_dev.pod 2001/04/25 05:54:54 1.21 +++ modperl_dev.pod 2001/04/25 06:10:05 1.22 @@ -41,7 +41,7 @@ % make && make test && make install % ln -s $HOME/bleedperl/bin/perl5.x.x $HOME/bleedperl/bin/perl -If you are re-building Perl after cvs update, make sure to cleanup: +If you are re-building Perl after rsync-ing, make sure to cleanup: % make distclean
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/04/24 22:54:57 Modified:pod modperl_dev.pod Log: another important note: cleanup in the Perl source Revision ChangesPath 1.21 +6 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- modperl_dev.pod 2001/04/25 05:38:41 1.20 +++ modperl_dev.pod 2001/04/25 05:54:54 1.21 @@ -41,6 +41,12 @@ % make && make test && make install % ln -s $HOME/bleedperl/bin/perl5.x.x $HOME/bleedperl/bin/perl +If you are re-building Perl after cvs update, make sure to cleanup: + + % make distclean + +before running C<./Configure>. + You'll also want to install (at least) LWP into the bleedperl/lib directory if you want to fully test mod_perl, because normally a privately installed bleedperl won't find libraries installed in the
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/04/24 22:38:41 Modified:pod modperl_dev.pod Log: fixo Revision ChangesPath 1.20 +2 -2 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- modperl_dev.pod 2001/04/25 05:26:27 1.19 +++ modperl_dev.pod 2001/04/25 05:38:41 1.20 @@ -26,8 +26,8 @@ version and rebuild, run: % cd httpd-2.0 - % cvs up - % make testclean && ./buildconf + % cvs up -dP + % make distclean && ./buildconf % ./configure --prefix=$HOME/apache-2.0 \ --with-mpm=threaded --enable-so % make && make install
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/04/24 22:26:27 Modified:pod modperl_dev.pod Log: documenting my latest build experience based on Doug's helpful notes: * always run 'make testclean' in httpd-2.0 source after cvs up * notes to debug 'make test' * raise the priority of using util/config.pl versus manual approach Revision ChangesPath 1.19 +31 -8 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- modperl_dev.pod 2001/04/25 02:44:34 1.18 +++ modperl_dev.pod 2001/04/25 05:26:27 1.19 @@ -22,6 +22,16 @@ --with-mpm=threaded --enable-so % make && make install +Once extracted, whenever you want to sync with the latest httpd-2.0 +version and rebuild, run: + + % cd httpd-2.0 + % cvs up + % make testclean && ./buildconf + % ./configure --prefix=$HOME/apache-2.0 \ + --with-mpm=threaded --enable-so + % make && make install + For bleeding edge Perl: % rsync -auvz rsync://ftp.linux.activestate.com/perl-current/ perl-current @@ -118,8 +128,6 @@ =back - - Options can also be specified in the file C. Command line options override those from C and those from MP_OPTIONS_FILE. @@ -151,9 +159,12 @@ =head1 Support Discussion of mod_perl-2.0 currently takes place on the [EMAIL PROTECTED] list. -Any problems/questions should be report to that list, be sure to -include: [EMAIL PROTECTED] list. Any problems/questions should be report to +that list, be sure to include the output of: + + % perl util/config.pl + +which generates the output from: =over 4 @@ -165,11 +176,23 @@ =back -hint: +You can also use I. - % perl util/config.pl +=head1 'make test' Debug + +mod_perl-2.0 provides built in 'make test' debug facility. So in case +you get a core dump during make test, or just for fun, run in one shell: + + % t/TEST -debug + +in another shell: + + % t/TEST -run + +then the I<-debug> shell will have a (gdb) prompt, type 'where' for +stacktrace. + -will generate this requested information. =head1 mod_perl configuration directives
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/04/24 19:44:35 Modified:pod modperl_dev.pod Log: to make a full test LWP is required, adding a note about it Revision ChangesPath 1.18 +10 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- modperl_dev.pod 2001/04/24 05:50:28 1.17 +++ modperl_dev.pod 2001/04/25 02:44:34 1.18 @@ -29,6 +29,16 @@ % ./Configure -des -Dprefix=$HOME/bleedperl \ -Dusethreads -Doptimize='-g' -Dusedevel % make && make test && make install + % ln -s $HOME/bleedperl/bin/perl5.x.x $HOME/bleedperl/bin/perl + +You'll also want to install (at least) LWP into the bleedperl/lib +directory if you want to fully test mod_perl, because normally a +privately installed bleedperl won't find libraries installed in the +normal places; it only looks in it's own lib tree. You can install LWP +with CPAN.pm shell: + + % $HOME/bleedperl/bin/perl -MCPAN -e 'install("LWP")' + =head1 Compiling
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/04/23 22:50:28 Modified:pod modperl_dev.pod Log: document -DMP_IOBUFSIZE= option Revision ChangesPath 1.17 +14 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- modperl_dev.pod 2001/04/20 16:50:53 1.16 +++ modperl_dev.pod 2001/04/24 05:50:28 1.17 @@ -96,6 +96,20 @@ =back +mod_perl specific compiler opts: + +=over 4 + +=item -DMP_IOBUFSIZE + +Change the default mod_perl's 8k IO buffer size, e.g. 16k: + + MP_CCOPTS=-DMP_IOBUFSIZE=16384 + +=back + + + Options can also be specified in the file C. Command line options override those from C and those from MP_OPTIONS_FILE.
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/04/09 10:53:50 Modified:pod modperl_dev.pod Log: add support section Revision ChangesPath 1.15 +17 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- modperl_dev.pod 2001/04/05 00:13:05 1.14 +++ modperl_dev.pod 2001/04/09 17:53:49 1.15 @@ -124,6 +124,23 @@ % perl util/source_scan.pl apxs $apache_prefix/bin/apxs +=head1 Support + +Discussion of mod_perl-2.0 currently takes place on the [EMAIL PROTECTED] list. +Any problems/questions should be report to that list, be sure to +include: + +=over 4 + +=item perl -V + +=item httpd -V + +=item Makefile.PL options + +=back + =head1 mod_perl configuration directives =head2 Installing handlers
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/04/04 17:13:06 Modified:pod modperl_dev.pod Log: don't place . in your PATH Revision ChangesPath 1.14 +3 -3 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- modperl_dev.pod 2001/04/04 21:57:51 1.13 +++ modperl_dev.pod 2001/04/05 00:13:05 1.14 @@ -5,8 +5,8 @@ =head1 Installing -Download the httpd-2.0 and modperl-2.0 tarballs, and extract them -in the same directory. +Download the httpd-2.0 and modperl-2.0 tarballs, and extract them in the +same directory. Or use anoncvs (password is "anoncvs"): @@ -17,7 +17,7 @@ % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr-util % cd .. - % buildconf + % ./buildconf % ./configure --prefix=$HOME/apache-2.0 \ --with-mpm=threaded --enable-so % make && make install
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/04/04 14:57:51 Modified:pod modperl_dev.pod Log: add note about newish requirement Revision ChangesPath 1.13 +2 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- modperl_dev.pod 2001/04/04 05:41:07 1.12 +++ modperl_dev.pod 2001/04/04 21:57:51 1.13 @@ -69,6 +69,8 @@ =item MP_MAINTAINER +NOTE: apache must be build with --enable-maintainer-mode + Maintainer compile mode, turn on MP_DEBUG and add gcc flags: -DAP_DEBUG \
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/04/03 22:41:07 Modified:lib/ModPerl BuildOptions.pm MM.pm pod modperl_dev.pod Log: build extensions dynamic by default Revision ChangesPath 1.7 +1 -1 modperl-2.0/lib/ModPerl/BuildOptions.pm Index: BuildOptions.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- BuildOptions.pm 2001/03/26 16:17:06 1.6 +++ BuildOptions.pm 2001/04/04 05:41:06 1.7 @@ -143,7 +143,7 @@ INST_APACHE2 Install *.pm relative to Apache2/ directory PROMPT_DEFAULT Accept default value for all would-be prompts OPTIONS_FILE Read options from given file -DYNAMIC Build Apache::*.xs as dynamic extensions +STATIC_EXTS Build Apache::*.xs as static extensions APXSPath to apxs XS_GLUE_DIR Directories containing extension glue INCLUDE_DIR Add directories to search for header files 1.8 +1 -1 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- MM.pm 2001/03/04 18:43:09 1.7 +++ MM.pm 2001/04/04 05:41:06 1.8 @@ -98,7 +98,7 @@ #they are, unlike 1.xx where *.xs live in src/modules/perl #and are copied to subdir/ if DYNAMIC=1 -unless ($build->{MP_DYNAMIC}) { +if ($build->{MP_STATIC_EXTS}) { #skip .xs -> .so if we are linking static my $name = $self->{NAME}; unless ($always_dynamic{$name}) { 1.12 +2 -2 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- modperl_dev.pod 2001/04/04 04:11:44 1.11 +++ modperl_dev.pod 2001/04/04 05:41:07 1.12 @@ -55,9 +55,9 @@ Build mod_perl as a DSO -=item MP_DYNAMIC +=item MP_STATIC_EXTS -Build Apache::*.xs as dynamic extensions +Build Apache::*.xs as static extensions =item MP_USE_GTOP
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/04/03 21:11:44 Modified:.00README_FIRST pod modperl_dev.pod Log: remove duplicate build instructions Revision ChangesPath 1.16 +5 -33 modperl-2.0/00README_FIRST Index: 00README_FIRST === RCS file: /home/cvs/modperl-2.0/00README_FIRST,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- 00README_FIRST2001/03/27 02:39:47 1.15 +++ 00README_FIRST2001/04/04 04:11:43 1.16 @@ -1,41 +1,13 @@ -a (nearly) complete rewrite is underway for mod_perl-2.0 +a complete rewrite is underway for mod_perl-2.0 -more detailed design docs, etc., see the pod/ directory +for more detailed design docs, etc., see the pod/ directory -if you want to try building with an interpreter pool, you'll need Perl -5.6.0 built like so: +see pod/modperl_dev.pod for build instructions. -% ./Configure -des -Dusethreads - -mod_perl-2.0 will still work with an out-of-the-box Perl, but will -only be useful if your mpm is prefork (which is much like 1.3.x) - -to build mod_perl static: -NOTE: static linking untested for several months - -% perl Makefile.PL && make - -% cd ../httpd-2.0 -% ./configure --prefix=$HOME/apache-2.0 --with-mpm=threaded -% patch -p1 < ../../modperl-2.0/patches/link-hack.pat -% make - -to build mod_perl dynamic: - -build httpd with mod_so enabled: -% cd httpd-2.0 -% ./configure --with-mpm=threaded --enable-so ... -% make -% make install - -#build libmodperl.so and extension .so's -% perl Makefile.PL MP_GENERATE_XS=1 MP_USE_DSO=1 \ -MP_APXS=$apache_prefix/bin/apxs && make - as for httpd.conf, mine looks something like so at the moment: #if dynamic build -LoadModule perl_module libexec/libmodperl.so +LoadModule perl_module modules/libmodperl.so #same as using the MOD_PERL_TRACE environment variable PerlTrace all @@ -63,4 +35,4 @@ see the examples/ directory for examples. ---dougm 03/26/01 +--dougm 04/03/01 1.11 +2 -1 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- modperl_dev.pod 2001/03/26 16:17:10 1.10 +++ modperl_dev.pod 2001/04/04 04:11:44 1.11 @@ -35,7 +35,8 @@ =head2 Create the build environment % cd modperl-2.0 - % perl Makefile.PL [options] + % perl Makefile.PL MP_GENERATE_XS=1 MP_USE_DSO=1 \ +MP_APXS=$apache_prefix/bin/apxs && make I an optional list of (key,value) pairs. Currently all options are boolean, set them with MP_XXX=1.
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/03/26 08:17:13 Modified:.00README_FIRST Makefile.PL lib/ModPerl BuildOptions.pm pod modperl_dev.pod Log: MP_GENERATE_XS option to generate xs code from checked-in tables, since C::Scan doesnt work on some platforms Revision ChangesPath 1.13 +3 -16 modperl-2.0/00README_FIRST Index: 00README_FIRST === RCS file: /home/cvs/modperl-2.0/00README_FIRST,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- 00README_FIRST2001/03/05 04:27:29 1.12 +++ 00README_FIRST2001/03/26 16:17:00 1.13 @@ -28,22 +28,9 @@ % make % make install -build the parsed structure and function tables: - -NOTE: requires C::Scan 0.75, which at the moment is unreleased, there -is a working copy here: http://perl.apache.org/~dougm/Scan.pm - -NOTE: source_scan.pl is a HEAVY process, do not be alarmed -should be run each time you update your httpd-2.0 tree - -% perl util/source_scan.pl apxs $apache_prefix/bin/apxs - -generate xs code from the tables: - -% perl util/xs_generate.pl - #build libmodperl.so and extension .so's -% perl Makefile.PL MP_USE_DSO=1 MP_APXS=$apache_prefix/bin/apxs && make +% perl Makefile.PL MP_GENERATE_XS=1 MP_USE_DSO=1 \ +MP_APXS=$apache_prefix/bin/apxs && make as for httpd.conf, mine looks something like so at the moment: @@ -66,4 +53,4 @@ much is the same as 1.x, but plenty is different at the moment. there will be a compat layer in the future. ---dougm 03/04/01 +--dougm 03/26/01 1.27 +22 -0 modperl-2.0/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl-2.0/Makefile.PL,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- Makefile.PL 2001/03/05 04:11:01 1.26 +++ Makefile.PL 2001/03/26 16:17:01 1.27 @@ -57,6 +57,8 @@ #ModPerl::MM will use Apache::BuildConfig in subdir/Makefile.PL's $build->save; + +generate_xs($httpd_version) if $build->{MP_GENERATE_XS}; } sub post_configure { @@ -78,6 +80,26 @@ } $build->save; +} + +sub generate_xs { +my $httpd_version = shift; + +my $tables_version = + $httpd_version =~ /-dev$/ ? 'current' : $httpd_version; + +my $tables_dir = "xs/tables/$tables_version"; +unshift @INC, $tables_dir; + +print "generating XS code using $tables_dir...\n"; + +require ModPerl::WrapXS; + +my $xs = ModPerl::WrapXS->new; + +$xs->generate; + +shift @INC; } sub echo_cmd { 1.6 +1 -0 modperl-2.0/lib/ModPerl/BuildOptions.pm Index: BuildOptions.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- BuildOptions.pm 2001/03/04 19:41:57 1.5 +++ BuildOptions.pm 2001/03/26 16:17:06 1.6 @@ -147,3 +147,4 @@ APXSPath to apxs XS_GLUE_DIR Directories containing extension glue INCLUDE_DIR Add directories to search for header files +GENERATE_XS Generate XS code based on httpd version 1.10 +17 -0 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- modperl_dev.pod 2001/03/26 13:37:08 1.9 +++ modperl_dev.pod 2001/03/26 16:17:10 1.10 @@ -46,6 +46,10 @@ Accept default values for all would-be prompts +=item MP_GENERATE_XS + +Generate xs code from parsed source headers in I. + =item MP_USE_DSO Build mod_perl as a DSO @@ -103,6 +107,19 @@ % ./configure --with-mpm=threaded % make +=head2 Howto generate source tables + +All mod_perl-2.0 xs code is generated from parsed header files. While +in pre-release mode, a version of these tables will be checked in to +I. Should you wish to update these tables, here's +how: + +NOTE: requires C::Scan 0.75, which at the moment is unreleased, there +is a working copy here: http://perl.apache.org/~dougm/Scan.pm + +NOTE: source_scan.pl is a HEAVY process, do not be alarmed. + +% perl util/source_scan.pl apxs $apache_prefix/bin/apxs =head1 mod_perl configuration directives
cvs commit: modperl-2.0/pod modperl_dev.pod
sbekman 01/03/26 05:37:08 Modified:pod modperl_dev.pod Log: Geoff's patch Revision ChangesPath 1.9 +2 -2 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- modperl_dev.pod 2001/01/06 02:41:22 1.8 +++ modperl_dev.pod 2001/03/26 13:37:08 1.9 @@ -19,7 +19,7 @@ % cd .. % buildconf % ./configure --prefix=$HOME/apache-2.0 \ - --with-mpm=mpmt_pthread --enable-so + --with-mpm=threaded --enable-so % make && make install For bleeding edge Perl: @@ -100,7 +100,7 @@ =head2 Configure and compile Apache % cd ../httpd-2.0 - % ./configure --with-mpm=mpmt_pthread + % ./configure --with-mpm=threaded % make
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/01/05 18:41:22 Modified:pod modperl_dev.pod Log: update cvs docs Revision ChangesPath 1.8 +21 -3 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- modperl_dev.pod 2001/01/02 20:25:37 1.7 +++ modperl_dev.pod 2001/01/06 02:41:22 1.8 @@ -8,9 +8,27 @@ Download the httpd-2.0 and modperl-2.0 tarballs, and extract them in the same directory. -[XXX: anon cvs for httpd-2.0, apr, apr-util, modperl-2.0] +Or use anoncvs (password is "anoncvs"): -[XXX: rsync for perl-current] + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co modperl-2.0 + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co httpd-2.0 + % cd httpd-2.0/srclib + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr + % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr-util + % cd .. + % buildconf + % ./configure --prefix=$HOME/apache-2.0 \ + --with-mpm=mpmt_pthread --enable-so + % make && make install + +For bleeding edge Perl: + + % rsync -auvz rsync://ftp.linux.activestate.com/perl-current/ perl-current + % cd perl-current + % ./Configure -des -Dprefix=$HOME/bleedperl \ + -Dusethreads -Doptimize='-g' -Dusedevel + % make && make test && make install =head1 Compiling @@ -247,4 +265,4 @@ #disable handlers PerlOptions -Authen -Authz -Access - \ No newline at end of file +
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/01/02 12:25:41 Modified:pod modperl_dev.pod Log: some updates Revision ChangesPath 1.7 +7 -6 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- modperl_dev.pod 2001/01/02 06:40:19 1.6 +++ modperl_dev.pod 2001/01/02 20:25:37 1.7 @@ -5,13 +5,13 @@ =head1 Installing -Download the apache-2.0 and modperl-2.0 tarballs, and extract them -in the same directory: +Download the httpd-2.0 and modperl-2.0 tarballs, and extract them +in the same directory. - % ls -l - drwxr-xr-x 8 eric eric 512 May 28 03:12 apache-2.0 - drwxr-xr-x 8 eric eric 512 May 28 11:59 modperl-2.0 +[XXX: anon cvs for httpd-2.0, apr, apr-util, modperl-2.0] +[XXX: rsync for perl-current] + =head1 Compiling =head2 Create the build environment @@ -81,7 +81,7 @@ =head2 Configure and compile Apache - % cd ../apache-2.0/src + % cd ../httpd-2.0 % ./configure --with-mpm=mpmt_pthread % make @@ -149,6 +149,7 @@ a combination of one or more option letters from the following list: d directive processing + f filters g Perl runtime interaction h handlers i interpreter pool management
cvs commit: modperl-2.0/pod modperl_dev.pod
cholet 00/06/09 00:58:25 Modified:pod modperl_dev.pod Log: sync with latest build changes Revision ChangesPath 1.2 +22 -7 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- modperl_dev.pod 2000/05/30 22:04:46 1.1 +++ modperl_dev.pod 2000/06/09 07:58:25 1.2 @@ -16,6 +16,7 @@ =head2 Create the build environment + % cd modperl-2.0 % perl Makefile.PL [options] I an optional list of (key,value) pairs. Currently all options are @@ -25,31 +26,45 @@ =item MP_PROMPT_DEFAULT -Do not prompt the user, instead use default answers to any questions. +Accept default values for all would-be prompts =item MP_USE_DSO -build mod_perl as a DSO +Build mod_perl as a DSO +=item MP_DYNAMIC + +Build Apache::*.xs as dynamic extensions + =item MP_USE_GTOP -use Gtop +Link with libgtop and enable libgtop reporting =item MP_DEBUG -compilation includes symbols for debugging. Implies MP_TRACE +Turn on debugging (-g -Wall -lperld) and tracing =item MP_TRACE + +Enable tracing + +=item MP_CCOPTS + +Add to compiler flags + +=item MP_INST_APACHE2 -enable tracing +Install *.pm relative to Apache2/ directory -=item MP_CPP +=item MP_OPTIONS_FILE -just run the C preprocessor, don't compile or link +Read options from given file =back Options can also be specified in the file C. +Command line options override those from C +and those from MP_OPTIONS_FILE. =head2 Compile mod_perl
cvs commit: modperl-2.0/pod modperl_dev.pod
cholet 00/05/30 15:04:46 Added: pod modperl_dev.pod Log: preliminary developer documentation Revision ChangesPath 1.1 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === =head1 Disclaimer This is preliminary developer's documentation, incomplete and probably inaccurate at times. Feel free to contribute. =head1 Installing Download the apache-2.0 and modperl-2.0 tarballs, and extract them in the same directory: % ls -l drwxr-xr-x 8 eric eric 512 May 28 03:12 apache-2.0 drwxr-xr-x 8 eric eric 512 May 28 11:59 modperl-2.0 =head1 Compiling =head2 Create the build environment % perl Makefile.PL [options] I an optional list of (key,value) pairs. Currently all options are boolean, set them with MP_XXX=1. =over 4 =item MP_PROMPT_DEFAULT Do not prompt the user, instead use default answers to any questions. =item MP_USE_DSO build mod_perl as a DSO =item MP_USE_GTOP use Gtop =item MP_DEBUG compilation includes symbols for debugging. Implies MP_TRACE =item MP_TRACE enable tracing =item MP_CPP just run the C preprocessor, don't compile or link =back Options can also be specified in the file C. =head2 Compile mod_perl % make =head2 Configure and compile Apache % cd ../apache-2.0/src % ./configure --with-mpm=mpmt_pthread % make =head1 mod_perl configuration directives =head2 Installing handlers =over 4 =item PerlChildInitHandler =item PerlOpenLogsHandler =item PerlPostConfigHandler =item PerlPreConnectionHandler =item PerlProcessConnectionHandler =item PerlHeaderParserHandler =item PerlAccessHandler =item PerlAuthenHandler =item PerlAuthzHandler =item PerlTypeHandler =item PerlFixupHandler =item PerlLogHandler =item PerlPostReadRequestHandler =item PerlTransHandler =back =head2 General directives =over 4 =item PerlSwitches switches pass switches to the Perl command line. For example, to enable warnings: PerlSwitches -w =item PerlTrace [level] set the trace level. This directive is enabled when mod_perl is compiled with the MP_TRACE option. C is either: all which sets maximum logging and debugging levels; a combination of one or more option letters from the following list: d directive processing g Perl runtime interaction h handlers i interpreter pool management m memory allocations s perl sections a numeric value. When C is not specified, the tracing level will be set to the value of the MOD_PERL_TRACE environment variable. =back =head2 Threaded mode directives These directives are enabled only in a threaded mod_perl+Apache combo. =over 4 =item PerlInterpStart Number of Perl interpreters to start =item PerlInterpMax Max number of running Perl interpreters =item PerlInterpMaxSpare Max number of spare Perl interpreters =item PerlInterpMinSpare Min number of spare Perl interpreters =item PerlInterpMaxRequests Max number of requests per Perl interpreters =back