The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 1.01

  • removed undocumented auto-import of qw(OK DECLINED) use to short-cut Perl*Handlers and/or apache C handlers, use Apache::OK and Apache::DECLINED instead
  • start perl interpreter with -Mmod_perl so _every_ module no matter where it's loaded from will see $ENV{GATEWAY_INTERFACE} and $ENV{MOD_PERL} Thanks to Mark Dedlow for illustrating this need with Apache::DBI and friends.
  • <Perl> section %Hash values of hash refs now go through perl_handle_command_hv(), so `Location' can be inside %VirtualHost, etc. Thanks to Ask Hansen for spotting this.
  • <Perl> section %Hash values of array refs now go though perl_handle_command_av(), so proper action is used on TAKE1, etc.
  • if Tie::IxHash is available, tie <Perl> section %Hashes to it, so the apache config routines get info in the order it needs to. Thanks to Rob Hartill and Dean Gaudet for explaining this need for 1.3bx's new virtual host features
  • include the mod_perl logo image (mod_perl.gif)
  • ensure _all_ stacked handlers registered with $r->push_handlers() are cleared after each request to fix bug spotted by Peter Lister
  • test suite will now delete $ENV{HTTP_PROXY} before running, thanks to Frank Cringle
  • Apache::Registry args changes: -$_[0] is the blessed Apache request_rec -$_[1..-1] are args from Apache::Include::handler or elsewhere as suggested by Andreas
  • added tests for Apache::Include
  • applied Apache::Registry optimization patch from Andreas
  • Apache/Apache::Constants no longer ISA Exporter, just alias *import = \&Exporter::import
  • test suite re-org
  • write a mod_perl.pm so we can require a mod_perl min version and hooks/features ala use mod_perl 1.01; use mod_perl 1.01, qw(Authen Authz);
  • new Apache::RegistryLoader to pre-load Apache::Registry scripts
  • added Apache::Include->virtual($uri) method
  • 1.3b1 stuff: -cat apache_x.x.x/src/Makefile.config and src/modules/perl/Makefile together so we get $(INCLUDES) (for os/unix, etc)
  • applied patch from Salvador Ortiz Garcia so calling $r->args in an array context will not produce "Odd number of elements in hash list"
  • $r->auth_name can now be modified
  • remove Apache->send_cgi_header's broken internal re-direct handling spotted by Debby Fu
  • added Frank Cringle's mod_perl FAQ
  • added mod_perl_tuning.pod document from Vivek Khera <khera@kciLink.com>
  • fixed bug spotted by Brian Millett so stacked handlers work again with Apache-SSL
  • set environment variable `MOD_PERL' so scripts can say: if(exists $ENV{MOD_PERL}) { ...
  • added suggestion from Rob Hartill: 'PerlSetVar MaxModPerlRequestsPerChild 10' behaves like MaxRequestsPerChild, but counts mod_perl requests only. 1.3b1-dev+ is needed for this

Changes for version 1.00_03

  • save %SIG before perl_handler (Apache::Registry) is run, restore afterwards as suggested by Randal Schwartz
  • fixed virtual host/Apache::Registry bug introduced in _02, spotted by Ryan A. Whelan
  • a few win32 fixes:
  • skip uid,gid,etc., in perl_init_ids
  • fix ApacheModulePerl.dsp for source re-org
  • if PerlSendHeader is On, the environment variable PERL_SEND_HEADER is set to `On'

Changes for version 1.00_02

  • 1.3b1 stuff:
  • $r->warn and $r->log_error go through new aplog_error() function. If `LogLevel' is not set to `warn' or higher, $r->warn messages are ignored (not sent to error_log). (i.e. $r->warn == APLOG_WARNING, $r->log_error == APLOG_ERR)
  • always enable child_init/child_exit
    • use child_init for perl_init_ids()
    • use child_exit to: -run END blocks suspended at server startup -run perl_destruct(), now global objects will be DESTROYed
  • make sure mod_include can find modules/perl/mod_perl.h if PERL_SSI=1
  • fix INCDIR in src/modules/perl/Makefile
  • rename libmodperl -> libperl for new Configure changes
  • added PerlPostReadRequestHandler hook for new api phase
  • make Makefile.PL deal with source re-org
  • is_matchexp -> is_fnmatch (perl_config.c)
  • #undef die to resolve conflict spotted by Rob Hartill
  • applied Apache->read patch from Evert-Jan Couperus to use lvalue substr() instead of .=
  • Apache->seqno will no longer dig into scoreboard info for rec.my_access_count the seqno method was originally introduced for CGI.pm, which now uses $r->register_cleanup instead. It was never documented in Apache.pm, does anyone actually use Apache->seqno?
  • perl_section() will call perl_startup() if Perl's not running already, as suggested by Rob Hartill
  • included t/conf/httpd.conf.pl for testing <Perl>, which can replace t/conf/httpd.conf if you've configured with PERL_SECTIONS=1
  • removed undocumented Apache::Registry->push_cleanup method
  • various documentation updates
  • document END blocks behavior
  • added "Additional memory tips" section to mod_perl.pod
  • added mod_perl_traps document
  • Apache.pm docs patch from Gisle Aas
  • cgi_to_mod_perl.pod suggestions from Ben Laurie
  • other stuff here-n-there
  • applied patch from Ulrich Pfeifer so Makefile.PL does not eat args for MakeMaker, e.g. PREFIX=~
  • mod_perl now requires Perl version 5.004 or higher
  • hookup STDERR to error_log first chance we get (first Perl*Handler that's called)
  • $r->warn and $r->log_error will now join @_ and log one string instead of calling log_error foreach @_, suggested by Joel Wagner
  • PerlScript may now be relative to ServerRoot
  • remove UNIVERSAL::AUTOLOAD from Apache::Debug (more trouble than help!)
  • make sent_header variable per-directory instead of global
  • added $r->bytes_sent method suggested by Maurice Aubrey along with code from Nathan Torkington to make sure we get it right as mod_log_common does
  • added fix to Apache::Include from Randal Schwartz so $r->uri is properly reset
  • SetEnv PERL5LIB will now work on a per-directory basis thanks to spot by Vivek Khera
  • if PERL_SSI=1 only do `perl -MExtUtils::Embed -e ccopts` once instead of for every .c file! nudge from Rob.
  • applied Makefile.PL patch from Rob Hartill to prompt for most recently modified apache*/src directories first
  • now suspend all END blocks encountered during server startup and run them during server shutdown aka child_exit (need 1.3b1+)
  • now execute END blocks of PerlHandler (Apache::Registry) scripts at the expected time
  • make sure CGI.pm version 2.36 or higher is being used
  • make sure GATEWAY_INTERFACE is not cleared from %ENV so Apache::DBI/ApacheAuthenDBI work together, thanks to spot by John Groenveld
  • some source re-org: split stuff into perl_util.c and perlio.c, rename config.c -> perl_config.c, various cleanups
  • the constants.t test is now run under httpd with t/net/constants.pl
  • Apache::Constants not longer defines subs at startup. we now use a C AUTOLOAD which creates newSUBs when needed, without eval {} and without "prototype mismatch" errors. This shrunk my httpd image size by ~50K
  • according to Joel Wagner, Solaris's tar did not like the trailing / on the Apache/ argument to the tar_Apache target in Makefile. gone now.
  • thanks to help from Vern Hart, Apache::Registry will now include $r->server->server_name as part of the uri->perl package translation if $r->server->is_virtual
  • $0 is now set to $r->filename thanks to spot by Dylan Tynan
  • added auth.t test to the suite
  • moved constants/export.t to net/constants.t
  • $>, $<, $) and $( are now properly initialized, thanks to bug spot by James Freeman
  • applied Constants.{pm,xs} patch from Gisle Aas, adding some new constants from httpd.h, :methods import tag and some cleanups
  • applied Makefile.PL patch from Andreas Koenig adding verbosity if there's a problem with t/report
  • PerlNewSendHeader functionality has replaced PerlSendHeader's the `PerlNewSendHeader' directive is gone, replace with `PerlSendHeader'
  • fixed Apache::exit so it no longer calls C-level exit (unless exit code == -2), it now just terminates the perl callback, without producing an "Internal Server Error" therefor, we complete _all_ post-handler request phases and no longer dump core, as some have seen under certain conditions. the test suite nows tests calling exit()
  • applied patch from Brian Millett to Makefile, so SSL_CFLAGS are used with Ben-SSL

Documentation

using LWP::Simple and Benchmark.pm to benchmark mod_perl
benchmark mod_perl vs. CGI with File::CounterFile
First steps needed to use mod_perl as a CGI replacement
accessing the Apache API via mod_perl ($Date: 1997/10/16 23:21:47 $)
running CGI scripts under mod_perl ($Date: 1997/10/16 23:21:47 $)
frequently asked questions about mod_perl ($Date: 1997/10/16 23:21:47 $)
Embed a Perl interpreter in the Apache HTTP server
common/known mod_perl traps
mod_perl performance tuning

Modules

Perl interface to the Apache server API
Constants defined in httpd.h
Utilities for debugging embedded perl code
Utilities for mod_perl/mod_include integration
OPT_* defines from httpd_core.h
Run unaltered CGI scrips under mod_perl
Compile Apache::Registry scripts at server startup
Reload %INC files when updated on disk
Embedded interpreter status information
Install Apache mod_perl and related modules

Provides

in lib/Apache/Registry.pm
in lib/mod_perl.pm