move modperl 1.x tags to tags/
git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/branches/1.x-import@177906 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tags/v1_29/.cvsignore b/tags/v1_29/.cvsignore
deleted file mode 100644
index d494e43..0000000
--- a/tags/v1_29/.cvsignore
+++ /dev/null
@@ -1,33 +0,0 @@
-diff.txt
-status.txt
-Makefile
-pod2html-itemcache
-pod2html-dircache
-pm_to_blib
-blib
-lib/Apache/MyConfig.pm
-t/conf/httpd.conf
-t/conf/httpd.conf.old
-t/docs/blib.pl
-t/docs/subr/index.html
-t/docs/test.shtml
-t/httpd
-t/httpd.conf
-t/net/config.pl
-t/net/perl/cgi.pl
-t/report
-src/modules/perl/mod_perl_version.h
-lib/mod_perl.pm
-*.tar.gz
-src/Configuration
-t/docs/stacked
-t/docs/subr/index.html
-t/modules/ssi.t
-apaci/load_modules.pl
-t/httpd_conf
-t/perlsections.pl
-t/conf/LoadModule.conf
-t/docs/hooks.txt
-Log/Makefile
-Log/pm_to_blib
-apaci/find_source
diff --git a/tags/v1_29/.gdbinit b/tags/v1_29/.gdbinit
deleted file mode 100644
index 6b5776e..0000000
--- a/tags/v1_29/.gdbinit
+++ /dev/null
@@ -1,193 +0,0 @@
-#some handy debugging macros, hopefully you'll never need them
-#some don't quite work, like dump_hv and hv_fetch,
-#where's the bloody manpage for .gdbinit syntax?
-
-define thttpd
- run -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t
-# set $sv = perl_eval_pv("$Apache::ErrLog = '/tmp/mod_perl_error_log'",1)
-end
-
-define httpd
- run -X -d `pwd`
- set $sv = perl_eval_pv("$Apache::ErrLog = Apache->server_root_relative('logs/error_log')", 1)
- #printf "error_log = %s\n", ((XPV*) ($sv)->sv_any )->xpv_pv
-end
-
-define STpvx
- print ((XPV*) (PL_stack_base [ax + ($arg0)] )->sv_any )->xpv_pv
-end
-
-define TOPs
- print ((XPV*) (**sp)->sv_any )->xpv_pv
-end
-
-define curstash
- print ((XPVHV*) (PL_curstash)->sv_any)->xhv_name
-end
-
-define defstash
- print ((XPVHV*) (PL_defstash)->sv_any)->xhv_name
-end
-
-define curinfo
- printf "%d:%s\n", PL_curcop->cop_line, \
- ((XPV*)(*(XPVGV*)PL_curcop->cop_filegv->sv_any)\
- ->xgv_gp->gp_sv->sv_any)->xpv_pv
-end
-
-define SvPVX
-print ((XPV*) ($arg0)->sv_any )->xpv_pv
-end
-
-define SvCUR
- print ((XPV*) ($arg0)->sv_any )->xpv_cur
-end
-
-define SvLEN
- print ((XPV*) ($arg0)->sv_any )->xpv_len
-end
-
-define SvEND
- print (((XPV*) ($arg0)->sv_any )->xpv_pv + ((XPV*)($arg0)->sv_any )->xpv_cur) - 1
-end
-
-define SvSTASH
- print ((XPVHV*)((XPVMG*)($arg0)->sv_any )->xmg_stash)->sv_any->xhv_name
-end
-
-define SvTAINTED
- print ((($arg0)->sv_flags & (0x00002000 |0x00004000 |0x00008000 )) && Perl_sv_tainted ($arg0))
-end
-
-define SvTRUE
- print ( !$arg0 ? 0 : (($arg0)->sv_flags & 0x00040000 ) ? ((PL_Xpv = (XPV*)($arg0)->sv_any ) && (*PL_Xpv ->xpv_pv > '0' || PL_Xpv ->xpv_cur > 1 || (PL_Xpv ->xpv_cur && *PL_Xpv ->xpv_pv != '0')) ? 1 : 0) : (($arg0)->sv_flags & 0x00010000 ) ? ((XPVIV*) ($arg0)->sv_any )->xiv_iv != 0 : (($arg0)->sv_flags & 0x00020000 ) ? ((XPVNV*)($arg0)->sv_any )->xnv_nv != 0.0 : Perl_sv_2bool ($arg0) )
-end
-
-define GvHV
- set $hv = (((((XPVGV*)($arg0)->sv_any ) ->xgv_gp) )->gp_hv)
-end
-
-define GvSV
- print ((XPV*) ((((XPVGV*)($arg0)->sv_any ) ->xgv_gp) ->gp_sv )->sv_any )->xpv_pv
-end
-
-define GvNAME
- print (((XPVGV*)($arg0)->sv_any ) ->xgv_name)
-end
-
-define GvFILEGV
- print ((XPV*) ((((XPVGV*)$arg0->filegv)->xgv_gp)->gp_sv)->sv_any)->xpv_pv
-end
-
-define CvNAME
- print ((XPVGV*)(((XPVCV*)($arg0)->sv_any)->xcv_gv)->sv_any)->xgv_name
-end
-
-define CvSTASH
- print ((XPVHV*)(((XPVGV*)(((XPVCV*)($arg0)->sv_any)->xcv_gv)->sv_any)->xgv_stash)->sv_any)->xhv_name
-end
-
-define CvDEPTH
- print ((XPVCV*)($arg0)->sv_any )->xcv_depth
-end
-
-define CvFILEGV
- print ((XPV*) ((((XPVGV*)((XPVCV*)($arg0)->sv_any )->xcv_filegv)->xgv_gp)->gp_sv)->sv_any)->xpv_pv
-end
-
-define SVOPpvx
- print ((XPV*) ( ((SVOP*)$arg0)->op_sv)->sv_any )->xpv_pv
-end
-
-define HvNAME
- print ((XPVHV*)$arg0->sv_any)->xhv_name
-end
-
-define HvKEYS
- print ((XPVHV*) ($arg0)->sv_any)->xhv_keys
-end
-
-define AvFILL
- print ((XPVAV*) ($arg0)->sv_any)->xav_fill
-end
-
-define dumpav
- set $n = ((XPVAV*) ($arg0)->sv_any)->xav_fill
- set $i = 0
- while $i <= $n
- set $sv = *Perl_av_fetch($arg0, $i, 0)
- printf "[%u] -> `%s'\n", $i, ((XPV*) ($sv)->sv_any )->xpv_pv
- set $i = $i + 1
- end
-end
-
-define dumphv
- set $n = ((XPVHV*) ($arg0)->sv_any)->xhv_keys
- set $i = 0
- set $key = 0
- set $klen = 0
- Perl_hv_iterinit($arg0)
- while $i <= $n
- set $sv = Perl_hv_iternextsv($arg0, &$key, &$klen)
- printf "%s = `%s'\n", $key, ((XPV*) ($sv)->sv_any )->xpv_pv
- set $i = $i + 1
- end
-end
-
-define hvfetch
- set $klen = strlen($arg1)
- set $sv = *Perl_hv_fetch($arg0, $arg1, $klen, 0)
- printf "%s = `%s'\n", $arg1, ((XPV*) ($sv)->sv_any )->xpv_pv
-end
-
-define hvINCval
- set $hv = (((((XPVGV*)(PL_incgv)->sv_any)->xgv_gp))->gp_hv)
- set $klen = strlen($arg0)
- set $sv = *Perl_hv_fetch($hv, $arg0, $klen, 0)
- printf "%s = `%s'\n", $arg0, ((XPV*) ($sv)->sv_any )->xpv_pv
-end
-
-define dumpany
- set $sv = Perl_newSVpv("use Data::Dumper; Dumper \\",0)
- set $void = Perl_sv_catpv($sv, $arg0)
- set $dump = perl_eval_pv(((XPV*) ($sv)->sv_any )->xpv_pv, 1)
- printf "%s = `%s'\n", $arg0, ((XPV*) ($dump)->sv_any )->xpv_pv
-end
-
-define dumpanyrv
- set $rv = Perl_newRV((SV*)$arg0)
- set $rvpv = perl_get_sv("main::DumpAnyRv", 1)
- set $void = Perl_sv_setsv($rvpv, $rv)
- set $sv = perl_eval_pv("use Data::Dumper; Dumper $::DumpAnyRv",1)
- printf "`%s'\n", ((XPV*) ($sv)->sv_any )->xpv_pv
-end
-
-define svpeek
- set $pv = Perl_sv_peek((SV*)$arg0)
- printf "%s\n", $pv
-end
-
-define caller
- set $sv = perl_eval_pv("scalar caller", 1)
- printf "caller = %s\n", ((XPV*) ($sv)->sv_any )->xpv_pv
-end
-
-define cluck
- set $sv = perl_eval_pv("Carp::cluck(); `tail '$Apache::ErrLog'`", 1)
- printf "%s\n", ((XPV*) ($sv)->sv_any )->xpv_pv
-end
-
-define longmess
- set $sv = perl_eval_pv("Carp::longmess()", 1)
- printf "%s\n", ((XPV*) ($sv)->sv_any )->xpv_pv
-end
-
-define shortmess
- set $sv = perl_eval_pv("Carp::shortmess()", 1)
- printf "%s\n", ((XPV*) ($sv)->sv_any )->xpv_pv
-end
-
-define perl_get_sv
- set $sv = perl_get_sv($arg0, 0)
- printf "%s\n", $sv ? ((XPV*) ((SV*)$sv)->sv_any)->xpv_pv : "undef"
-end
\ No newline at end of file
diff --git a/tags/v1_29/Apache/.cvsignore b/tags/v1_29/Apache/.cvsignore
deleted file mode 100644
index c58b391..0000000
--- a/tags/v1_29/Apache/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-pm_to_blib
diff --git a/tags/v1_29/Apache/Apache.pm b/tags/v1_29/Apache/Apache.pm
deleted file mode 100644
index 70ac25a..0000000
--- a/tags/v1_29/Apache/Apache.pm
+++ /dev/null
@@ -1,1270 +0,0 @@
-package Apache;
-
-use strict;
-use mod_perl 1.17_01;
-use Exporter ();
-use Apache::Constants qw(OK DECLINED);
-use Apache::Connection ();
-use Apache::Server ();
-
-eval { require Apache::Table; };
-
-@Apache::EXPORT_OK = qw(exit warn);
-
-*import = \&Exporter::import;
-
-if (caller eq "CGI::Apache") {
- #we must die here outside of httpd so CGI::Switch works
- die unless $ENV{MOD_PERL};
-}
-
-{
- no strict;
- $VERSION = "1.27";
- __PACKAGE__->mod_perl::boot($VERSION);
-}
-
-BEGIN {
- *Apache::ReadConfig:: = \%ApacheReadConfig::;
-}
-
-sub httpd_conf {
- shift;
- no strict 'refs';
- #use a symbolic reference so %Apache::ReadConfig::
- #is empty at compile time
- push @{"Apache::ReadConfig::PerlConfig"},
- map "$_\n", @_;
-}
-
-sub parse_args {
- my($wantarray,$string) = @_;
- return unless defined $string and $string;
- if(defined $wantarray and $wantarray) {
- return map { Apache::unescape_url_info($_) } split /[=&;]/, $string, -1;
- }
- $string;
-}
-
-sub content {
- my($r) = @_;
- my $ct = $r->header_in("Content-type") || "";
- return unless $ct =~ m!^application/x-www-form-urlencoded!;
- my $buff;
- $r->read($buff, $r->header_in("Content-length"));
- return $buff unless wantarray;
- parse_args(1, $buff);
-}
-
-sub args {
- my($r, $val) = @_;
- my $args = @_ > 1 ? $r->query_string($val) : $r->query_string;
- return $args unless wantarray;
- parse_args(1, $args);
-}
-
-*READ = \&read unless defined &READ;
-
-sub read {
- my($r, $bufsiz, $offset) = @_[0,2,3];
- my($nrd, $buf, $total);
- $nrd = $total = 0;
- $buf = "";
- $_[1] = "" unless $offset;
-
- $r->soft_timeout("Apache->read");
-
- while($bufsiz) {
- $nrd = $r->read_client_block($buf, $bufsiz) || 0;
- if(defined $nrd and $nrd > 0) {
- $bufsiz -= $nrd;
- if ($offset) {
- substr($_[1], $offset) .= $buf;
- #$_[1] .= $buf;
- }
- else {
- $_[1] .= $buf;
- }
- $total += $nrd;
- next if $bufsiz;
- last;
- }
- else {
- $_[1] = undef;
- last;
- }
- }
- $r->kill_timeout;
- return $total;
-}
-
-sub new_read {
- my($r, $bufsiz) = @_[0,2];
- my($nrd, $buf, $total);
- $nrd = $total = 0;
- $buf = "";
- $_[1] ||= "";
-
- if(my $rv = $r->setup_client_block) {
- $r->log_error("Apache->read: setup_client_block returned $rv");
- die $rv;
- }
-
- #XXX: must set r->read_length to 0 here,
- #since this read() method may be called in loop
- #in which case, the second time in, should_client_block()
- #thinks we've already read the request body and returns 0
- $r->read_length(0);
-
- unless($r->should_client_block) {
- my $rl = $r->read_length;
- $r->log_error("Apache->read: should_client_block returned 0 (rl=$rl)");
- return 0;
- }
-
- $r->soft_timeout("Apache->read");
-
- while($bufsiz) {
- $nrd = $r->get_client_block($buf, $bufsiz) || 0;
- if(defined $nrd and $nrd > 0) {
- $bufsiz -= $nrd;
- $_[1] .= $buf;
- #substr($_[1], $total, $nrd) = $buf;
- $total += $nrd;
- $r->reset_timeout;
- next if $bufsiz;
- last;
- }
- else {
- $_[1] = undef;
- last;
- }
- }
- $r->kill_timeout;
- return $total;
-}
-
-sub GETC { my $c; shift->READ($c,1); $c; }
-
-#shouldn't use <STDIN> anyhow, but we'll be nice
-sub READLINE {
- my $r = shift;
- my $line;
- $r->read($line, $r->header_in('Content-length'));
- $line;
-}
-
-sub PRINTF {
- my $r = shift;
- my $fmt = shift;
- $r->print(sprintf($fmt, @_));
-}
-*printf = \&PRINTF;
-
-sub send_cgi_header {
- my($r, $headers) = @_;
- my $dlm = "\015?\012"; #a bit borrowed from LWP::UserAgent
- my($key, $val);
- local $_;
- while(($_, $headers) = split /$dlm/, $headers, 2) {
- #warn "hunk=`$_'\n";
- #warn "rest=`$headers'\n";
- if ($_ && /^(\S+?):\s*(.*)$/) {
- ($key, $val) = ($1, $2);
- last unless $key;
- $r->cgi_header_out($key, $val);
- }
- else {
- #warn "mod_perl: found header terminator\n";
- my $not_sent = 0;
- if($Apache::__SendHeader) {
- $not_sent = not $r->sent_header;
- }
- else {
- $not_sent = 1;
- }
- if ($not_sent) {
- $r->send_http_header;
- $r->sent_header(-2);
- }
- $r->print($headers); #send rest of buffer, without stripping newlines!!!
- last;
- }
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache - Perl interface to the Apache server API
-
-=head1 SYNOPSIS
-
- use Apache ();
-
-=head1 DESCRIPTION
-
-This module provides a Perl interface the Apache API. It is here
-mainly for B<mod_perl>, but may be used for other Apache modules that
-wish to embed a Perl interpreter. We suggest that you also consult
-the description of the Apache C API at http://www.apache.org/docs/.
-
-=head1 THE REQUEST OBJECT
-
-The request object holds all the information that the server needs to
-service a request. Apache B<Perl*Handler>s will be given a reference to the
-request object as parameter and may choose to update or use it in various
-ways. Most of the methods described below obtain information from or
-update the request object.
-The perl version of the request object will be blessed into the B<Apache>
-package, it is really a C<request_rec*> in disguise.
-
-=over 4
-
-=item Apache-E<gt>request([$r])
-
-The Apache-E<gt>request method will return a reference to the request object.
-
-B<Perl*Handler>s can obtain a reference to the request object when it
-is passed to them via C<@_>. However, scripts that run under
-B<Apache::Registry>, for example, need a way to access the request object.
-B<Apache::Registry> will make a request object available to these scripts
-by passing an object reference to C<Apache-E<gt>request($r)>.
-If handlers use modules such as B<CGI::Apache> that need to access
-C<Apache-E<gt>request>, they too should do this (e.g. B<Apache::Status>).
-
-=item $r-E<gt>as_string
-
-Returns a string representation of the request object. Mainly useful
-for debugging.
-
-=item $r-E<gt>main
-
-If the current request is a sub-request, this method returns a blessed
-reference to the main request structure. If the current request is
-the main request, then this method returns C<undef>.
-
-=item $r-E<gt>prev
-
-This method returns a blessed reference to the previous (internal) request
-structure or C<undef> if there is no previous request.
-
-=item $r-E<gt>next
-
-This method returns a blessed reference to the next (internal) request
-structure or C<undef> if there is no next request.
-
-=item $r-E<gt>last
-
-This method returns a blessed reference to the last (internal) request
-structure. Handy for logging modules.
-
-=item $r-E<gt>is_main
-
-Returns true if the current request object is for the main request.
-(Should give the same result as C<!$r-E<gt>main>, but will be more efficient.)
-
-=item $r-E<gt>is_initial_req
-
-Returns true if the current request is the first internal request,
-returns false if the request is a sub-request or internal redirect.
-
-=item $r-E<gt>allowed($bitmask)
-
-Get or set the allowed methods bitmask. This allowed bitmask should be
-set whenever a 405 (method not allowed) or 501 (method not implemented)
-answer is returned. The bit corresponding to the method number should be
-et.
-
- unless ($r->method_number == M_GET) {
- $r->allowed($r->allowed | (1<<M_GET) | (1<<M_HEAD) | (1<<M_OPTIONS));
- return HTTP_METHOD_NOT_ALLOWED;
- }
-
-=back
-
-=head1 SUB REQUESTS
-
-Apache provides a sub-request mechanism to lookup a uri or filename,
-performing all access checks, etc., without actually running the
-response phase of the given request. Notice, we have dropped the
-C<sub_req_> prefix here. The C<request_rec*> returned by the lookup
-methods is blessed into the B<Apache::SubRequest> class. This way,
-C<destroy_sub_request()> is called automatically during
-C<Apache::SubRequest-E<gt>DESTROY> when the object goes out of scope. The
-B<Apache::SubRequest> class inherits all the methods from the
-B<Apache> class.
-
-=over 4
-
-=item $r-E<gt>lookup_uri($uri)
-
- my $subr = $r->lookup_uri($uri);
- my $filename = $subr->filename;
-
- unless(-e $filename) {
- warn "can't stat $filename!\n";
- }
-
-=item $r-E<gt>lookup_file($filename)
-
- my $subr = $r->lookup_file($filename);
-
-=item $subr-E<gt>run
-
- if($subr->run != OK) {
- $subr->log_error("something went wrong!");
- }
-
-=back
-
-=head1 CLIENT REQUEST PARAMETERS
-
-In this section we will take a look at various methods that can be used to
-retrieve the request parameters sent from the client.
-In the following examples, B<$r> is a request object blessed into the
-B<Apache> class, obtained by the first parameter passed to a handler subroutine
-or I<Apache-E<gt>request>
-
-=over 4
-
-=item $r-E<gt>method( [$meth] )
-
-The $r-E<gt>method method will return the request method. It will be a
-string such as "GET", "HEAD" or "POST".
-Passing an argument will set the method, mainly used for internal redirects.
-
-=item $r-E<gt>method_number( [$num] )
-
-The $r-E<gt>method_number method will return the request method number.
-The method numbers are defined by the M_GET, M_POST,... constants
-available from the B<Apache::Constants> module. Passing an argument
-will set the method_number, mainly used for internal redirects and
-testing authorization restriction masks.
-
-=item $r-E<gt>bytes_sent
-
-The number of bytes sent to the client, handy for logging, etc.
-
-=item $r-E<gt>the_request
-
-The request line sent by the client, handy for logging, etc.
-
-=item $r-E<gt>proxyreq
-
-Returns true if the request is proxy http.
-Mainly used during the filename translation stage of the request,
-which may be handled by a C<PerlTransHandler>.
-
-=item $r-E<gt>header_only
-
-Returns true if the client is asking for headers only,
-e.g. if the request method was B<HEAD>.
-
-=item $r-E<gt>protocol
-
-The $r-E<gt>protocol method will return a string identifying the protocol
-that the client speaks. Typical values will be "HTTP/1.0" or
-"HTTP/1.1".
-
-=item $r-E<gt>hostname
-
-Returns the server host name, as set by full URI or Host: header.
-
-=item $r-E<gt>request_time
-
-Returns the time that the request was made. The time is the local unix
-time in seconds since the epoch.
-
-=item $r-E<gt>uri( [$uri] )
-
-The $r-E<gt>uri method will return the requested URI minus optional query
-string, optionally changing it with the first argument.
-
-=item $r-E<gt>filename( [$filename] )
-
-The $r-E<gt>filename method will return the result of the I<URI --E<gt>
-filename> translation, optionally changing it with the first argument
-if you happen to be doing the translation.
-
-=item $r-E<gt>location
-
-The $r-E<gt>location method will return the path of the
-E<lt>LocationE<gt> section from which the current C<Perl*Handler> is
-being called.
-
-=item $r-E<gt>path_info( [$path_info] )
-
-The $r-E<gt>path_info method will return what is left in the path after the
-I<URI --E<gt> filename> translation, optionally changing it with the first
-argument if you happen to be doing the translation.
-
-=item $r-E<gt>args( [$query_string] )
-
-The $r-E<gt>args method will return the contents of the URI I<query
-string>. When called in a scalar context, the entire string is
-returned. When called in a list context, a list of parsed I<key> =E<gt>
-I<value> pairs are returned, i.e. it can be used like this:
-
- $query = $r->args;
- %in = $r->args;
-
-$r-E<gt>args can also be used to set the I<query string>. This can be useful
-when redirecting a POST request.
-
-=item $r-E<gt>headers_in
-
-The $r-E<gt>headers_in method will return a %hash of client request
-headers. This can be used to initialize a perl hash, or one could use
-the $r-E<gt>header_in() method (described below) to retrieve a specific
-header value directly.
-
-Will return a I<HASH> reference blessed into the I<Apache::Table>
-class when called in a scalar context with no "key" argument. This
-requires I<Apache::Table>.
-
-=item $r-E<gt>header_in( $header_name, [$value] )
-
-Return the value of a client header. Can be used like this:
-
- $ct = $r->header_in("Content-type");
- $r->header_in($key, $val); #set the value of header '$key'
-
-=item $r-E<gt>content
-
-The $r-E<gt>content method will return the entity body read from the
-client, but only if the request content type is
-C<application/x-www-form-urlencoded>.
-When called in a scalar context, the entire string is
-returned. When called in a list context, a list of parsed I<key> =E<gt>
-I<value> pairs are returned. *NOTE*: you can only ask for this once,
-as the entire body is read from the client.
-
-=item $r-E<gt>read($buf, $bytes_to_read, [$offset])
-
-This method is used to read data from the client,
-looping until it gets all of C<$bytes_to_read> or a timeout happens.
-
-An offset may be specified to place the read data at some other place
-than the beginning of the string.
-
-In addition, this method sets a timeout before reading with
-C<$r-E<gt>soft_timeout>.
-
-=item $r-E<gt>get_remote_host
-
-Lookup the client's DNS hostname. If the configuration directive
-B<HostNameLookups> is set to off, this returns the dotted decimal
-representation of the client's IP address instead. Might return
-I<undef> if the hostname is not known.
-
-=item $r-E<gt>get_remote_logname
-
-Lookup the remote user's system name. Might return I<undef> if the
-remote system is not running an RFC 1413 server or if the configuration
-directive B<IdentityCheck> is not turned on.
-
-=back
-
-More information about the client can be obtained from the
-B<Apache::Connection> object, as described below.
-
-=over 4
-
-=item $c = $r-E<gt>connection
-
-The $r-E<gt>connection method will return a reference to the request
-connection object (blessed into the B<Apache::Connection> package).
-This is really a C<conn_rec*> in disguise. The following methods can
-be used on the connection object:
-
-=over 4
-
-=item $c-E<gt>remote_host
-
-If the configuration directive B<HostNameLookups> is set to on: then
-the first time C<$r-E<gt>get_remote_host> is called the server does a DNS
-lookup to get the remote client's host name. The result is cached in
-C<$c-E<gt>remote_host> then returned. If the server was unable to resolve
-the remote client's host name this will be set to "". Subsequent calls
-to C<$r-E<gt>get_remote_host> return this cached value.
-
-If the configuration directive B<HostNameLookups> is set to off: calls
-to C<$r-E<gt>get_remote_host> return a string that contains the dotted
-decimal representation of the remote client's IP address. However this
-string is not cached, and C<$c-E<gt>remote_host> is undefined. So, it's
-best to to call C<$r-E<gt>get_remote_host> instead of directly accessing
-this variable.
-
-=item $c-E<gt>remote_ip
-
-The dotted decimal representation of the remote client's IP address.
-This is set by the server when the connection record is created so
-is always defined.
-
-You can also set this value by providing an argument to it. This is
-helpful if your server is behind a squid accelerator proxy which adds
-a X-Forwarded-For header.
-
-=item $c-E<gt>local_addr
-
-A packed SOCKADDR_IN in the same format as returned by
-L<Socket/pack_sockaddr_in>, containing the port and address on the
-local host that the remote client is connected to. This is set by
-the server when the connection record is created so it is always
-defined.
-
-=item $c-E<gt>remote_addr
-
-A packed SOCKADDR_IN in the same format as returned by
-L<Socket/pack_sockaddr_in>, containing the port and address on the
-remote host that the server is connected to. This is set by the
-server when the connection record is created so it is always defined.
-
-Among other things, this can be used, together with C<$c-E<gt>local_addr>, to
-perform RFC1413 ident lookups on the remote client even when the
-configuration directive B<IdentityCheck> is turned off.
-
-Can be used like:
-
- use Net::Ident qw (lookupFromInAddr);
- ...
- my $remoteuser = lookupFromInAddr ($c->local_addr,
- $c->remote_addr, 2);
-
-Note that the lookupFromInAddr interface does not currently exist in
-the B<Net::Ident> module, but the author is planning on adding it
-soon.
-
-=item $c-E<gt>remote_logname
-
-If the configuration directive B<IdentityCheck> is set to on: then the
-first time C<$r-E<gt>get_remote_logname> is called the server does an RFC
-1413 (ident) lookup to get the remote users system name. Generally for
-UNI* systems this is their login. The result is cached in C<$c-E<gt>remote_logname>
-then returned. Subsequent calls to C<$r-E<gt>get_remote_host> return the
-cached value.
-
-If the configuration directive B<IdentityCheck> is set to off: then
-C<$r-E<gt>get_remote_logname> does nothing and C<$c-E<gt>remote_logname> is
-always undefined.
-
-=item $c-E<gt>user( [$user] )
-
-If an authentication check was successful, the authentication handler
-caches the user name here. Sets the user name to the optional first
-argument.
-
-=item $c-E<gt>auth_type
-
-Returns the authentication scheme that successfully authenticate
-C<$c-E<gt>user>, if any.
-
-=item $c-E<gt>aborted
-
-Returns true if the client stopped talking to us.
-
-=item $c-E<gt>fileno( [$direction] )
-
-Returns the client file descriptor. If $direction is 0, the input fd
-is returned. If $direction is not null or ommitted, the output fd is
-returned.
-
-This can be used to detect client disconnect without doing any I/O,
-e.g. using IO::Select.
-
-=back
-
-=back
-
-=head1 SERVER CONFIGURATION INFORMATION
-
-The following methods are used to obtain information from server
-configuration and access control files.
-
-=over 4
-
-=item $r-E<gt>dir_config( $key )
-
-Returns the value of a per-directory variable specified by the
-C<PerlSetVar> directive.
-
- # <Location /foo/bar>
- # PerlSetVar Key Value
- # </Location>
-
- my $val = $r->dir_config('Key');
-
-Keys are case-insensitive.
-
-Will return a I<HASH> reference blessed into the
-I<Apache::Table> class when called in a scalar context with no
-"key" argument. See I<Apache::Table>.
-
-
-=item $r-E<gt>dir_config-E<gt>get( $key )
-
-Returns the value of a per-directory array variable specified by the
-C<PerlAddVar> directive.
-
- # <Location /foo/bar>
- # PerlAddVar Key Value1
- # PerlAddVar Key Value2
- # </Location>
-
- my @val = $r->dir_config->get('Key');
-
-Alternatively in your code you can extend the setting with:
-
- $r->dir_config->add(Key => 'Value3');
-
-Keys are case-insensitive.
-
-Will return a I<HASH> reference blessed into the
-I<Apache::Table> class when called in a scalar context with no
-"key" argument. See I<Apache::Table>.
-
-=item $r-E<gt>requires
-
-Returns an array reference of hash references, containing information
-related to the B<require> directive. This is normally used for access
-control, see L<Apache::AuthzAge> for an example.
-
-=item $r-E<gt>auth_type
-
-Returns a reference to the current value of the per directory
-configuration directive B<AuthType>. Normally this would be set to
-C<Basic> to use the basic authentication scheme defined in RFC 1945,
-I<Hypertext Transfer Protocol -- HTTP/1.0>. However, you could set to
-something else and implement your own authentication scheme.
-
-=item $r-E<gt>auth_name
-
-Returns a reference to the current value of the per directory
-configuration directive B<AuthName>. The AuthName directive creates
-protection realm within the server document space. To quote RFC 1945
-"These realms allow the protected resources on a server to be
-partitioned into a set of protection spaces, each with its own
-authentication scheme and/or authorization database." The client uses
-the root URL of the server to determine which authentication
-credentials to send with each HTTP request. These credentials are
-tagged with the name of the authentication realm that created them.
-Then during the authentication stage the server uses the current
-authentication realm, from C<$r-E<gt>auth_name>, to determine which set of
-credentials to authenticate.
-
-=item $r-E<gt>document_root( [$docroot] )
-
-When called with no argument, returns a reference to the current value
-of the per server configuration directive B<DocumentRoot>. To quote the
-Apache server documentation, "Unless matched by a directive like Alias,
-the server appends the path from the requested URL to the document root
-to make the path to the document." This same value is passed to CGI
-scripts in the C<DOCUMENT_ROOT> environment variable.
-
-You can also set this value by providing an argument to it. The following
-example dynamically sets the document root based on the request's
-"Host:" header:
-
- sub trans_handler
- {
- my $r = shift;
- my ($user) = ($r->header_in('Host') =~ /^[^\.]+/);
- $r->document_root("/home/$user/www");
- return DECLINED;
- }
-
- PerlTransHandler trans_handler
-
-=item $r-E<gt>server_root_relative( [$relative_path] )
-
-If called without any arguments, this method returns the value of the
-currently-configured C<ServerRoot> directory.
-
-If a single argument is passed, it concatenates it with the value of
-C<ServerRoot>. For example here is how to get the path to the
-I<error_log> file under the server root:
-
- my $error_log = $r->server_root_relative("logs/error_log");
-
-See also the next item.
-
-=item Apache-E<gt>server_root_relative( [$relative_path] )
-
-Same as the previous item, but this time it's used without a request
-object. This method is usually needed in a startup file. For example
-the following startup file modifies C<@INC> to add a local directory
-with perl modules located under the server root and after that loads a
-module from that directory.
-
- BEGIN {
- use Apache():
- use lib Apache->server_root_relative("lib/my_project");
- }
- use MyProject::Config ();
-
-=item $r-E<gt>allow_options
-
-The C<$r-E<gt>allow_options> method can be used for
-checking if it is OK to run a perl script. The B<Apache::Options>
-module provides the constants to check against.
-
- if(!($r->allow_options & OPT_EXECCGI)) {
- $r->log_reason("Options ExecCGI is off in this directory",
- $filename);
- }
-
-=item $r-E<gt>get_server_port
-
-Returns the port number on which the server is listening.
-
-=item $s = $r-E<gt>server
-
-Return a reference to the server info object (blessed into the
-B<Apache::Server> package). This is really a C<server_rec*> in
-disguise. The following methods can be used on the server object:
-
-=item $s = Apache-E<gt>server
-
-Same as above, but only available during server startup for use in
-C<E<lt>PerlE<gt>> sections, B<PerlRequire> or B<PerlModule>.
-
-=item $s-E<gt>server_admin
-
-Returns the mail address of the person responsible for this server.
-
-=item $s-E<gt>server_hostname
-
-Returns the hostname used by this server.
-
-=item $s-E<gt>port
-
-Returns the port that this servers listens too.
-
-=item $s-E<gt>is_virtual
-
-Returns true if this is a virtual server.
-
-=item $s-E<gt>names
-
-Returns the wild-carded names for ServerAlias servers.
-
-=item $s-E<gt>dir_config( $key )
-
-Alias for Apache::dir_config.
-
-=item $s-E<gt>warn
-
-Alias for Apache::warn.
-
-=item $s-E<gt>log_error
-
-Alias for Apache::log_error.
-
-=item $s-E<gt>uid
-
-Returns the numeric user id under which the server answers requests.
-This is the value of the User directive.
-
-=item $s-E<gt>gid
-
-Returns the numeric group id under which the server answers requests.
-This is the value of the Group directive.
-
-=item $s-E<gt>loglevel
-
-Get or set the value of the current LogLevel. This method is added by
-the Apache::Log module, which needs to be pulled in.
-
- use Apache::Log;
- print "LogLevel = ", $s->loglevel;
- $s->loglevel(Apache::Log::DEBUG);
-
-If using Perl 5.005+, the following constants are defined (but not
-exported):
-
- Apache::Log::EMERG
- Apache::Log::ALERT
- Apache::Log::CRIT
- Apache::Log::ERR
- Apache::Log::WARNING
- Apache::Log::NOTICE
- Apache::Log::INFO
- Apache::Log::DEBUG
-
-=item $r-E<gt>get_handlers( $hook )
-
-Returns a reference to a list of handlers enabled for $hook. $hook is
-a string representing the phase to handle. The returned list is a list
-of references to the handler subroutines.
-
- $list = $r->get_handlers( 'PerlHandler' );
-
-=item $r-E<gt>set_handlers( $hook, [\E<amp>handler, ... ] )
-
-Sets the list if handlers to be called for $hook. $hook is a string
-representing the phase to handle. The list of handlers is an anonymous
-array of code references to the handlers to install for this request
-phase. The special list C<[ \&OK ]> can be used to disable a
-particular phase.
-
- $r->set_handlers( PerlLogHandler => [ \&myhandler1, \&myhandler2 ] );
- $r->set_handlers( PerlAuthenHandler => [ \&OK ] );
-
-=item $r-E<gt>push_handlers( $hook, \E<amp>handler )
-
-Pushes a new handler to be called for C<$hook>. C<$hook> is a string
-representing the phase to handle. The handler is a reference to a
-subroutine to install for this request phase. This handler will be
-called before any configured handlers.
-
- $r->push_handlers( PerlHandler => \&footer);
-
-=item $r-E<gt>current_callback
-
-Returns the name of the handler currently being run. This method is most
-useful to PerlDispatchHandlers who wish to only take action for certain phases.
-
- if($r->current_callback eq "PerlLogHandler") {
- $r->warn("Logging request");
- }
-
-=back
-
-=head1 SETTING UP THE RESPONSE
-
-The following methods are used to set up and return the response back
-to the client. This typically involves setting up $r-E<gt>status(), the
-various content attributes and optionally some additional
-$r-E<gt>header_out() calls before calling $r-E<gt>send_http_header() which will
-actually send the headers to the client. After this a typical
-application will call the $r-E<gt>print() method to send the response
-content to the client.
-
-=over 4
-
-=item $r-E<gt>send_http_header( [$content_type] )
-
-Send the response line and all headers to the client.
-Takes an optional parameter indicating the content-type of the
-response, i.e. 'text/html'.
-
-This method will create headers from the $r-E<gt>content_xxx() and
-$r-E<gt>no_cache() attributes (described below) and then append the
-headers defined by $r-E<gt>header_out (or $r-E<gt>err_header_out if status
-indicates an error).
-
-=item $r-E<gt>get_basic_auth_pw
-
-If the current request is protected by Basic authentication, this
-method will return OK. Otherwise, it will return a value that
-ought to be propagated back to the client (typically AUTH_REQUIRED).
-The second return value will be the decoded password sent by the client.
-
- ($ret, $sent_pw) = $r->get_basic_auth_pw;
-
-=item $r-E<gt>note_basic_auth_failure
-
-Prior to requiring Basic authentication from the client, this method
-will set the outgoing HTTP headers asking the client to authenticate
-for the realm defined by the configuration directive C<AuthName>.
-
-=item $r-E<gt>handler( [$meth] )
-
-Set the handler for a request.
-Normally set by the configuration directive C<AddHandler>.
-
- $r->handler( "perl-script" );
-
-=item $r-E<gt>notes( $key, [$value] )
-
-Return the value of a named entry in the Apache C<notes> table, or
-optionally set the value of a named entry. This table is used by Apache
-modules to pass messages amongst themselves. Generally if you are
-writing handlers in mod_perl you can use Perl variables for this.
-
- $r->notes("MY_HANDLER" => OK);
- $val = $r->notes("MY_HANDLER");
-
-Will return a I<HASH> reference blessed into the I<Apache::Table>
-class when called in a scalar context with no "key" argument. This
-requires I<Apache::Table>.
-
-=item $r-E<gt>pnotes( $key, [$value] )
-
-Like $r-E<gt>notes, but takes any scalar as an value.
-
- $r->pnotes("MY_HANDLER" => [qw(one two)]);
- my $val = $r->pnotes("MY_HANDLER");
- print $val->[0]; # prints "one"
-
-Advantage over just using a Perl variable is that $r-E<gt>pnotes gets
-cleaned up after every request.
-
-=item $r-E<gt>subprocess_env( $key, [$value] )
-
-Return the value of a named entry in the Apache C<subprocess_env>
-table, or optionally set the value of a named entry. This table is
-used by mod_include. By setting some custom variables inside
-a perl handler it is possible to combine perl with mod_include nicely.
-If you say, e.g. in a PerlHeaderParserHandler
-
- $r->subprocess_env(MyLanguage => "de");
-
-you can then write in your .shtml document:
-
- <!--#if expr="$MyLanguage = en" -->
- English
- <!--#elif expr="$MyLanguage = de" -->
- Deutsch
- <!--#else -->
- Sorry
- <!--#endif -->
-
-Will return a I<HASH> reference blessed into the I<Apache::Table>
-class when called in a scalar context with no "key" argument. This
-requires I<Apache::Table>.
-
-=item $r-E<gt>content_type( [$newval] )
-
-Get or set the content type being sent to the client. Content types
-are strings like "text/plain", "text/html" or "image/gif". This
-corresponds to the "Content-Type" header in the HTTP protocol. Example
-of usage is:
-
- $previous_type = $r->content_type;
- $r->content_type("text/plain");
-
-=item $r-E<gt>content_encoding( [$newval] )
-
-Get or set the content encoding. Content encodings are string like
-"gzip" or "compress". This correspond to the "Content-Encoding"
-header in the HTTP protocol.
-
-=item $r-E<gt>content_languages( [$array_ref] )
-
-Get or set the content languages. The content language corresponds to the
-"Content-Language" HTTP header and is an array reference containing strings
-such as "en" or "no".
-
-=item $r-E<gt>status( $integer )
-
-Get or set the reply status for the client request. The
-B<Apache::Constants> module provide mnemonic names for the status codes.
-
-=item $r-E<gt>status_line( $string )
-
-Get or set the response status line. The status line is a string like
-"200 Document follows" and it will take precedence over the value specified
-using the $r-E<gt>status() described above.
-
-
-=item $r-E<gt>headers_out
-
-The $r-E<gt>headers_out method will return a %hash of server response
-headers. This can be used to initialize a perl hash, or one could use
-the $r-E<gt>header_out() method (described below) to retrieve or set a specific
-header value directly.
-
-Will return a I<HASH> reference blessed into the I<Apache::Table>
-class when called in a scalar context with no "key" argument. This
-requires I<Apache::Table>.
-
-=item $r-E<gt>header_out( $header, $value )
-
-Change the value of a response header, or create a new one. You
-should not define any "Content-XXX" headers by calling this method,
-because these headers use their own specific methods. Example of use:
-
- $r->header_out("WWW-Authenticate" => "Basic");
- $val = $r->header_out($key);
-
-=item $r-E<gt>err_headers_out
-
-The $r-E<gt>err_headers_out method will return a %hash of server response
-headers. This can be used to initialize a perl hash, or one could use
-the $r-E<gt>err_header_out() method (described below) to retrieve or set a specific
-header value directly.
-
-The difference between headers_out and err_headers_out is that the
-latter are printed even on error, and persist across internal redirects
-(so the headers printed for ErrorDocument handlers will have them).
-
-Will return a I<HASH> reference blessed into the I<Apache::Table>
-class when called in a scalar context with no "key" argument. This
-requires I<Apache::Table>.
-
-=item $r-E<gt>err_header_out( $header, [$value] )
-
-Change the value of an error response header, or create a new one.
-These headers are used if the status indicates an error.
-
- $r->err_header_out("Warning" => "Bad luck");
- $val = $r->err_header_out($key);
-
-=item $r-E<gt>no_cache( $boolean )
-
-This is a flag that indicates that the data being returned is volatile
-and the client should be told not to cache it. C<$r-E<gt>no_cache(1)>
-adds the headers "Pragma: no-cache" and "Cache-control: no-cache" to
-the reponse, therefore it must be called before C<$r-E<gt>send_http_header>.
-
-=item $r-E<gt>print( @list )
-
-This method sends data to the client with C<$r-E<gt>write_client>, but first
-sets a timeout before sending with C<$r-E<gt>soft_timeout>. This method is
-called instead of CORE::print when you use print() in your mod_perl programs.
-
-This method treats scalar references specially. If an item in @list is a
-scalar reference, it will be dereferenced before printing. This is a
-performance optimization which prevents unneeded copying of large strings,
-and it is subtly different from Perl's standard print() behavior.
-
-Example:
-
- $foo = \"bar"; print($foo);
-
-The result is "bar", not the "SCALAR(0xDEADBEEF)" you might have expected. If
-you really want the reference to be printed out, force it into a scalar
-context by using C<print(scalar($foo))>.
-
-=item $r-E<gt>send_fd( $filehandle )
-
-Send the contents of a file to the client. Can for instance be used
-like this:
-
- open(FILE, $r->filename) || return 404;
- $r->send_fd(FILE);
- close(FILE);
-
-=item $r-E<gt>internal_redirect( $newplace )
-
-Redirect to a location in the server namespace without
-telling the client. For instance:
-
- $r->internal_redirect("/home/sweet/home.html");
-
-=item $r-E<gt>internal_redirect_handler( $newplace )
-
-Same as I<internal_redirect>, but the I<handler> from C<$r> is preserved.
-
-=item $r-E<gt>custom_response($code, $uri)
-
-This method provides a hook into the B<ErrorDocument> mechanism,
-allowing you to configure a custom response for a given response
-code at request-time.
-
-Example:
-
- use Apache::Constants ':common';
-
- sub handler {
- my($r) = @_;
-
- if($things_are_ok) {
- return OK;
- }
-
- #<Location $r->uri>
- #ErrorDocument 401 /error.html
- #</Location>
-
- $r->custom_response(AUTH_REQUIRED, "/error.html");
-
- #can send a string too
- #<Location $r->uri>
- #ErrorDocument 401 "sorry, go away"
- #</Location>
-
- #$r->custom_response(AUTH_REQUIRED, "sorry, go away");
-
- return AUTH_REQUIRED;
- }
-
-=back
-
-=head1 SERVER CORE FUNCTIONS
-
-=over 4
-
-=item $r-E<gt>soft_timeout($message)
-
-=item $r-E<gt>hard_timeout($message)
-
-=item $r-E<gt>kill_timeout
-
-=item $r-E<gt>reset_timeout
-
-(Documentation borrowed from http_main.h)
-
-There are two functions which modules can call to trigger a timeout
-(with the per-virtual-server timeout duration); these are hard_timeout
-and soft_timeout.
-
-The difference between the two is what happens when the timeout
-expires (or earlier than that, if the client connection aborts) ---
-a soft_timeout just puts the connection to the client in an
-"aborted" state, which will cause http_protocol.c to stop trying to
-talk to the client, but otherwise allows the code to continue normally.
-hard_timeout(), by contrast, logs the request, and then aborts it
-completely --- longjmp()ing out to the accept() loop in http_main.
-Any resources tied into the request resource pool will be cleaned up;
-everything that is not will leak.
-
-soft_timeout() is recommended as a general rule, because it gives your
-code a chance to clean up. However, hard_timeout() may be the most
-convenient way of dealing with timeouts waiting for some external
-resource other than the client, if you can live with the restrictions.
-
-When a hard timeout is in scope, critical sections can be guarded
-with block_alarms() and unblock_alarms() --- these are declared in
-alloc.c because they are most often used in conjunction with
-routines to allocate something or other, to make sure that the
-cleanup does get registered before any alarm is allowed to happen
-which might require it to be cleaned up; they * are, however,
-implemented in http_main.c.
-
-kill_timeout() will disarm either variety of timeout.
-
-reset_timeout() resets the timeout in progress.
-
-=item $r-E<gt>post_connection($code_ref)
-
-=item $r-E<gt>register_cleanup($code_ref)
-
-Register a cleanup function which is called just before $r-E<gt>pool is
-destroyed.
-
- $r->register_cleanup(sub {
- my $r = shift;
- warn "registered cleanup called for ", $r->uri, "\n";
- });
-
-Cleanup functions registered in the parent process (before forking)
-will run once when the server is shut down:
-
- #PerlRequire startup.pl
- warn "parent pid is $$\n";
- Apache->server->register_cleanup(sub { warn "server cleanup in $$\n"});
-
-The I<post_connection> method is simply an alias for I<register_cleanup>,
-as this method may be used to run code after the client connection is closed,
-which may not be a I<cleanup>.
-
-=back
-
-=head1 CGI SUPPORT
-
-We also provide some methods that make it easier to support the CGI
-type of interface.
-
-=over 4
-
-=item $r-E<gt>send_cgi_header()
-
-Take action on certain headers including I<Status:>, I<Location:> and
-I<Content-type:> just as mod_cgi does, then calls
-$r-E<gt>send_http_header(). Example of use:
-
- $r->send_cgi_header(<<EOT);
- Location: /foo/bar
- Content-type: text/html
-
- EOT
-
-=back
-
-=head1 ERROR LOGGING
-
-The following methods can be used to log errors.
-
-=over 4
-
-=item $r-E<gt>log_reason($message, $file)
-
-The request failed, why?? Write a message to the server errorlog.
-
- $r->log_reason("Because I felt like it", $r->filename);
-
-=item $r-E<gt>log_error($message)
-
-Uh, oh. Write a message to the server errorlog.
-
- $r->log_error("Some text that goes in the error_log");
-
-=item $r-E<gt>warn($message)
-
-For pre-1.3 versions of apache, this is just an alias for
-C<log_error>. With 1.3+ versions of apache, this message will only be
-send to the error_log if B<LogLevel> is set to B<warn> or higher.
-
-=back
-
-=head1 UTILITY FUNCTIONS
-
-=over 4
-
-=item Apache::unescape_url($string)
-
- $unescaped_url = Apache::unescape_url($string)
-
-Handy function for unescapes. Use this one for
-filenames/paths. Notice that the original C<$string> is mangled in the
-process (because the string part of PV shrinks, but the variable is
-not updated, to speed things up).
-
-Use unescape_url_info for the result of submitted form data.
-
-=item Apache::unescape_url_info($string)
-
-Handy function for unescapes submitted form data.
-In opposite to unescape_url it translates the plus sign to space.
-
-=item Apache::perl_hook($hook)
-
-Returns true if the specified callback hook is enabled:
-
- for (qw(Access Authen Authz ChildInit Cleanup Fixup
- HeaderParser Init Log Trans Type))
- {
- print "$_ hook enabled\n" if Apache::perl_hook($_);
- }
-
-=back
-
-=head1 GLOBAL VARIABLES
-
-=over 4
-
-=item $Apache::Server::Starting
-
-Set to true when the server is starting.
-
-=item $Apache::Server::ReStarting
-
-Set to true when the server is starting.
-
-=back
-
-=head1 SEE ALSO
-
-perl(1),
-Apache::Constants(3),
-Apache::Registry(3),
-Apache::Debug(3),
-Apache::Options(3),
-CGI::Apache(3)
-
-Apache C API notes at C<http://www.apache.org/docs/>
-
-=head1 AUTHORS
-
-Perl interface to the Apache C API written by Doug MacEachern
-with contributions from Gisle Aas, Andreas Koenig, Eric Bartley,
-Rob Hartill, Gerald Richter, Salvador Ortiz and others.
-
-=cut
-
diff --git a/tags/v1_29/Apache/Makefile.PL b/tags/v1_29/Apache/Makefile.PL
deleted file mode 100644
index 0ff7746..0000000
--- a/tags/v1_29/Apache/Makefile.PL
+++ /dev/null
@@ -1,13 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- NAME => "Apache",
- VERSION_FROM => "Apache.pm",
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
-
diff --git a/tags/v1_29/Apache/typemap b/tags/v1_29/Apache/typemap
deleted file mode 100644
index 569e401..0000000
--- a/tags/v1_29/Apache/typemap
+++ /dev/null
@@ -1,144 +0,0 @@
-TYPEMAP
-Apache T_APACHEOBJ
-Apache::CmdParms T_PTROBJ
-Apache::SubRequest T_PTROBJ
-Apache::Connection T_PTROBJ
-Apache::Server T_PTROBJ
-Apache::ModuleConfig T_PTROBJ
-Apache::Module T_PTROBJ
-Apache::Handler T_PTROBJ
-Apache::Command T_PTROBJ
-Apache::Table T_TABLEOBJ
-Apache::table T_PTROBJ
-pid_t T_IV
-uid_t T_IV
-gid_t T_IV
-Apache::Scoreboard O_HvRV
-Apache::URI T_PTROBJ
-STRLEN T_UV
-
-# "perlobject.map" Dean Roehrich, version 19960302
-#
-# TYPEMAPs
-#
-# HV * -> unblessed Perl HV object.
-# AV * -> unblessed Perl AV object.
-#
-# INPUT/OUTPUT maps
-#
-# O_* -> opaque blessed objects
-# T_* -> opaque blessed or unblessed objects
-#
-# O_OBJECT -> link an opaque C or C++ object to a blessed Perl object.
-# T_OBJECT -> link an opaque C or C++ object to an unblessed Perl object.
-# O_HvRV -> a blessed Perl HV object.
-# T_HvRV -> an unblessed Perl HV object.
-# O_AvRV -> a blessed Perl AV object.
-# T_AvRV -> an unblessed Perl AV object.
-
-#TYPEMAP
-
-HV * T_HvRV
-AV * T_AvRV
-const char * T_PV
-
-######################################################################
-OUTPUT
-
-T_APACHEOBJ
- sv_setref_pv($arg, \"${ntype}\", (void*)$var);
-
-T_TABLEOBJ
- sv_setref_pv($arg, \"${ntype}\", (void*)$var);
-
-T_PV_CONST
- SvREADONLY_on((SV*)$arg);
- sv_setpv((SV*)$arg, (char *)$var);
-
-# The Perl object is blessed into 'CLASS', which should be a
-# char* having the name of the package for the blessing.
-O_OBJECT
- sv_setref_pv( $arg, CLASS, (void*)$var );
-
-T_OBJECT
- sv_setref_pv( $arg, Nullch, (void*)$var );
-
-# Cannot use sv_setref_pv() because that will destroy
-# the HV-ness of the object. Remember that newRV() will increment
-# the refcount.
-O_HvRV
- $arg = sv_bless( newRV((SV*)$var), gv_stashpv(CLASS,1) );
-
-T_HvRV
- $arg = newRV((SV*)$var);
-
-# Cannot use sv_setref_pv() because that will destroy
-# the AV-ness of the object. Remember that newRV() will increment
-# the refcount.
-O_AvRV
- $arg = sv_bless( newRV((SV*)$var), gv_stashpv(CLASS,1) );
-
-T_AvRV
- $arg = newRV((SV*)$var);
-
-
-######################################################################
-INPUT
-
-T_APACHEOBJ
- r = sv2request_rec($arg, \"$ntype\", cv)
-
-T_TABLEOBJ
- $var = ($type)hvrv2table($arg)
-
-T_PV_CONST
- $var = ($type)SvPV($arg,na)
-
-O_OBJECT
- if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
- $var = ($type)SvIV((SV*)SvRV( $arg ));
- else{
- warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
- XSRETURN_UNDEF;
- }
-
-T_OBJECT
- if( SvROK($arg) )
- $var = ($type)SvIV((SV*)SvRV( $arg ));
- else{
- warn( \"${Package}::$func_name() -- $var is not an SV reference\" );
- XSRETURN_UNDEF;
- }
-
-O_HvRV
- if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVHV) )
- $var = (HV*)SvRV( $arg );
- else {
- warn( \"${Package}::$func_name() -- $var is not a blessed HV reference\" );
- XSRETURN_UNDEF;
- }
-
-T_HvRV
- if( SvROK($arg) && (SvTYPE(SvRV($arg)) == SVt_PVHV) )
- $var = (HV*)SvRV( $arg );
- else {
- warn( \"${Package}::$func_name() -- $var is not an HV reference\" );
- XSRETURN_UNDEF;
- }
-
-O_AvRV
- if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVAV) )
- $var = (AV*)SvRV( $arg );
- else {
- warn( \"${Package}::$func_name() -- $var is not a blessed AV reference\" );
- XSRETURN_UNDEF;
- }
-
-T_AvRV
- if( SvROK($arg) && (SvTYPE(SvRV($arg)) == SVt_PVAV) )
- $var = (AV*)SvRV( $arg );
- else {
- warn( \"${Package}::$func_name() -- $var is not an AV reference\" );
- XSRETURN_UNDEF;
- }
-
diff --git a/tags/v1_29/CREDITS b/tags/v1_29/CREDITS
deleted file mode 100644
index 1d6b0dc..0000000
--- a/tags/v1_29/CREDITS
+++ /dev/null
@@ -1,343 +0,0 @@
-=head1 NAME
-
-CREDITS - The many mod_perl contributors
-
-=head1 DESCRIPTION
-
-While Doug MacEachern is behind the majority of mod_perl's design,
-code and documentation, he and mod_perl never would have made it this
-far without the help from everyone in the mod_perl community. His
-heartfelt thanks goes out to all of you!
-
-There are thousands of people who have contributed to what mod_perl is
-today. This file is here to recognize the tremendous efforts of the
-major contributors to the mod_perl effort.
-
-This file is generated by a Perl script which sorts by name.
-
-=head1 MAJOR CONTRIBUTORS
-
-=over 4
-
-=item Andreas Koenig (andreas.koenig@franz.ww.tu-berlin.de)
-
-For *lots* of bug spotting, fixing and patching since the early days.
-Andreas introduced the Apache::Registry that we all know and love.
-He put a great deal of time and effort into CGI.pm overhaul efforts
-(aka CGI::XA & CGI::Switch).
-Various contributions to the Apache/Perl API.
-PAUSE efforts beyond the call of "duty".
-Apache::Stage, Apache::GzipChain and Apache::UploadSrv modules on CPAN.
-Andreas was the first to run mod_perl on a production site, the Perl
-Authors Upload Server, aka PAUSE.
-
-=item Andrew Ford (A.Ford@ford-mason.co.uk)
-
-Andrew has made contributions to the Apache::FakeRequest module and is
-the author of the mod_perl refcard.
-
-=item Ask Bjorn Hansen (ask@netcetera.dk)
-
-Author of the Apache::DBILogger and Apache::UserTrack modules,
-mod_perl_handlers.pod along with plenty of help testing cvs snapshots,
-documentation improvements, Apache::StatINC hacking and assisting with
-the perl.apache.org site.
-
-=item Brian Behlendorf (brian@apache.org)
-
-Brian provides the bandwidth for perl.apache.org along with the
-mailing list and cvs repository.
-
-=item Brian Mosley (ix@maz.org)
-
-Brian added Solaris support to Apache::SizeLimit and maintains
-Apache::SizeLimit in the distribution. He is always one of the first
-to try out new features, before they are even documented!
-
-=item Doug Bagley (doug@dejanews.com)
-
-Doug Bagley has pinpointed some of the nastiest mod_perl bugs while
-claiming to know nothing about xs. He's also made improvements to the
-Apache::SIG module along with writing the valuable Apache::SizeLimit
-module.
-
-=item Edmund Mergl (E.Mergl@bawue.de)
-
-Edmund revolutionized database connectivity with his Apache::DBI
-module for persistent connections via DBI, providing a tremendous
-performance boost for database intensive apps. He's also written the
-popular Apache::AuthenDBI and Apache::AuthzDBI packages for
-authentication and authorizing against databases via DBI.
-
-=item Eric Cholet (cholet@logilune.com)
-
-Author of Apache::EmbperlChain and Apache::RefererBlock.
-Involved with many heroic debugging sessions.
-
-=item Eric Bartley (bartley@pdn.cc.purdue.edu)
-
-Eric had a big hand in implementing and testing method handlers.
-He also contributed to some of the Apache/Perl API, along with
-making sense of some AIX mysteries for us.
-And, his Apache::AuthCookie module is an inspiration to us all.
-
-=item Frank Cringle (fdc@cliwe.ping.de)
-
-Frank is the author and maintainer of the mod_perl FAQ.
-
-=item Gerald Richter (richter@ecos.de)
-
-Gerald has helped us with various bug spotting and fixing over the
-years. His HTML::Embperl module, specially designed to run under
-mod_perl, has saved many lives.
-
-=item Gisle Aas (aas@sn.no)
-
-Gisle wrote an early "proof-of-concept" mod_perl.c and perl_glue.xs
-March 25, 1996 to be exact. While next to none of that code is
-present in the current mod_perl source, as the embedded model and
-XS <-> Apache API interface were changed, it was an important
-insipirational kick start to what mod_perl has become today.
-
-Gisle has also contributed to mod_perl's Apache::Constants module,
-along with API enhancements and documentation.
-
-=item Jan Pazdziora (adelton@fi.muni.cz)
-
-Jan is the author of the Apache-OutputChain package.
-
-=item Jason Bodnar (jason@cimedia.com)
-
-Jason's mod_perl hacking has inspired a good chunk of the Apache/Perl
-API, some of which you'll see in his Apache::CustomDBILogger and
-Apache::AuthenCache modules.
-
-=item Jeffrey Baker (jeff@godzilla.tamu.edu)
-
-Maintainer of the mod_perl NT binary distribution and author of the
-Apache::Session module.
-
-=item John D. Groenveld (jdg117@elvis.arl.psu.edu)
-
-John contributed the Apache::DBILogin, Apache::AuthenURL and
-Apache::PHLogin modules along with proving Oracle
-tips and tricks over the years.
-
-=item Joshua Chamas (chamas@alumni.stanford.org)
-
-Author of the Apache::ASP module.
-
-=item Ken Williams (ken@forum.swarthmore.edu)
-
-Author of the Apache::Taco, Apache::SSI and Apache::Filter modules.
-
-=item Lincoln Stein (lstein@cshl.org)
-
-Everybody knows Lincoln gave us the must-have CGI.pm module, he's put
-forth considerable effort porting and optimizing it for mod_perl.
-Lincoln also wrote the original Apache::Request module, a CGI.pm-like
-module on top of the Apache API. Lincoln's code and prose in the
-upcoming mod_perl book is a major step towards world peace.
-
-=item Mark Imbriaco (perlhacker@earthlink.net)
-
-For setting up the original mod_perl mail list and administration of
-that list for two years.
-Mark was also the first person besides Doug to write an Apache::* module,
-the first version of Apache::ePerl.
-He was also the first person to build and run mod_perl under Windows 95!
-
-=item Michael Parker (parker@austx.tandem.com)
-
-Michael gave us Apache::AuthenSMB.
-
-=item Mike Fletcher (fletch@phydeaux.org)
-
-Fletch gave us Apache::Mmap.
-
-=item Patrick Kane (modus@pr.es.to)
-
-Patrick wrote the original mod_perl FAQ.
-
-=item Peter Tillemans (pti@pandora.be)
-
-Peter helped bring mod_perl upto win32 speed with various patches
-including support for 'make test'. He also maintains the Windows95
-binary distribution of mod_perl.
-
-=item Ralf S. Engelschall (rse@engelschall.com)
-
-Ralf, aka "Dr. Cosmetics", has greatly improved the mod_perl
-configure/build/install process by implementing APACI, DSO and APXS
-support, along with various documentation enhancements. He has also
-written the Apache::ePerl module.
-
-=item Rob Hartill (robh@imdb.com)
-
-Rob was the second to run mod_perl in a production enviroment, and
-perhaps the best known mod_perl site, the Internet Movie DataBase.
-He's also provide various bug fixes, enhancements and mail list support
-since the early days of mod_perl.
-Always one step ahead testing mod_perl against Apache cvs snapshots.
-It was Rob's kicking that made the mod_perl CVS tree come to be.
-
-=item Salvador Ortiz Garcia (sortiz@cfe.gob.mx)
-
-Salvador has helped bang out bugs and traps with sfio enabled
-mod_perls, along with various bug spotting and stopping since the
-early days. He has also contributed to the Apache/Perl API.
-
-=item Stas Bekman (stas@stason.org)
-
-Stas' "Mod Perl Developer's Mini Guide" has saved many lives.
-He has also contributed a great deal to the mod_perl documentation and
-mod_perl site.
-
-=item Vivek Khera
-
-Vivek has saved many lives with his mod_perl_tuning.pod document.
-
-
-=back
-
-
-=head1 MODULE AUTHORS
-
-These are the authors of the "third-party" mod_perl modules available
-from the CPAN.
-
-=over 4
-
-=item Charles C. Fu (ccwf@bacchus.com)
-
-Author of Apache::Gateway.
-
-=item Chris Thorman (chris@thorman.com)
-
-Author of Apache::PrettyText.
-
-=item Clayton Donley (donley@wwa.com)
-
-Author of Apache::TransLDAP and Apache::AuthLDAP.
-
-=item Daniel (daniel-authenradius@electricrain.com)
-
-Author of Apache::AuthenRadius.
-
-=item Demetrios E. Paneras (dep@media.mit.edu)
-
-Author of Apache::AuthenPasswd, Apache::AuthzPasswd, Apache::AuthenNIS
-and Apache::AuthzNIS.
-
-=item Don Schwarz (dons@xnet.com)
-
-Author of Apache::Throttle.
-
-=item Ian Kluft (ikluft@cisco.com)
-
-Author of Apache::Servlet.
-
-=item Jeffrey Hulten (jeffh@premier1.net)
-
-Author of Apache::AuthenPasswdSrv.
-
-=item Jim Woodgate (woody@bga.com)
-
-Author of Apache::Album.
-
-=item Jochen Wiedmann (joe@ispsoft.de)
-
-Author of Apache::EP.
-
-=item Jonathan Swartz (swartz@transbay.net)
-
-Author of HTML::Mason.
-
-=item Malcolm Beattie (mbeattie@sable.ox.ac.uk)
-
-Author of Apache::AuthenIMAP.
-
-=item Mark A. Downing (mdowning@rdatasys.com)
-
-Author of Apache::Sybase::CTlib.
-
-=item Maurice Aubrey (maurice@hevanet.com)
-
-Author of Apache::Traffic.
-
-=item Michael Smith (mjs@iii.co.uk)
-
-Author of Apache::ProxyPass and Apache::RedirectDBI.
-
-=item Neil Jensen (njensen@habaneros.com)
-
-Author of Apache::Mysql.
-
-=item Peter G. Marshall (mitd@mitd.com)
-
-Author of Apache::TimedRedirect.
-
-=item Randy Kobes (randy@theory.uwinnipeg.ca)
-
-Author of Apache::RandomLocation.
-the existence of a user in one or more database tables.
-
-=item Simon Matthews (sam@peritas.com)
-
-Author of Apache::Layer.
-
-=item Tom Hughes (tom@compton.demon.co.uk)
-
-Author of Apache::TempFile.
-
-=item Valerie Delane (valerie@savina.com)
-
-Author of Apache::AuthenNISplus.
-
-
-=back
-
-=head1 The Apache and Perl communities
-
-If there was no Apache, there would be no mod_perl.
-
-If there was no Perl, there would be no mod_perl.
-
-We owe a great deal of thanks to The Apache Group, Larry Wall and the
-perl5-porters, along with the communities that support them both.
-
-=head1 OTHER CONTRIBUTORS
-
-There are B<many> other people who have contributed a great deal to
-mod_perl in one way or another, this list is derived from the Changes
-file, activity on the modperl@perl.apache.org list including support,
-suggestions and new ideas, along with help through private mails or
-other means.
-
-This list is most likely incomplete.
-My apologies if that is the case, please send me an email if you are
-left out and your contribution will be recognized!
-
-If you do not feel you've made a contribution, remember your help is
-always welcome and appreciated. You should consider yourself a
-contributor to the mod_perl effort even if you are simply using mod_perl!
-
-Adam Laurie, Alan Beale, Alexander Demenshin, Andrea Borgia, Ben Laurie,
-Ben Reser, Ben Sugars, Bowen Dwelle, Brian Millett, Bruce Hoylman, Chip
-Salzenburg, Chris Dean, Christopher Thompson, Dan Peterson, David Hodson,
-David Landgren, Dean Gaudet, Elizabeth Mattijsen, Eric Eisenhart, Eric
-James Negaard, Evert-Jan Couperus, Gary Shea, Gunther Birznieks, Gurusamy
-Sarathy, Iosif Fettich, James Cooper, Jarkko Hietaniemi, Jeff Hallgren,
-Jeff Rowe, Jens Heunemann, Jimmy Oh, Joel Wagner, John Detloff, Jon
-Drukman, Jon Orwant, Joonsuk Bae, Liam Howlett, Lupe Christoph, Marc
-Slemko, Mark Constable, Mark Mills, Mark-Jason Dominus, Michael Alan
-Dorman, Michael Peppler, Michael Sanders, Michael Shields, Michael Turner,
-Mike Pheasant, Mike Stok, Mike Wertheim, Milan Votava, Nathan Torkington,
-Owen Scott Medd, Paul Phillips, Paul Sutton, Peter Levart, Randal Schwartz,
-Richard Dice, Robert Nice, Robert Tau, Ron Hawkins, Ryan Whelan, Steve
-Farrell, Steve Farrell, Steve Nielsen, Sven Verdoolaege, Ted Corning, Tim
-Bunce, Todd Eigenschink, Tom Hukins, Tom Mornini, Ulrich Pfeifer
-
-=head1 REVISION
-
-$Revision$ $Date$
diff --git a/tags/v1_29/Changes b/tags/v1_29/Changes
deleted file mode 100644
index 4d2713f..0000000
--- a/tags/v1_29/Changes
+++ /dev/null
@@ -1,4403 +0,0 @@
-=head1 NAME
-
-Changes - Apache mod_perl change logfile
-
-=head1 CHANGES
-
-all changes without author attribution are by Doug MacEachern
-
-=over 3
-
-=item 1.29 - Oct 7, 2003
-
-Add a workaround for the 'rand' bug for perl 5.8.1 (compiled with
-either -DUSE_HASH_SEED or -DUSE_HASH_SEED_EXPLICIT, which is the
-default), causing all forked procs to produce the same rand
-sequence. [Stas]
-
-For Win32, add an INSTALL_LIB option to 'perl Makefile.PL' to
-allow one to specify where to install mod_perl.lib. If not
-given, this defaults to APACHE_SRC\libexec, if this exists.
-Suggested by Steve Hay [randyk]
-
-Fix t/net/perl/sym.pl (called by modules/symbol) not to affect other
-tests (internal/http-get and internal/http-post, which were failing to
-call exit) [Stas]
-
-Fix Apache::ExtUtils to work with blead perl (it was breaking the
-build) http://rt.perl.org/rt2/Ticket/Display.html?id=23803 [Stas]
-
-On Win32 the uploaded file wasn't cleaned up (weither it's a bug in
-CGI.pm or not), make sure we don't leave any dropped files around
-[Steve Hay <steve.hay@uk.radan.com>]
-
-For Win32, keep drive letters in mod_perl.dsp to fix bug, reported
-by DH <crazyinsomniac@yahoo.com>, when compiling mod_perl in
-cases where Apache and Perl are on different drives [Randy Kobes].
-
-Add workaround to define statcache in Apache.xs so that
-one can build on Win32 ActivePerl 8xx with LARGE_FILES
-support [Randy Kobes]
-
-=item 1.28 - July 2, 2003
-
-Apache::FakeRequest now isa Apache so code that is carefull about
-$r and checks that $r->isa('Apache') will not fail [David Wheeler
-<david@kineticode.com]
-
-Add Mac OS X support to Apache::SizeLimit [David Wheeler
-<david@kineticode.com>]
-
-Add Win32 support to Apache::SizeLimit [Matt Phillips
-<mphillips@virage.com> and Mohamed Hendawi <mhendawi@virage.com>]
-
-Change Apache::SizeLimit to not push a cleanup handler if already in
-the cleanup handler phase, and adjust docs to show that cleanup
-handler is the preferred phase to use [Perrin Harkins
-<perrin@elem.com>]
-
-Rename Apache::test to Apache::testold because Apache::test on
-case-insensitive systems will collide with Apache::Test which
-supercedes Apache::test. So if you want to keep on using Apache::test,
-either bundle it with your project (putting it under inc/ or t/ so it
-won't be installed) or require mod_perl 1.28 and use Apache::testold
-instead. Of course the best route is to port your test suite to use
-a much better Apache::Test which work with mod_perl 1.0 and 2.0.
-[Philippe M. Chiasson, Stas Bekman]
-
-Tweak mod_perl.h to defined _INCLUDE_APACHE_FIRST only after apache
-headers were included [Stas Bekman]
-
-avoid various warnings under src/modules/perl/:
-- declare bufsiz to be STRLEN in Apache.xs, and add
- STRLEN to Apache/typemap
-- add I32 typecast in Constants.xs
-- avoid use of unregistered local variables for Win32
- in mod_perl.c and perl_config.c
-- s/I32/U8/ in mod_perl.h, perl_config.c, and perl_util.c
-- declare i and http_code to be STRLEN in perl_util.c
-[Stas Bekman, Randy Kobes]
-
-don't use $r variable in Apache::PerlRun::compile(), so the script
-won't use use inherited $r by mistake [Stas Bekman]
-
-define PERL_DIRECTIVE_HANDLERS so that ModuleConfig.c gets
-generated when building on Win32 within Visual Studio
-[John Petrakis <jpetrakis@rcn.com>]
-
-enable PERL_SECTIONS for Win32 [Dirk Maetens <dirk.maetens@chello.be>]
-
-use touch() from ExtUtils::Command, rather than a system touch(),
-for the benefit of platforms without touch(). [Randy Kobes
-<randy@theoryx5.uwinnipeg.ca>]
-
-can't let the default typemap rule to convert sv into char* in
-unescape_url, since it doesn't handle correctly undefs (returns an
-unallocated "" string, which then causes a segfault in
-ap_unescape_url. use SvPV_force, instead, which does the right
-thing. [Stas Bekman]
-
-Make sure to start perl, if it's not running, before processing Perl*
-directives, with threaded perl and PERL_STACKED_HANDLERS=0 [Stas
-Bekman]
-
-Add Apache::Module to Bundle::Apache [Stas Bekman]
-
-use $Config{'installstyle'} instead of hardcoded 'lib', to handle
-Makefile.PL's PREFIX option correctly [Philippe M. Chiasson
-<gozer@cpan.org>]
-
-prevent segfaults in mod_perl_mark_where() when a sub can't get
-resolved [Gerald Richter <richter@ecos.de>]
-
-Apache::Status: Need to load B::Terse/TerseSize if it wasn't loaded
-yet in that child before using it. [Dan Sully <daniel@electricrain.com>]
-
-document the server_root_relative() method [Stas Bekman <stas@stason.org>]
-
-eliminate warnings when flushing functions with empty () prototypes in
-Apache::PerlRun::flush_namespace [Yair Lenga <yair.lenga@citigroup.com>]
-
-fix Apache::Status to not use :: in filenames, which is not allowed on
-certain OSs [DH <crazyinsomniac@yahoo.com>]
-
-various cygwin fixes [Per Einar Ellefsen <per.einar@skynet.be>]
-
-fix to compile with 5.8.0 on win32 [Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-Document the possible misuses of the Apache::Constant constants
-[Per Einar Ellefsen <per.einar@skynet.be>]
-
-=item 1.27 - June 1, 2002
-
-workaround Cwd bug in 5.8.0-RC1 that breaks apache configuration on solaris
-
-fix get_set_PVp() to properly set NULL values when passing in undef
-thanks to Lyle Brooks for the spot
-[Stephen Clouse <stephenc@theiqgroup.com>]
-
-Apache::Registry/PerlRun/RegistryNG errors are now saved
-in $r->notes('error-notes')
-[Jesse Erlbaum <jesse@vm.com>]
-
-fix Win32 build problems with spaces in shell arguments
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-make sure DynaLoader is loaded before XSLoader to workaround possible
-segv when using mod_perl as a dso with perl 5.6.1
-
-autoset PERL_USELARGEFILES=0 if needed
-
-fix taint issues with bleedperl
-
-fix bug in modules/util test
-[Tatsuhiko Miyagawa <miyagawa@edge.co.jp>]
-
-Adjust the mailling list addresses
-'s|\@apache\.org|\@perl.apache.org|' [Stas Bekman <stas@stason.org>]
-
-Apache::PerlRun will now localize $SIG{__{DIE,WARN}__}
-thanks to Jon Coulter for the spot
-
-PERL5LIB support now properly unshifts paths into @INC rather than push
-[Tatsuhiko Miyagawa <miyagawa@edge.co.jp>]
-
-do not clear symbol tables within a package in perl_clear_symtab()
-used by directive handler extensions
-[Stephen Clouse <stephenc@theiqgroup.com>]
-
-properly deal with $r->status codes (e.g. redirect) in
-Apache::RegistryNG [Geoff Young <geoff@modperlcookbook.org>]
-
-allow $r->auth_name and $r->auth_type to be set on win32
-[John Kelly <john_kelly@uk.ibm.com>]
-
-fix compilation for win32 w/ apache 1.3.22+
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-fix multiple %LocationMatch in <Perl> sections bug
-[Salvador Ortiz Garcia <sog@msg.com.mx>]
-
-rip -D_GNU_SOURCE out of Perl 5.7.3+'s ccflags, which modperl doesn't
-need and apache won't compile with [Stas Bekman <stas@stason.org>]
-
-make sure PerlSetEnv variables are visible after first access
-to each child [Geoff Young <geoff@modperlcookbook.org>]
-
-workaround Apache::Constants::AUTOLOAD problem with bleedperl
-
-the first flag argument to perl cannot start with space, since perl tries
-to open the " -spi.bak" as a file. fix that in the win32 case.
-[Stas Bekman <stas@stason.org>]
-
-starting from perl 5.7.3 for tied filehandles, tiedscalar magic is applied
-to the IO slot of the GP rather than the GV itself. adjust the TIEHANDLE
-macro to work properly under 5.7.3+. [Charles Jardine <cj10@cam.ac.uk>,
-Stas Bekman <stas@stason.org>]
-
-added perl_perl_merge_dir_config and array_header2avrv symbols to
-mod_perl.def for win32 and mod_perl.exp for aix.
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-INSTALL.apaci: added an explanation of how perl has to be built in
-order to use DSO without problems (copied from the guide) based on
-email from Doug. [Stas Bekman <stas@stason.org>]
-
-warn if Perl is configured with -Duseshrplib and a libperl.so is found
-in a place where it should not be, example: /lib /usr/lib or /usr/local/lib
-
-fix potential segv in Apache::URI->rpath
-[Vyacheslav Zamyatin <slawa@w-m.ru>]
-
-require URI::URL to work with newer libwww-perl
-
-allow overriding of container directive handlers using the func parameter
-[Geoffrey Young <gyoung@laserlink.net>]
-
-enable directive handler support for TAKE13
-[Geoffrey Young <gyoung@laserlink.net>]
-
-=item 1.26 - July 11, 2001
-
-fix 'make test' problem seen with Perl 5.005_03
-
-remove $r->finfo usage from Apache::PerlRun, clearly finfo isn't as
-stable as it should be
-[Surat Singh Bhati <surat@indiamart.com>]
-
-Apache->server will now point the current VirtualHost when inside a
-<Perl> section, thanks to Robin Berjon for the spot
-
-allow per-server and per-location PerlSetEnv to be properly merged
-when a per-server handler is configured, thanks to Michael Barry for
-the spot
-
-enabled Apache::ModuleConfig on win32
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-win32 support for Apache::src [Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-=item 1.25_01 - July 6, 2001
-
-add symbols to mod_perl.exp for aix/axkit
-
-add Apache::add_version_component() function
-
-make sure Apache::ExtUtils can be found when building inside of the
-apache source tree, thanks to Jonathan Swartz for the spot
-
-add perl_call_handler to mod_perl.def for win32/axkit
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-fix -[TB] file tests against $r->finfo, thanks to Geoffrey Young for
-the spot
-
-Apache::SizeLimit enhancements [Perrin Harkins <perrin@elem.com>]:
-- Added support for minimum shared memory and maximum unshared memory
-settings.
-- Added extra diagnostics to tell how many requests a process served,
-how long it lived, and how much shared memory it was using when
-SizeLimit killed it.
-
-win32 enhancement: APACHE_SRC can be either the build or install tree
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-perl_destruct_level must always be 2 for DSO builds to prevent
-leaking on restarts, thanks to Paul G. Weiss for the spot
-
-make sure file to be reloaded can be found in @INC, adjusting based on
-%INC value if needed
-[Ilya Konstantinov <modperl@future.galanet.net>]
-
-croak if the filehandle passed to $r->send_fd is NULL, otherwise
-apache will segfault
-
-if PREFIX is given to Makefile.PL add it to @INC at startup
-[Philippe M . Chiasson <gozer@cpan.org>]
-
-add %Apache::MyConfig aliases for Apache::src backwards compat
-[Philippe M . Chiasson <gozer@cpan.org>]
-
-$r->custom_response($code, undef) will now unset the current CustomResponse
-[Geoffrey Young <gyoung@laserlink.net>]
-
-fix to compile with sfio+ithreads, thanks to Joe Schaefer for the spot
-
-win32 fixes for apache 1.3.20 [Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-adjust perl_clear_symtab() to deal properly bleedperl's version of
-cv_undef() (which broke modules with directive handlers)
-thanks to Geoffrey Young for the spot
-
-add $r->allowed method [Philippe Troin <phil@fifi.org>]
-
-fix 'make offsite-tar' [Geoffrey Young <gyoung@laserlink.net>]
-
-win32 fixes [Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-fix double-loading bug of Perl{Require,Module}s at startup time
-
-improve Apache::MyConfig [Stas Bekman <stas@stason.org>]
-
-back out 'stop win32 crash when bringing down service' change, no
-longer needed with 1.3.19
-[John Sterling, Will Rowe]
-
-$r->no_cache(0) will unset cache headers
-[Geoffrey Young <gyoung@laserlink.net>]
-
-export hvrv2table (needed by Apache::Request) for aix and win32
-[Jens-Uwe Mager <jum@helios.de>, Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-fix 'make tar_Apache' [Geoffrey Young <gyoung@laserlink.net>]
-
-make sure global for Apache->request is reset after configuring %ENV
-[Gerald Richter <richter@ecos.de>]
-
-adjust 'U' magic functions to Perl 5.7.x-dev prototype change
-
-Put Apache's CFLAGS into AP_CFLAGS instead of CFLAGS, so that
-people who like to override CFLAGS from the make line (make
-CFLAGS='-arch ppc -arch i386') can do so without stomping the
-Apache flags. [ Wilfredo Sanchez <wsanchez@KnowNow.com> ]
-
-=item 1.25 - January 29, 2001
-
-avoid 'prototype mismatch' warnings in Apache::PerlRun::flush_namespace
-[Wenzhong Tang <Tang@appliant.com>]
-
-xsubpp now run with -nolinenumbers (5.004_04 bombs otherwise)
-
-DSO support for hpux with native cc
-
-document Apache->server->register_cleanup
-[Perrin Harkins <perrin@primenet.com>]
-
-Apache::Server->loglevel can now be modified
-[Geoffrey Young <gyoung@laserlink.net>]
-
-use unsigned short rather than short for Apache::Server->port
-thanks to Richard L. Goerwitz for the spot
-
-fix $r subclassing mechanism when value of `r' or `_r' key is a hashref
-thanks to Dave LaMacchia for the spot
-
-fix Apache::PerlRun is-a -> has-a Apache relationship change oversights
-[Ken Williams <ken@forum.swarthmore.edu>,
-Alexander Solovey <alsol@sumdu.edu.ua>]
-
-win32 updates for 1.3.15, including ApacheModulePerl.{dsp,dll} ->
-mod_perl.{dsp,so} rename
-[John K. Sterling <sterling@covalent.net>,
-Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-fix directive handlers bug triggered by LoadModule foo_module
-
-allow $r->finfo to be modified
-
-if Perl is linked with -lpthread, then httpd needs to be linked with
--lpthread, make sure that happens with USE_DSO=1, warn if USE_APXS=1
-
-largefile flags can be stripped from mod_perl with:
- Makefile.PL PERL_USELARGEFILES=0
-
-adjust test output (modules/{cgi,constants}) to make 5.7.0-dev
-Test::Harness happy
-
-fix $r->custom_response bug which was triggering core dumps if no
-ErrorDocuments were configured, thanks to Paul Hodges for the spot
-
-rid PL_na usage in Symbol.xs
-
-INSTALL.win32 updates, obsolete INSTALL.activeperl removed
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-Solving an 'uninitialized value' warn in Apache::SizeLimit.
-post_connection() expects a return status from the callback function.
-[Stas Bekman <stas@stason.org>]
-
-include mod_perl hook/feature config and pod in Apache::MyConfig
-[Geoffrey Young <gyoung@laserlink.net>]
-
-rewrite of Apache::WRITE() in c/xs
-[Soheil Seyfaie <sseyfaie@cryptologic.com>]
-
-prevent $PerlRequire in a <Perl> section from triggering an endless loop
-[Salvador Ortiz Garcia <sog@msg.com.mx>]
-
-build fix for using gcc with AIX
-[Jens-Uwe Mager <jum@helios.de>]
-
-allow modification of $r->hostname
-[Jim Winstead <jimw@trainedmonkey.com>]
-
-allow Makefile.PL to build mod_perl on Win32 using VC++
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-stop win32 crash when bringing down service
-[John K. Sterling <sterling@covalent.net>]
-
-various Apache::test enhancements and fixes
-[Ken Williams <ken@forum.swarthmore.edu>, Dave Rolsky <autarch@urth.org>]
-
-Documenting the new PerlAddVar httpd.conf directive
-[Stas Bekman <stas@stason.org>]
-
-new Apache::test::static_modules() method
-[Ken Williams <ken@forum.swarthmore.edu>]
-
-Improved Apache->send_http_header documentation
-[Ken Williams <ken@forum.swarthmore.edu>]
-
-=item 1.24_01 - October 10, 2000
-
-fix bug in $r->args that treats ?0 as the empty string instead of zero,
-thanks to Matt Sergeant for the spot
-
-add proper offset support to Apache::read
-
-config/test fixups for libapreq/win32
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-skip modules/ssi test if mod_include is not installed
-
-Apache::test enhancements
-[Ken Williams <ken@forum.swarthmore.edu>]
-
-fix Apache::exit() so it does it does not trigger a warning
-
-change Apache::PerlRun's Apache class relationship from is-a to has-a
-[Ken Williams <ken@forum.swarthmore.edu>]
-
-Apache::SubRequest->run(1) allows ap_send_http_headers() to output for
-subrequests
-
-Apache::{Registry,PerlRun} will now log an error if $filename is NOT_FOUND
-thanks to Martin Wood for the spot
-
-fix bug where Apache::send_http_header was resetting r->status = 200
-thanks to brian d foy for the spot
-
-make extra sure Apache::Constants::AUTOLOAD does not recurse looking
-for sub __AUTOLOAD [Jim Winstead <jimw@trainedmonkey.com>]
-
-fix %Apache::ReadConfig:: processing for PerlRequire'd files
-[Salvador Ortiz Garcia <sog@msg.com.mx>]
-
-$r->get_basic_auth_pw and $r->note_basic_auth_failure will default
-$r->auth_type to "Basic" if not already set
-
-$r->auth_type is now writeable, e.g. $r->auth_type("Basic")
-
-fix $r->read() so it will not block if all data has already been read
-and so that Apache will not hang during ap_discard_request_body() on
-error or redirect after all data has been read
-
-fix for Makefile.PL ADD_MODULE=src/module/foo/libfoo.a
-[Nelson Oliveira <NOliveira@extend.com>]
-
-added Apache::user method in preparation for 2.0, now that `user' hangs
-off of the request_rec rather than request_rec->connection in Apache 2.0
-
-disable r->proxyreq checking unless PerlTransHandler is enabled and
-configured
-
-fix 'make tar_Apache' [Jesse Erlbaum <jesse@VM.COM>]
-
-fix for Perl{Module,Require} in .htaccess,
-thanks to Will Trillich and Andrew Gideon for the spot
-
-static+apaci fixes for aix [Jens-Uwe Mager <jum@helios.de>]
-
-fix bug in Perl{Set,Add}Var so $r->dir_config->get('key') sees the
-same values as $r->dir_config('key'), thanks to Geoffrey Young for the spot
-
-PerlAddVar is now an ITERATE2 directive rather than TAKE2
-
-added Apache::Server::error_fname method
-
-eg/makepl_args.mod_perl updated
-[Neil Conway <nconway@klamath.dyndns.org>]
-
-'make test' config fixes for mod_ssl
-[David Mitchell <davem@fdgroup.co.uk>, Mark Murphy <mark@opus.pass.wayne.edu>,
-Stephen Schaefer <stephen@networks.com>]
-
-plug leak in DIR_MERGE, thanks to Matt Sergeant for the spot
-
-fixes to run and pass 'make test' on ActivePerl [Randy Kobes, Gerald Richter]
-
-Makefile.PL:post_initialize fix for win32, thanks to john sterling for
-the spot
-
-fixes for ActivePerl [Gurusamy Sarathy <gsar@ActiveState.com>]
-
-change apaci/Makefile.tmpl and src/modules/perl/Makefile so Perl's
-include path comes before /usr/local/include, e.g. to make sure Perl's
-patchlevel.h is used, thanks to Ryan Morgan for the spot
-
-avoid duplicate buffer copy in {read,get}_client_block by reading
-directly into Perl's SV buffer
-
-modules/request test fix
-[Ken Williams <ken@forum.swarthmore.edu>]
-
-switch usage of hard_timeout() to soft_timeout(), so if SIGALRM
-happens during Apache::{print,read}, the script will continue run,
-allowing proper cleanup (e.g. DESTROY)
-
-fix refcnt bug in $r->get_handlers,
-thanks Geoffrey Young for the spot
-
-add PerlCleanupHandler to the {get,set}_handlers table,
-thanks Geoffrey Young for the spot
-
-fix $r->args(undef), thanks to Greg Cope for the spot
-
-quotemeta path_info in Registry regexp
-[Tobias Hoellrich <thoellri@adobe.com>]
-
-flush r->finfo cache if r->filename fails
-[Roger Espel Llima <espel@iagora.net>]
-
-fix per-dir merging of PerlSetupEnv [Eric Cholet <cholet@logilune.com>]
-
-INSTALL.raven update [Adam Qualset <adam@covalent.net>]
-
-backed out $Apache::Server::ConfigTestOnly until proper Apache support
-is in place
-
-fix $r->bytes_sent($bytes)
-
-support version parsing of 1.3.13-dev's httpd.h
-
-fix for 'sub handler : method {}' support when method is not found
-[Eric Cholet <cholet@logilune.com>]
-
-Apache::ExtUtils will now generate and END routine to call
-ap_remove_module() [Christopher Chan-N <uichannui@tiny.org>]
-
-rename Apache::{PerlRun,RegistryNG}::update_mtime to set_mtime, so
-Apache::update_mtime is not overridden
-thanks to Michael Blakeley for the spot
-
-constant 'DECLINED' wasn't imported by Apache::RegistryBB, thanks to
-Michael Blakeley for the spot [Eric Cholet <cholet@logilune.com>]
-
-fixes for building with stronghold
-[Sander van Zoest <sander@vanZoest.com>]
-
-Apache::Resource was not converting PERL_RLIMIT_AS to MB values
-thanks to Ian Kallen for the spot
-
-fix unescape_url_info() when url is undef or "",
-thanks to Kenneth Lee for the spot
-
-fix 1.24's Apache::Table->unset changes for win32
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-fix broken Win32 build (unresolved external symbol _ap_configtestonly)
-[Eric Cholet <cholet@logilune.com>]
-
-=item 1.24 - May 16, 2000
-
-'sub handler : method {}' is now treated as a method handler
-
-variable $Apache::Server::ConfigTestOnly is set to 1 if Apache
-is running in configuration test mode (httpd -t)
-(not unavailable under Win32)
-[Eric Cholet <cholet@logilune.com>]
-
-add PerlAddVar directive, like PerlSetVar, but uses ap_table_add
-instead of ap_table_set
-
-Makefile.PL warns about 5.6.0+uselargefiles if USE_APXS
-
-Apache::Table->unset can now be called with an array reference
-
-Apache::PerlRun::flush_namespace fixes, so aliased (imported)
-code/hash/array/scalar are undefined without undef-ing the pointed-to
-data and without using B.pm, thanks to Richard Chen for the suggestion
-
-document Apache::print's special behavior wrt references
-[Jeffrey W. Baker <jwbaker@acm.org>]
-
-fix core dump triggered by <Perl>do 'foo.pl'</Perl>,
-thanks to Robert S. Thau for the spot
-
-pass $Config{ccflags} to apache for 5.6.0+
-
-fix Apache->httpd_conf, thanks to Will Trillich for the spot
-
-fixed 'make clean' to remove FILES => passed to MakeMaker
-
-=item 1.23 - April 20, 2000
-
-create test files during Makefile.PL so 'make test' can be run as root
-
-add Apache::FILENO method for 5.6.0+ tied filehandle support
-thanks to Richard Titmuss for the spot
-
---disable-rule=EXPAT is passed to Apache's configure to avoid
-XML::Parser conflicts
-
-User/Group for 'make test' can be overridden with the environment
-variables APACHE_USER/APACHE_GROUP
-
-fix PerlSetVar inheritance bug
-[Sander van Zoest <sander@vanzoest.com>]
-
-set r->notes("error-notes") to $@ if $@ after a Perl*Handlers is run
-[Doug / Tom Mornini <tmornini@infomania.com>]
-
-added INSTALL.raven
-[Adam Qualset <adam@covalent.net>]
-
-$c->remote_ip($ip) now also sets conn->remote_addr to make
-IP-based access control work correctly
-[Eric Cholet <cholet@logilune.com>]
-
-Apache::URI::port wasn't setting the port correctly, thanks
-to Zeqing Xia for the spot [Eric Cholet <cholet@logilune.com>]
-
-$Apache::Registry::NameWithVirtualHost fix take 2
-(move is_virtual logic from mod_perl.c to Registry.pm)
-[John Hughes <john@Calva.COM>]
-
-added Apache::OPEN method for 5.6.0+ tied filehandle support
-
-Apache::Table is now loaded by default (if enabled), rather than
-autoloading when first needed
-
-$r->document_root can now be modified
-
-upgrade license to apache software license version 1.1
-
-$r->the_request can now be modified
-
-modules/request test fix
-[Rick Myers <rik@sumthin.nu>]
-
-updated dso+aix Perl patch
-[Jens-Uwe Mager <jum@helios.de>]
-
-warn that dso+Perl malloc needs a Perl built with -Ubincompat5005
-
-add Apache::BINMODE stub for 5.6.0 tied filehandle support (fixes cgi.t #4)
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-5.6.0+win32 typedef,prototype clash fixes
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-add $r->server->loglevel() and relevant constants. Suggested
-by Geoffrey Young [Eric Cholet <cholet@logilune.com>]
-
-$Apache::Server::AddPerlVersion uses $^V for Perl/v5.6.0+
-
-update mod_ssl config for 'make test'
-[Stas Bekman <stas@stason.org>]
-
-reset the stack pointer after calling perl_require_module() in
-perl_call_handler(). this fix will most likely cure the reports of
-"Can't upgrade that kind of scalar at ..."
-[Ben Cottrell <benco@stockmaster.com>]
-
-workaround use of Perl api functions that are no longer public with
-Perl 5.6.0 + win32, thanks to Randy Kobes for spotting
-
-change $Apache::VERSION check to use a string instead of SvNV, which
-was troublesome with Perl 5.6.0, thanks to Dave Seidel for pinpointing
-
-Apache::src fixup to quiet warnings under Perl 5.004. Thanks to Ken
-Williams for the spot. [ Ask Bjoern Hansen ]
-
-Apache::src::apxs fixups to quiet warnings if apxs doesnt exist or
-httpd is not dso enabled, thanks to Oleg Bartunov and Ville Skyttä for
-spotting
-
-fix #ifdef SGI_BOOST typo
-[Ville Skyttä <ville@office.popsystems.com>]
-
-=item 1.22 - March 22, 2000
-
-proxy support fixed wrt RFC2068, thanks to Benjamin Elijah
-Griffin for the spot
-
-set Apache::Resource::DEFAULT_RLIMIT_AS (address space) to 64Mb
-[Kevin Murphy <kevin@boojiboy.eorbit.net>]
-
-Bundle::Apache will now install Bundle::LWP before mod_perl
-[Aaron Johnson <solution@gina.net>]
-
-support Apache::FakeRequest::args in a list context
-[Michael Finke <mfinke@apollo.screamdesign.com>]
-
-compile fixes for 5.6 + -Duse5005threads
-[Lincoln Stein <lstein@cshl.org>]
-
-log to parms->server instead of stderr if PerlRequire fails
-
-make sure lib/Apache/MyConfig.pm is written before used
-thanks to Albert Chin for the spot
-
-fixup the output of apxs -q CFLAGS to preserve quoting (again)
-
-=item 1.21_03 - March 15, 2000
-
-removed the generated apaci/mod_perl.config from MANIFEST
-
-new variable $Apache::Server::StrictPerlSections, if true, will croak
-<Perl> section generates invalid Apache configuration syntax
-
-new Apache::src->ccflags method to combine $Config{ccflags} and
-apxs -q CFLAGS
-[Matthias Urlichs <smurf@noris.net>]
-
-added Apache::src->apxs method
-
-make use of $Config{shrpenv} to find CORE/libperl.so
-[Ignasi Roca Carrió <ignasi.roca@fujitsu.siemens.es>]
-
-fix Apache::Registry bug when filename starts with a 0
-[Peter Deister <deister@opus5.de>, Ken Williams <ken@forum.swarthmore.edu>]
-
-Apache::Registry will restore $r->status to the original value
-[Charles Levert <charles@comm.polymtl.ca>]
-
-warn aix-apxs-5.005_03 users of the patch needed for DynaLoader
-[Jens-Uwe Mager <jum@helios.de>]
-
-fixup the output of apxs -q CFLAGS to preserve quoting
-[Sheldon Hearn <sheldonh@uunet.co.za>]
-
-dso fix fix: modules with END blocks calling xs code (e.g. DBI) would
-core dump because the xs .dso had been unloaded, now dso's are not
-unloaded until after END blocks are called.
-Thanks to Daniel Jacobowitz and others for spotting
-
-=item 1.21_02 - March 6, 2000
-
-fix Makefile.PL if $USE_APXS && $PERL_DEBUG
-[Daniel Jacobowitz <drow@false.org>]
-
-force environ[] to be copied before any Perl code is loaded
-[Daniel Jacobowitz <drow@false.org>]
-
-localize $_ in Apache::send_cgi_header
-[Roderick Schertler <roderick@argon.org>]
-
-fix precedence problem in StatINC.pm
-[Roderick Schertler <roderick@argon.org>]
-
-if hash value has magicalness in <Perl>, invoke FETCH
-thanks to Kevin Ruscoe for the spot
-
-sync with 1.3.12's virtual_host section logic for httpd -S + <Perl>
-thanks to Kevin Ruscoe for the spot
-
-remove t/httpd symlink during 'make realclean' and when rebuilding
-[Geoffrey Young <gyoung@laserlink.net>]
-
-add Apache::src::otherldflags method
-[Jens-Uwe Mager <jum@helios.de>]
-
-backout modules/util validate_password tests, not everybody has crypt,
-thanks to Randy Kobes and Ed Loehr for spotting
-
-fix _AIX typo in dso_unload
-[Jens-Uwe Mager <jum@helios.de>]
-
-=item 1.21_01 - March 5, 2000
-
-#ifdef _AIX, make sure Perl's dlclose is used, instead of Apache's
-during dso_unload [Jens-Uwe Mager <jum@helios.de>]
-
-__THE__ dso fix: dlclose() xs shared objects and call perl_shutdown()
-before mod_perl's libperl.so is unloaded/reloaded by mod_so
-[Daniel Jacobowitz <drow@false.org>, Alan Burlison <Alan.Burlison@uk.sun.com>]
-
-add /D "_MSWSOCK_" to ApacheModulePerl.dsp
-[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-removed modules/sandwich test
-
-Apache::RegistryBB returns DECLINED instead of FORBIDDEN if -d $r->finfo
-[Sean Chittenden <sean.chittenden@auctia.com>]
-
-add Apache::Util::validate_password(), as suggested by Christophe
-Labouisse
-
-call (void)perl_request_rec(r) asap, instead of waiting till the
-response phase, e.g. so CGI.pm can be used before PerlHandler, without
-having to call Apache->request($r);
-
-Apache::perl_hook() fixes for Perl*Api, thanks to Geoffrey Young for
-the spot
-
-save/restore $^W in Apache::PerlRun
-[Honza Pazdziora <adelton@informatics.muni.cz>]
-
-fix Apache::Registry when $r->uri ends with a /
-[Peter Deister <deister@opus5.de>]
-
-add virtualhost support to Apache::RegistryLoader
-[John Hughes <john@Calva.COM>]
-
-$Apache::Registry::NameWithVirtualHost fix
-[John Hughes <john@Calva.COM>]
-
-allow Apache::PerlRun::handler to be subclassed
-[Yasushi Nakajima <sey@jkc.co.jp>]
-
-fix $r->connection->remote_ip for SGI performance patches (#ifdef SGI_BOOST)
-[Artem Veremey <scimitar@mail.ru>]
-
-mod_perl.exp is now installed
-
-aix tweaks for building with apxs
-[Jens-Uwe Mager <jum@helios.de>]
-
-pod fixups to avoid WARNING from newer pod2*
-
-Apache::RedirectLogFix now uses $r->last
-[David D. Kilzer <ddkilzer@e-markets.com>]
-
-tweaks for sfio
-[Lupe Christoph <lupe@lupe-christoph.de>]
-
-update Apache::SIG docs, thanks to Bill Moseley for the spot
-
-fix get_set_PVp in mod_perl_xs.h
-[Michal Jaegermann <michal@ellpspace.math.ualberta.ca>]
-
-tweaks to compile/run with 5.5.670 + -Dusethreads
-
-$r->hostname now documented [Eric Cholet <cholet@logilune.com>]
-
-Apache::File methods are now documented
-[Eric Cholet <cholet@logilune.com>]
-
-avoid quoting <Perl> config if args_how == RAW_ARGS
-thanks to Michael Schout for the spot
-
-PerlPassEnv maintains its value beyond the first request,
-thanks to Chris Thorman for the spot
-
-prevent possible core dump in $r->pnotes if get_module_config returns
-NULL, thanks to Kevin Murphy for the spot
-
-fix Apache::Status::status_cv_dump for Perl/5.6-dev
-
-use perl_get_sv("]") instead of patchlevel for $AddPerlVersion
-
-adjust Makefile.PL and Apache::src to parse 1.3.13-dev's httpd.h
-
-Apache::Util functions $r->unescape_uri, $r->unescape_uri_info,
-$r->size_string are now documented [Eric Cholet <cholet@logilune.com>]
-
-$r->request_time is now documented [Jeffrey W. Baker <jwbaker@acm.org>]
-
-Look for the makepl_args.mod_perl file as .makepl_args.mod_perl in
-./ and ../ too since the book says it works so. [Ask Bjoern Hansen
-<ask@valueclick.com>]
-
-PerlRestartHandler is now enabled w/ ALL_HOOKS=1 (or EVERYTHING=1)
-
-$r->no_cache(1) will now set the r->headers_out "Pragma" and
-"Cache-control" to "no-cache"
-
-`PerlSetEnv PERL5LIB ...' now works again, thanks to Stas for the spot
-
-Apache::test fix for Apache::Table
-
-PerlFreshRestart semantics changed to preserve order of PerlModule's
-and not to reload modules while actually iterating over %INC
-
-$r->current_callback now works properly when PerlHandler invokes
-subrequests, thanks to James Smith for the spot
-
-if an Apache::Table is NULL return undef (e.g. $r->notes during ChildInit)
-
-ActivePerl compile patches [Jochen Wiedmann <joe@ispsoft.de>]
-
-document that Apache 1.2.x is no longer supported
-
-Apache::src now supported with USE_APXS=1
-
-'make test' AllowOverride None for Directory /
-[Steve Lembark <Steve.Lembark@wfg.com>]
-
-disable experimental perlrunxs until future notice
-
-add sanity check for libgdbm
-
-change PL_siggv usage to gv_fetchpv("SIG", ...) for Perl 5.6-tobe
-[Andreas J. Koenig <andreas.koenig@anima.de>]
-
-document $r->get_handlers, $r->set_handlers, $r->push_handlers
-[Eric Cholet <cholet@logilune.com>]
-
-document PerlSetVar [Eric Cholet <cholet@logilune.com>]
-
-document the fact that $r->dir_config handles keys in a
-case insensitive manner [Ken Williams <ken@forum.swarthmore.edu>]
-
-avoid logging "rwrite returned -1" multiple times in the
-same request [Eric Cholet <cholet@logilune.com>]
-
-bugfix in write_client() when running under APACHE_SSL
-[Michael Douglass <mikedoug@staff.texas.net>]
-
-document the fact that $r->connection->user can be used to set
-the authenticated user name [Joshua Gerth <jgerth@ptdcs2.ra.intel.com>]
-
-document the fact that $r->uri sets/gets the URI minus the query string,
-not the complete URI [Andrei A. Voropaev <andrei@securities.com>]
-
-fixed the failure of t/modules/file test in 'make test' suit by untainting
-the $ENV{PATH} in ./t/net/perl/file.pl [Stas Bekman <stas@stason.org>]
-
-Apache::RegistryLoader::handler was rewritten to allow a better
-diagnostics of scripts preloading problems. [Stas Bekman
-<stas@stason.org>]
-
-document the fact that $r->args can be used to set the query string
-as well as get it [Andrei A. Voropaev <andrei@securities.com>]
-
-add $r->connection->fileno, provides the client file descriptors. This
-can be used to detect client disconnect without doing any I/O, e.g. using
-IO::Select [Eric Cholet <cholet@logilune.com>]
-
-if $r->bytes_sent has not been calculated, then do so before returning
-the value. thanks to Dirk Melchers for the spot
-
-ensure that all -I directories printed by Apache::src actually exist
-
-don't assume $uri =~ /$path_info$/ in Apache::Registry/PerlRun
-[Jonas Liljegren <jonas@paranormal.o.se>]
-
-/D "_WINSOCK2API_" for 1.3.9/win32 [Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
-
-fix segfault when using Limit in <Perl> sections
-[Müller Joachim <Joachim.Mueller@arbeitsamt.de>]
-
-make $c->remote_host writeable [Joshua Chamas <joshua@chamas.com>]
-
-add per-server PerlSetVar variables, accessed using
-Apache->server->dir_config or $r->server->dir_config.
-$r->dir_config merges them with per-directory variables.
-[Eric Cholet <cholet@logilune.com>]
-
-documentation typo [David Harris <dharris@drh.net>]
-
-add $r->server->uid and $r->server->gid [Eric Cholet <cholet@logilune.com>]
-
-add per-server configuration merge [Eric Cholet <cholet@logilune.com>]
-
-`_' is no longer escaped in Apache::Registry package names
-
-fix $ENV{PATH} corruption, thanks to help from Chip Turner,
-Oleg Bartunov and Tomasz Przygoda
-
-mod_perl_version.h removed from MANIFEST
-
-fix modules/sandwich test
-
-apxs/aix port [Paul J. Reder <rederpj@raleigh.ibm.com>]
-
-preload Apache::Constants::OPT_EXECCGI() for Apache::{Registry,PerlRun}
-thanks to Chris Remshaw for spotting this w/ Apache::DProf
-
-Apache::SizeLimit now uses $r->child_terminate instead of Apache::exit(-2)
-[Jon Peterson <jon@snowdrift.org>]
-
-get rid of various 5.005_60 warnings
-
-add Status{Terse,TerseSize,Deparse,Fathom,OptionsAll} options to Apache::Status
-
-adjust mod_perl.h for 5.005_59 perl_eval_{pv,sv} rename
-
-fix flush_namespace undef logic in Apache::PerlRun, thanks to Karsten
-Meier for the spot
-
-Tweak Apache::content to comply with media-types embedded in content-types
-(RFC 2616 section 3.7) [Eric Cholet <cholet@logilune.com>]
-
-Removed and added a few modules from the Bundle file. <ask@netcetera.dk>
-
-Renamed the Apache::StatINC parameters to StatINC_<something>. Changed
-StatINC_Debug to take a number as parameter instead of "on" to support
-"debug levels" <ask@netcetera.dk>
-
-=item 1.21 - July 2, 1999
-
-fix refcount bug in %VirtualHost [] values, thanks to Pete Ehlke for
-the spot
-
-get rid of a warning in Apache::test [Joshua Chamas <joshua@chamas.com>]
-
-$r->read will now properly check the return value of
-ap_setup_client_block() and return undef if != OK,
-e.g. if LimitRequestBody is exceeded, thanks to Joshua Chamas for the
-spot and testing
-
-loosen module/cookie tests
-
-fix bug in register_cleanup() [Chip Turner <chip@ZFx.com>]
-
-added StatusLexInfo option to Apache::Status
-
-=item 1.20 - June 11, 1999
-
-turn off warnings in Apache::Status::as_HTML symdump code
-[Geoffrey Young <gyoung@laserlink.net>, Tim Bunce <Tim.Bunce@ig.co.uk>]
-
-tweak Apache::RegistryNG so it works with virtual includes, thanks to
-Vivek Khera for the spot
-
-modules/eperl,embperl removed from 'make test'
-
-change Apache::File->tmpfile flags from O_WRONLY to O_RDWR
-[Chuck O'Donnell <cao@milf18.bus.net>]
-
-fix Apache::RegistryBB when $r->filename NOT_FOUND
-[Frank D. Cringle <fdc@cliwe.ping.de>]
-
-cygwin port [Stipe Tolj <tolj@uni-duesseldorf.de>]
-
-Documented $r->pnotes [<ask@valueclick.com>]
-
-Change "setting auth_name" trace message so we don't get it without
-having enabled a MOD_PERL_TRACE level [Ask Bjoern Hansen
-<ask@valueclick.com>]
-
-s/class/pclass/g so we can compile w/ c++
-
-mod_perl will now save/restore SIGALRM
-
-fix Apache::Status bug prototype check of 'use constant' subs, thanks to
-Eric Cholet for the spot
-
-added set_byterange() and each_byterange() methods
-
-added proper support for {Location,Directory,Files}Match in <Perl> sections
-
-new Apache::ExtUtils::pm function to generate Foo.pm/Makefile.PL
-templates for modules with directive handlers
-
-Makefile.PL will now do a handful of sanity checks looking for
-possible broken configurations and offer suggestions for those it
-finds
-
-rework PerlFreshRestart to avoid core dump triggered w/ 5.005_03
-
-fix $Apache::Server::Starting under dso
-
-use ap_bfileno() instead of r->connnection->client->fd directly
-[Paul J. Reder <rederpj@raleigh.ibm.com>]
-
-fix Table.xs:table_modify() under win32
-[Trung Tran-Duc <trung.tranduc@prague.ixos.cz>]
-
-get rid of odd WRITE message in perlio.pl test if $Config{usesfio}
-[John Hughes <john@calva.com>]
-
-fix possible overwrite in perlio.c:sfapacheread() #ifdef USE_SFIO
-[John Hughes <john@calva.com>]
-
-dont use DEFAULT_PATH if r->subprocess_env->{PATH} is already set
-[Bertrand Demiddelaer <wing_co@hotmail.com>]
-
-ensure perl_setup_env() is called just once per-request
-[Salvador Ortiz Garcia <sog@msg.com.mx>]
-
-:common Apache::Constants are compiled at bootstrap time, so CVs are
-shared and AUTOLOAD is avoided, which was known to cause a spin
-while loading SERVER_ERROR for particular Perl errors
-
-<Perl> sections now use 1.3.7-dev's cmd_parms->context to cure many
-known, old bugs, e.g. @DirectoryIndex outside of %Location, .htaccess
-and many more [Salvador Ortiz Garcia <sog@msg.com.mx>]
-
-fix bug where top-level PerlSetEnv's would be lost after 1st request
-
-fix bug in Apache::ModuleConfig->get [Dave Hayes <dave@jetcafe.org>]
-
-fix rwrite error message [Eric Cholet <cholet@logilune.com>]
-
-Change Apache::SizeLimit so that it supports Solaris 2.6 and above
-[Brian Moseley <ix@maz.org>]
-
-Fixed apaci/load_modules.pl.PL to properly fixup log_agent and
-log_referer when loaded as DSOs. [Vivek Khera <vivek@khera.org>]
-
-Fixed apaci/mod_perl.config.sh to remove the ccdlflags from the
-PERL_LIBS variable when building under bsd/os 4.x, since that causes
-errors when passing "cc" oriented flags to "ld". I suspect this
-should be done for all platforms, as passing cc options to ld just
-seems wrong to me. Also fixed up Makefile.PL to override Apache's
-notion of LDFLAGS_SHLIB_EXPORT to use Perl's idea of the proper flags
-when building as a DSO under APACI. [Vivek Khera <vivek@khera.org>]
-
-=item 1.19 - April 7, 1999
-
-Apache::Leak fixes for win32
-[Matthew Sergeant <Matthew.Sergeant@eml.ericsson.se>]
-
-Apache::Request upload tests are skipped #ifdef USE_SFIO
-
-$r->send_fd() will croak() #ifdef USE_SFIO
-
-added $r->mtime method [Andreas J. Koenig <andreas.koenig@anima.de>]
-
-fix so version info is not inserted too early (i.e. before Apache/x.x.x)
-
-new Apache::PerlRun::namespace_from() method, returns
-$r->uri - $r->path_info, can be overridden as Apache::RegistryNG does to
-return $r->filename instead
-
-some minor test fixups for when certain things are not installed and
-be sure $ENV{PERL5LIB} is used (Perl ignores w/ -T)
-
-print() now returns true on success, false on failure (1.3.6+)
-
-no longer set SIGPIPE handler if Apache >= 1.3.6
-
-fix bug triggered when siggv is not initialized, spotted by Preston Brown
-
-new Apache::PerlRun::flush_namespace method to undef() each [SAHC]V
-entry, rather than a blind clear (which triggered cores, e.g. sort)
-
-$r->custom_response will now return the current ErrorDocument
-
-Semicolon support in $r->args [ Eric Cholet <cholet@logilune.com> ]
-
-issue with threads in perl_config.c [ Malcolm Beattie
-<mbeattie@sable.ox.ac.uk> / Koichi Nakatani <nakatani@konica.co.jp> ]
-
-fix bug in PerlPassEnv spotted by Gerd Knops, where values were munged
-
-make sure per-dir PerlSetEnv happens after defaults are set (e.g. PATH)
-
-cure core dump with 5.005_03-threads
-
-ensure mod_perl/x.xx component is not added before Apache/x.x.x
-
-fix $ENV{MOD_PERL} value
-
-=item 1.18 - January 27, 1999
-
-if -DAPACHE_PERL5LIB is defined, feed the paths to @INC at startup
-
-prevent double mod_perl/x.xx in Server header under DSO
-[Jan Wedekind <jan.wedekind@de.uu.net>]
-
-Apache::Status HTML cosmetics + prefer Apache::Request over CGI.pm
-[Andreas J. Koenig <andreas.koenig@anima.de>]
-
-ensure Apache.pm is loaded (at least attempted) before checking $VERSION
-
-do not undef subroutines when flushing Apache::PerlRun::handler
-namespace unless subroutine lives in that namespace, i.e. not imported
-(no undef happens unless `B' module is loaded)
-
-untaint Apache::File->tmpfile (if $ENV{TMPDIR,TEMP} are used)
-
-'make test' fixups:
-
- -for when other modules (e.g. auth, dirindex, type)
- come before mod_perl in the module list
- -exit graceful if LWP is still not installed
- -skip module.t unless mod_{include,access} are configured
-
-loose @ISA 'DynaLoader' to avoid inheriting AutoLoader::AUTOLOAD
-
-added $r->server->timeout method
-
-skip tests that use xs/ap_ code if installed MMN is not equal to
-target MMN, since Apache releases may break binary compat
-
-Makefile.PL will look for --target=(\S+) in APACI_ARGS, if found use
-instead of the default `httpd' for 'make test'
-
-make sure ap_config_auto.h is picked up when PREP_HTTPD=1 (for
-non-distribution modules that use Apache::src to build)
-
-Fixed "broken" $VERSION's so CPAN won't be confused
-[ Ask Bjoern Hansen <ask@netcetera.dk> ]
-
-add some insurance so HTTP_* env variables should always be wiped
-
-fixed $r->finfo bug (properly set PL_laststatval)
-
-PerlRequire/PerlModule will not let the server start if there is an
-error (bug introduced in 1.16_xx), thanks to Brian Moseley for the spot
-
-5.005_54+usethreads port [Brian P Millett <bpm@ec-group.com>]
-
-fix -w command line logic for Apache::Registry
-[Honza Pazdziora <adelton@informatics.muni.cz>]
-
-$r->connection->aborted now returns the flag as-is (no c->fd test)
-
-fix bug in Apache::ModuleConfig->get($r) when $r isa subclass of Apache
-
-=item 1.17 - January 6, 1999
-
-change silly "Client hit STOP or Netscrape bit it!" message to a more
-reasonable message: "[modperl] caught SIGPIPE in process $$"
-
-don't register cleanups with the server-pool if we are a dso
-
-updated CREDITS
-
-internal $Apache::__T variable now properly set again, thanks to Stas
-Bekman for the spot
-
-fix so "top-level" Perl{Set,Pass}Env works if Perl is started early
-
-new $r->pnotes method
-
-$ENV{MOD_PERL} is not inherited by subprocesses
-
-no longer use -e with perl_parse()
-
-Apache::ExtUtils will complain if it can't determine the
-directive handler prototype (args_how), rather than fail during 'make'
-
-t/TEST =~ s/mod_perl_httpd.pid/httpd.pid
-[Bruce W. Hoylman <bhoylma@advtech.uswest.com>]
-
-use a "%s" format for ap_log_{r}error, so %'s in the log message
-string are not treated as format strings
-
-INSTALL updates [Tom Hukins <tom@eborcom.com>]
-
-=item 1.16_02 - November 30, 1998
-
-removed PERLV define, just use patchlevel.h's defines
-
-fix bug w/ push_handlers(PerlCleanupHandler => ...) spotted by
-Jan-Pieter Cornet and Philp Gwyn
-
-remove references to the deprecated CGI::Switch
-
-initialize %LocationMatch, %DirectoryMatch, %FilesMatch and tie to IxHash
-for <Perl> sections [Eric Cholet <cholet@logilune.com>]
-
-when <Perl> sections empty a symbol table, don't clear imported/aliased
-variables (e.g. %Config::Config)
-
-remove warning if Apache::Table was not already loaded
-
-sv2request_rec (Apache typemap) will look for '~' so xs modules can
-subclass without using a HASH ref (e.g. Apache::Request NG)
-
-<Perl> sections will always make sure Apache.pm is loaded
-
-=item 1.16_01 - November 24, 1998
-
-$r->connection->remote_addr can now be changed
-
-upgrade perl_PL.h to work with Perl 5.005_53+
-
-use absolute path for StrongholdLicenseFile
-[Todd R. Eigenschink <todd@tekinteractive.com>]
-
-only perl_section_self_boot() if an %Apache::ReadConfig:: entry is defined()
-this fixes a bug spotted by Eric Cholet where a startup file
-subroutine that accessed %Apache::ReadConfig:: would trigger a
-self-boot wipe-out
-
-add Perl/$] to Server: header if $Apache::Server::AddPerlVersion is true
-
-fixed refcnt bug in $r->current_callback
-
-some Apache::Constants updates (see the .pod) and new export() method
-
-ensure @INC value from startup time is always properly saved
-
-pod support '=for apache/=end apache' replaced with:
- =over to apache
- #directives for apache
- =back to pod
-
-Apache::FakeRequest now supports Apache::Constants and is documented
-[Andrew Ford <A.Ford@ford-mason.co.uk>]
-
-new Apache->define method works like IfDefine
-
-PerlRequire/PerlModule will start Perl if it is not already running
-
-(undocumented) $Apache::ReadConfig variable renamed $Apache::Server::SaveConfig
-
-SERVER_CREATE/SERVER_MERGE methods implemented for directive handlers
-
-new-ish xs modules added to win32 build: Apache::Log, Apache::File,
-Apache::Table, Apache::URI, Apache::Util
-
-new Apache::Table->new method
-
-two experimental options now on by default:
-PERL_SECTIONS_SELF_BOOT and ERRSV_CAN_BE_HTTP
-
-fix so $Apache::ReadConfig = 1; works again, thanks to Stas Bekman for the spot
-
-add support for new 1.3.4-dev M_* methods, M_PATCH, M_LOCK, etc.
-
-fix $r->log->debug when running under -T
-
-new Apache::Leak module
-
-new Apache::Symdump module
-
-allow $VirtualHost{'111.22.33.55'} = [...] syntax in <Perl> sections
-
-Perl*Handler commands will now call perl_startup() if Perl is not
-already running to cure dso problem [Daniel Jacobowitz <drow+@cs.cmu.edu>]
-
-plugged leak in mod_perl_tie_table()
-
-methods that return an Apache::Table object no longer attempt to
-'require Apache::Table' for you (well, maybe not next release, for now, you
-get a big: `WARNING: autoloading Apache::Table')
-
-rename PERL_VERSION macro to PERLV to avoid possibl future conflict
-
-rename Apache::Tie/Apache::TieHashTable -> Apache::Table
-
-Apache::PerlRun::handler will explicitly undef subroutines before
-"flushing" the namespace [Gunther Birznieks <gunther@nhgri.nih.gov>]
-
-Perl*Handler configuration will attempt to pre-load the argument as a
-module if it has a leading `+'. PERL_AUTOPRELOAD=1 or
-$Apache::Server::AutoPreLoad=1 will turn on auto-preloading for all
-Perl*Handlers except those which have a leading `-'
-
-Apache::URI->parse($r) without a $url argument will create a "self" url
-from $r->uri
-
-Apache::Registry will now allow DirectoryIndex to work even when
-ExecCGI is off. [ Ari Jolma <ajolma@ahti.hut.fi> / Ask Bjoern Hansen
-<ask@netcetera.dk> ]
-
-added HTTP_OK to Apache::Constants :http export tag
-
-fixed bug in Apache::ModuleConfig->getline
-
-Segfaults when build with Ben-SSL 1.27, and trying to exec the gcache.
-[ Michael Shields <shields@crosslink.net> ]
-
-Fixes for a clean compile with mod_ssl [ Salvador Ortiz Garcia
-<sog@msg.com.mx> ]
-
-Minor fix to the debug option in Apache::StatINC [ Ask Bjoern Hansen
-<ask@netcetera.dk> ]
-
-=item 1.16 - October 2, 1998
-
-Apache::Util::escape_html() now handles `"' and `&'. should also be a
-bit faster now, avoiding a strdup() call
-
-PerlPassEnv/PerlSetEnv will now call my_setenv() so the C enviroment
-array is also updated
-
-Apache::Registry will return DECLINED if -d $r->filename so
-DirectoryIndex, etc., will work again
-
-mod_perl now passes 'make test' on BSD/OS 3.1 again. [ Vivek Khera ]
-
-added INSTALL.simple.mod_ssl and SSL_BASE=... Makefile.PL option
-
-Apache::PerlRun::handler changes:
-
- - PerlRunOnce option
- - don't localize %INC, just remove new, non-.pm files
-
-fix bug that would hose child if a croak() happened, be it from a
-syntax error, Carp::croak(), etc. remove child_terminate() hack that
-was blaming the Perl stack being corrupt
-
-Apache::StatINC can now be configured to write debug stuff with
-a PerlSetVar [Ask Bjoern Hansen <ask@netcetera.dk>]
-
-perl_startup() will now check the Apache.pm $VERSION
-
-fixups for building Stronghold 2.4
-
-new Apache::File module
-
-send_fd() will now accept an optional length argument
-
-HTTP_NOT_MODIFED added to Apache::Constants EXPORT_OK, removed
-duplicate HTTP_NOT_ACCEPTABLE entry
-
-if there is a Perl parse error in <Perl> sections, return $@ so Apache
-can properly report the problem
-
-Apache::PerlRun subclass-able-ness near complete, see new example
-modules Apache::RegistryNG and Apache::RegistryBB
-
-fix compile problem under aix [Ed Hill <ed-hill@uiowa.edu>]
-
-fix 'make test' @INC problem under NT, thanks to Dale Couch
-
-=item 1.15_01 - September 19, 1998
-
-USE_DSO=1 may be fixed on some platforms w/ current 1.3.2-dev
-for those who are not, e.g. linux, can try a workaround by giving
-PERL_DSO_UNLOAD to Makefile.PL or by setting the PERL_DSO_UNLOAD
-environment variable
-
-fix bug in Apache::Registry if $r->uri eq "/", thanks to Mike Wertheim
-for the spot
-
-Added Doug Bagley's Apache::SizeLimit [Brian Moseley <ix@maz.org>]
-
-a Perl syntax error may corrupt the Perl stack, rendering the
-process useless, so we now child_terminate() if this is the case
-(thanks to Ken Williams for the Apache::Death bug illustration)
-
-<Perl> sections will now report configuration syntax errors
-
-added Apache::SubRequest->bytes_sent method
-
-added Apache::Server->register_cleanup method
-
-DYNAMIC=1 works again
-
-Apache::PerlRun will now save/restore %INC to cure problem with
-"library" files that don't include a package delaration
-
-global renames: $Apache::Server{Re}Starting -> $Apache::Server::{Re}Starting
-
-s/PERL_TIE_TABLES/PERL_TABLE_API/g
-
-fix Apache::URI so components can be properly undef-d, thanks to
-Charles C. Fu for the spot
-
-</Perl> match is now case insensitive, thanks to Randal Schwartz for
-the spot
-
-added Apache::Util::string_size function
-
-PerlDirectiveHandlers changes:
-
- -fix Apache::ExtUtils::command_table to properly deal with
- <Containers> inside HASH ref entries
- -now looks for a DIR_CREATE() method rather than new()
- -dir_merge() must now be DIR_MERGE()
- -order of $parms and $cfg args swapped
- -added missing FLAG directive handler
- -module.name is now the Perl package name, rather than Foo.xs
-
-add dTHR for PERL_TIE_SCRIPTNAME=1 [Michael Parker <parker@austx.tandem.com>]
-
-deprecate $r->cgi_{env,var}, $r->subprocess_env can do all that and
-them some
-
-when rwrite() returns -1, break out of the loop, no longer checking
-r->connection->aborted
-
-fix $...NameWithVirtualHost defaulting in Apache::PerlRun
-["Ryan A. Whelan" <rwhelan@2rad.net>
-
-r->as_string now uses table_do() and moved to xs
-
-use 1.3.2-dev+'s ap_custom_response() when possible
-
-remove Apache::DESTROY method (was only for avoiding old AutoLoader bug)
-
-Apache::exit fixed under Apache::PerlRun
-
-fix chdir_file() call in Apache::Registry so we go back to the original
-directory [Gerald Richter <richter@ecos.de>]
-
-added :override :args_how tags to Apache::Constants
-
-add DIR_MAGIC_TYPE to perl_handlers[] table for directory indexing
-modules
-
-Apache::Log optimizations/enhancements:
- $r->log now invokes ap_log_rerror (w/ 1.3.2-dev+)
- ${r,s}->log->$method() will now accept a CODE ref as its first
- argument, which is only called when LogLevel >= $method
- caller() file/line info determined only if LogLevel >= debug
- avoid copy of message SV
- log() method and aliases now in xs
-
-tweak Apache->module so it can test for configured .c modules
-
-pushing out experimental stuff:
- EXPERIMENTAL=1 (enables all experiments, except PERL_DEFAULT_OPMASK)
- PERL_GET_SET_HANDLERS=1 if PERL_STACKED_HANDLERS
- PERL_MARK_WHERE=1, PERL_TIE_SCRIPTNAME=1 if PERL_TRACE
-
-new $r->server->next method
-
-removed use of Term::ReadLine in Makefile.PL to make it work on
-systems with broken Term::ReadLines installed.
-[Ask Bjoern Hansen <ask@netcetera.dk>]
-
-fix Makefile.PL and Apache::src to find MODULE_MAGIC_NUMBER in ap_mmn.h
-
-if PERL_DESTRUCT_LEVEL < 0, skip perl_destruct(), etc. in perl_shutdown()
-
-add CLOSE method for tied *STD{OUT,IN}
-
-add config for mod_ssl and 'make test' [Lupe Christoph <lupe@alanya.m.isar.de>]
-
-PerlInitHandler is now aliased to PerlPostReadRequestHandler when
-configured a the "top-level", that is, not within any Location,
-Directory or Files, where it is still aliased to
-PerlHeaderParserHandler
-
-PerlCleanupHandler is now run by a register_cleanup(), rather than an
-alias for PerlLogHandler
-
-get rid of warning in Apache::RedirectLogFix [Brian Moseley <ix@maz.org>]
-
-added $r->internal_redirect method
-
-Apache::TieHashTable class enhancements:
-
- -get() in list context will return all values found for the given key
- -merge() and add() will accept an array reference of values
- -new method do()
-
-add -DMOD_PERL to apaci/configure for USE_APXS=1
-[Andrea Borgia <bab0069@iperbole.bologna.it>]
-
-set LD_RUN_PATH in Makefile.PL [Tom Hughes <tom@compton.demon.co.uk>]
-
-add =pod config support for '={begin,for} apache ... =end apache'
-
-move mod_perl_cleanup_av outside of #ifdef PERL_DIRECTIVE_HANDLERS to
-cure compile problem spotted by David-Michael Lincke
-
-Fixed problem with 'POST' requests when using Apache::Include
-[Doug Bagley <doug@dejanews.com>]
-
-make $r->connection->remote_ip set-able [Doug Bagley <doug@dejanews.com>]
-
-new experimental options PERL_SAFE_STARTUP and PERL_DEFAULT_OPMASK
-when httpd is starting, opcodes will be disabled during PerlModule,
-PerlRequire and <Perl></Perl>
-
- -PERL_SAFE_STARTUP=1 enables PerlOpmask directive
- if PerlOpmask is "default", use mask generated from src/opcodes.txt
- else it's a file to create the mask in the format of src/opcodes.txt
- if no PerlOpmask, no opcodes are disabled
- - 'make update_op_mask OPCODE_FILE=my_opcodes.txt && make'
- changes the default opmask generated from OPCODE_FILE
- -PERL_DEFAULT_OPMASK=1 disables PerlOpmask directive, forces default
- opmask on
- -PERL_ORALL_OPMASK=1 enables $r->set_opmask method for per-directory masks
- -new module Apache::Opcode for generating op_mask
-
-Fixed Apache::Util::ht_time test (util.t) so it doesn't fail without
-any reason
-
-added $r->finfo method
-
-Apache::Connection and Apache::Server will not be loaded by default if
-a PerlRequire file says: no mod_perl qw(Connection Server);
-
-Apache.xs cleanups:
-
- -move Apache::Connection code from Apache.xs to Connection.xs
- -move Apache::Server code from Apache.xs to Server.xs
- -remove Apache::fork stuff
- -remove max_request_per_client method (use Apache::Globals instead)
- -make sure server is up before runtests()
-
-=item 1.15 - July 24, 1998
-
-new experimental XS implementation of Apache::PerlRun/Apache::Registry
-handlers in module Apache::PerlRunXS (enable with PERL_RUN_XS=1)
-
-added $r->get_server_name method
-
-move /tmp/mod_perl_* to t/logs, t/conf
-
-alias Apache::Util unescape_uri -> Apache::unescape_url
-
-alias Apache::Log emerg -> emergency, crit -> critical
-
-deal with PL_ renaming in 5.004_76+
-
-fixes to support to apache_1.3.0+ssl_1.19 [Salvador Ortiz]
-
-add another dTHR so we build/run with threaded Perl again
-
-USE_APXS fixups:
-
- -use apaci/find_source instead of hard-coding files in apaci/configure
- -re-gen apaci/mod_perl.config before running apache/configure
- -chmod 0644, apaci/mod_perl.config
-
-=item 1.14 - July 18, 1998
-
-PERL_DEBUG=1 w/ USE_APACI=1 will properly link against libperld if exists
-
-remove mod_perl.pm_version file. move Makefile.PL-time generated code
-from mod_perl.pm.PL to mod_perl_hooks.pm.PL, remove mod_perl.pm.PL and
-ship with a mod_perl.pm again that is not modified by Makefile.PL so
-CPAN.pm can 'install mod_perl' again
-
-added Apache::Util module (enable with PERL_UTIL_API=1 or EVERYTHING=1)
-
-only break out of the write loop if rwrite() returns -1 and
-r->connection->aborted, otherwise continue
-
-added Apache::URI module (enable with PERL_URI_API=1 or EVERYTHING=1)
-
-register_cleanup to SvREFCNT_dec handler stacks, otherwise we leak
-during kill -USR1 when configuration is re-read
-
-TAINT_NOT just after perl_run(), otherwise 'make test' may choke (when
-it shouldn't):
- "Insecure dependency in eval while running with -T switch.
- Callback called exit."
-[Salvador Ortiz]
-
-move "rwrite returned -1" message from warn level to debug level
-
-Makefile.PL fix for 'make test' and --enable-shared= modules
-
-applied src/modules/perl/Makefile fixup for ApacheSSL
-[Iosif Fettich <ifettich@netsoft.ro>]
-
-experimental optimization for Apache::Constants if XS_IMPORT=1 is
-given to Makefile.PL:
-drop heavy Exporter::import/@EXPORT/@EXPORT_OK/%EXPORT_TAGS for
-Apache::Constants::import written in C, shaves ~25K from resident
-memory
-
-=item 1.13 - July 13, 1998
-
-fix Makefile.PL setting of numeric $User/$Group for 'make test'
-[Michael K. Sanders <msanders@confusion.net>]
-
-giving PERL_STASH_POST_DATA=1 to Makefile.PL will save
-read(STDIN, ...)/$r->read data in $r->subprocess_env for logging
-
-added Apache::Log module (enable with PERL_LOG_API=1 or EVERYTHING=1)
-
-add mod_perl.pm_version so CPAN.pm can 'install mod_perl' again
-
-ensure Apache::Server::CWD is untainted
-
-add support to compile with -DPERL_OBJECT (win32 + 5.004_73+)
-
-add dir_merge support for directive handlers
-
-$r->print/print will dereference \$scalar refs to strings so scripts
-can avoid string copies when sending data to the client,
-e.g. print \$large_string
-
-set $0 to .conf file name when inside <Perl> sections
-
-fixed $r->subprocess_env bug introduced in 1.12, spotted by Ken Williams
-
-'*CORE::GLOBAL::exit = \&Apache::exit' for 5.005-tobe+ Perls
-
-perl_startup will now call perl_init_i18nl10n(1), for 'use locale'
-
-Makefile.PL will now set CFLAGS="$PERL_EXTRA_CFLAGS" with USE_APACI=1
-thanks to help from Vivek Khera
-
-improve support for Makefile.PL USE_APXS=... to generate modperl.config
-
-add PERL_TIE_TABLES and PERL_DIRECTIVE_HANDLERS to EVERYTHING=1 group
-
-add some casts to avoid warnings from const char changes in 1.3.1-dev
-
-write_client will break out of its loop if rwrite returns a -1 error
-condition, which could cause spinning httpds otherwise
-[Eric Eisenhart <eric@sonic.net>]
-
-properly default $Apache::Registry::NameWithVirtualHost=1,
-thanks to spot by Ryan A. Whelan
-
-fix tied $r->err_headers_out cut-n-pasto [Peter Kaas <Peter.Kaas@lunatech.com>]
-
-Apache::read_client_block will now use safemalloc/safefree, rather
-than palloc, so memory is released after each read(), rather than at
-the end of a request. (e.g. so file uploads don't cause too much growth)
-
-Added mod_perl_method_handlers.pod file, a little article about using
-perl objects with modperl. [ ask@netcetera.dk ]
-
-Apache::Registry will now save END blocks just after the script is compiled,
-instead of after the subroutine call. otherwise, if the client breaks the
-connection, the hard_timeout will jump out of perl_handler(), and the save
-will never happen. Thanks to Robert Nice and Ben Laurie for spotting this.
-
-bug fix so PATH_INFO is properly reset, thanks to David Sklar for the spot
-
-=item 1.12 - June 14, 1998
-
-added a long overdue CREDITS file
-
-add SSLCacheServer{Port,Path} directives for ApacheSSL + 'make test'
-[Adam Laurie <adam@algroup.co.uk>]
-
-added $r->location method
-
-Various fixes and improvements to the APACI support:
-
- - Added support for PERL_THREADS to apaci stuff.
- This is needed under the bleeding edge Perl's
- (e.g. 5.004_6X).
- - Avoid more unnecessary file copies and edits under
- APACI situation.
- - Cleanup the PERL_XXX hooks in apaci/mod_perl.config[.sh]
- [Ralf S. Engelschall]
-
- - Add additional .xs.o target to apaci/Makefile.tmpl to
- workaround braindead Makes.
- [Brian P Millett <bpm@ec-group.com>]
-
-if $r->subprocess_env is called in a void context just call
-(void)perl_cgi_env_init(r)
-
-$ENV{PATH}: don't let perl_clear_env() clear its value
-
-prevent $r->dir_config SEGV if called during ChildInit,
-spotted by Lincoln Stein
-
-add a dTHR to perl_util.c for threaded 5.004_66
-[Brian P Millett <bpm@ec-group.com>]
-
-added $r->get_server_port method
-
-sfio read will now call Apache::read, as it should.
-Thanks to Steve Farrell for the spot
-
-added $r->last method
-
-$r->cgi_env when called in a void context will simply setup the
-subprocess_env table
-
-avoid some possible warnings in Apache.pm [Brian Mosley <ix@maz.org>]
-
-added $r->request_time method
-
-fix bug when PERL_MARK_WHERE was undefined spotted by Kermit Tensmeyer
-
-emulate pre-1.3b6 r->uri/r->proxyreq behavior for proxy requests
-inside the post_read_request_handler and add t/internal/proxy test
-
-added additional installation document INSTALL.apaci which
-describes the new APACI stuff (including background information).
-[Ralf S. Engelschall <rse@engelschall.com>]
-
-added new (but still optional!) Apache 1.3 support via the new Apache
-Autoconf-style Interface (APACI): The option USE_APACI=1 triggers a new
-build-environment (from local apaci/) for the APACHE_SRC/src/modules/perl/
-which provides a clean way (i.e. without patching anything inside APACHE_SRC,
-not even the Configuration file) of configuring mod_perl via a
-APACHE_SRC/src/modules/perl/mod_perl.config file. The completey configuration
-is enabled by just using the APACI command "configure
---activate-module=src/modules/perl/libperl.a"
-[Ralf S. Engelschall <rse@engelschall.com>]
-
-experimental tie of $0 to Apache->request->filename, enable with
--DPERL_TIE_SCRIPTNAME
-
-added little Apache::system that redirects output to the browser,
-should this be imported into Apache::{Registry,PerlRun} scripts?
-
-new Apache::Tie module, provides Apache::TieHashTable for a proper
-interface to Apache table structures. The following methods, called
-in a scalar context with no "key" argument, will return a HASH
-reference, where HASH is tied to Apache::TieHashTable:
-headers_in, headers_out, err_headers_out, notes, dir_config, subprocess_env
-enable with PERL_TIE_TABLES=1
-see also: t/net/perl/tie_table.pl
-
-remove Cwd::fastcwd usage from Apache::Registry, use
-$Apache::Server::CWD set at server startup instead
-
-new method Apache->chdir_file, use to replace
-chdir File::Basename::dirname($r->filename) in Apache::Registry
-
-replace Apache::Registry use of IO::File w/ Apache::gensym
-
-new function Apache::gensym (xsub, does same as Symbol::gensym)
-
-add $ServerRoot/lib/perl to @INC at startup
-
-add code to deal with 1.3b7-dev's SERVER_SUBVERSION replacement
-
-a few doc patches [John D Groenveld <jdg117@elvis.arl.psu.edu>]
-
-re-implemented $r->read to properly use *client_block methods and call
-reset_timeout after each read in the loop. until this is well tested,
-the method is called new_read. to test on tie'd STDIN reads, a startup
-script can say this:
-*Apache::READ = \&Apache::new_read;
-
-added setup_client_block, should_client_block and get_client_block
-methods
-
-modules/cgi test will attempt a fileupload of perlfunc.pod to
-file_upload.cgi if HTTP::Request::Common is installed
-(libwww-perl-5.09+) and $CGI::VERSION >= 2.39
-
-make $r->connection->aborted work as documented again, thanks to spot
-by Jens Heunemann
-
-swap order of stacked handlers so dynamic ones (push_handlers) are
-invoked after server .conf configured handlers
-
-replace uses of SvPVX() with SvPV() to prevent possible core dump if
-called with a non-string value
-
-added COMPILED REGULAR EXPRESSIONS section to mod_perl_traps.pod
-[David Landgren <david@landgren.net>,
-Mark Mills <mark@ntr.net>,
-Randal Schwartz <merlyn@stonehenge.com>,
-Jens Heunemann <heunemann2@janet.de>]
-
-have ldopts yank ExtUtils::Liblist message:
- Note (probably harmless): No library found for ...
-from stdout to stderr [Stas Bekman <stas@stason.org>]
-
-change Apache.xs/typemap so classes who inherit from the Apache class
-can invoke methods with a hash object, provided $hash->{_r} contains a
-request_rec object
-
-additions to experimental Perl directive support:
-- a per-directory config object is now passed as the first argument
- to directive handlers registered via Apache::ExtUtils->xs_cmd_table
- the object is a hash reference blessed into the same class as the handler
-- $r->dir_config with no args now looks for per-directory config in
- the caller's namespace
-- xs_cmd_table now looks for a prototype to determine TAKE1,
- TAKE2, TAKE3, etc.
-
-added $Apache::CurrentThreadId variable under win32
-
-added method/object handler tests to internal/stacked test
-
-fixed broken modules/eperl test spotted by Tom Mornini
-
-fixed Makefile.PL bug spotted by Jon Drukman w/ PERL_CHILD_EXIT=1
-in fact, PerlChildInitHandler/PerlHandlerExitHandler are always
-enabled by default now with 1.3bx+
-
-added experimental get_handlers/set_handlers methods
-(enable with PERL_GET_SET_HANDLERS=1)
-
-new module Apache::PerlRun, splits out Apache::Registry functionality
-and provides a `dirty-perl' handler (see pod). thanks to Stas Bekman
-for testing and suggestions.
-
-PERL_OBJECT_HANDLERS now enabled #ifdef PERL_METHOD_HANDLERS
-
-widen scope of mutex lock under win32 to avoid possible deadlock
-[Gerald Richter <richter@ecos.de>]
-
-fixed bug in directory_merge where FLAG directives would inherit `On'
-from the base configuration, even if the directory explicitly had the
-flag turned `Off', this was the case for PerlSendHeader and
-PerlSetupEnv. thanks to Mark-Jason Dominus for the spot.
-
-added `grab' function to Apache::test, which fetches a url and gives
-diagnostics as to validity of the HTTP response
-(a test for properly formatted headers!)
-
-=item 1.11 - April 21, 1998
-
-Apache::SIG enhancements for LogFormat [Doug Bagley <doug@dejanews.com>]
-
-drop API_EXPORTs for mod_include #perl stuff which breaks under win32/1.3b6
-spotted by Jeff Baker
-
-Inclusion of $r->server->server_hostname if $r->server->is_virtual in
-Apache::Registry script namespaces is back to On by default after
-recently tripping up Ben Laurie, Janos Farkas, Tony Bowden. To
-disable (only gain is to conserve memory) in a startup file set:
- $Apache::Registry::NameWithVirtualHost = 0;
-
-work around bloody make problem "don't know how to make Apache.c Constants.c"
-spotted on SCO by Krister Keskitalo (along w/ 1-2 others in the past)
-
-fix Makefile.PL for apache-1.2.6+ssl_1.16
-[Stefano Santoro <ssantoro@voicetek.com>, Dan Peterson <pete@spry.com>]
-
-removed obsolete src/Makefile.tmpl and src/Makefile.tmpl-Ben-SSL files
-
-new module Apache::ExtUtils, currently with one method to generate xs
-code so Apache/Perl modules can add their own directives to Apache rather
-than use PerlSetVar (just some more rope, really)
-
-1.3b6 compat:
-- deal with ap_ API prefixing
-- t/modules/embperl will warn on failure:
->>> NOTE: Be sure to rebuild HTML::Embperl against Apache 1.3b6+
->>> Try 'make test' again after doing so.
-
-experimental: #ifdef PERL_OBJECT_HANDLERS, mod_perl will thaw objects
-from Perl*Handler strings such as `$Global::Object->method'
-
-$r->custom_response will now work under win32 with 1.3b6-dev+
-
-added win32 test enhancements suggested by Gerald Richter
-
-added mod_perl_cvs.pod document
-
-=item 1.10 - March 21, 1998
-
-rid of SEGV in PerlChildExitHandler spotted by Eric Cholet
-
-#ifdef USE_THREADS, don't hard_timeout/kill_timeout, SIGALRM causes hangage
-
-=item 1.09 - March 19, 1998
-
-rid of stupid "can't bootstrap Apache::Constants outside of httpd" message
-
-added r->content_languages method
-
-added htdocs/manual/mod/mod_perl.html (generated from Apache::ModuleDoc)
-
-now support <Perl> under win32 (requires 1.3b6-dev+)
-
-PerlChildExitHandler is now implemented via register_cleanup() rather
-than the module child_exit hook (which might go away!)
-
-support Apache::Constants tags `override' and `args_how', for Apache::Module
-
-'make test' will now work again under win32
-
-applied Apache::Symbol/Apache::StatINC patches from Chris Dean
-
-fixed bug in Makefile.PL that would tack `aix' onto INCDIR w/ apache
-1.2.x, spotted by Mike Klein
-
-removed uneeded check for HTTP_AUTHORIZATION from perl_setup_env()
-
-fixup perl_section_self_boot so it doesn't try to read config
-if keys %Apache::ReadConfig:: < 1
-
-perl_section_self_boot thang will now work w/ PerlRequire'd files too
-
-compile @Apache::Constants::EXPORT subroutines at boot time (rather
-than AUTOLOAD in each process)
-
-added internal/error.t test to test the new feature below
-
-ErrorDocument's can now access the $@ that threw SERVER_ERROR via
-$@{ $r->prev->uri }
-
-added internal/rwrite.t test to test printing of HUGE strings
-
-1.3b6 compat:
-- tmp fix for new r->server->names type
-- adapt to SERVER_BUILT change to apapi_get_server_built()
- for Constants.xs
-
-fixed print $HUGE_buffer bug w/ ApacheSSL spotted by Jirka Hejsek
-
-added WRITE method for tied filehandles
-
-fix so threaded Perl can have <Perl> sections
-
-Perl 5.004_61 dropped -DUSE_THREADS from $Config{ccflags}, Makefile.PL
-will now test $Config{usethreads} and add the flag itself
-
-fixed eg/registry.pl sytax erros thanks to David Landgren
-
-fix #ifdefs so we build under win32 again
-
-config files now support =pod/=cut and __END__ in the same fashion Perl does
-
-fix Makefile.PL so it can handle \'ed lines with help from Tom Hukins
-
-Apache::Symbol::handler will skip all Devel::Symdump undef's so
-make_universal will work properly
-
-=item 1.08 - February 20, 1998
-
-Apache::Registry will now fold multiple /'s to fix possible bug
-spotted by Gerald Richter
-
-fix Apache/Makefile.PL and Constants/Makefile.PL so DYNAMIC=1 works
-with 1.3b5 (new include directory)
-
-Constants.xs will now #include mod_perl.h so namespace #undefs are used
-
-fixup some #define clashes on aix thanks to Eric Bartley
-
-fixed Makefile.PL workaround for plucking SSL_INCLUDE with help from
-Dan Peterson
-
-can build again with threaded Perl (was just missing a few dTHR's)
-
-cleared up BEGIN/END documenation with help from John Charlesworth
-
-applied patch from Christopher McCrory so -f is also used when 'make
-test' httpd is started so it'll work with a .rpm file for a redhat
-linux
-
-added Apache::Constants->name method
-
-fix an #endif; in mod_perl.h thanks to Eric Bartley
-
-mod_perl_cleanup_handler won't try to if(cld) MP_RCLEANUP_off(cld);
-#ifdef WIN32 to stop crash spotted by David Hodson
-
-expose stacked handlers to Perl via %Apache::PerlStackedHandlers
-(this is only those pushed via $r->push_handlers)
-
-can now tell Makefile.PL APACHE_INCLUDE_INSTALL=0 if you don't want
-header files installed
-
-when Apache::Status tries to load optional modules, it will locally
-turn off $SIG{__DIE__} to fix bug spotted by Dan Peterson
-
-added SERVER_BUILT to Apache::Constants
-
-got rid of "Use of uninitialized value." warning in perl_util.c seen
-when running HTML::Embperl, hunted down by Todd Eigenschink and Gerald
-Richter (listed as change in _04, but was lost!)
-
-fixed Makefile.PL so it can deal with metacharacters when copying the
-apache source include files, otherwise src.pm breaks, thanks to Dan
-Peterson for the spot
-
-=item 1.07_04 - February 10, 1998
-
-fix "building mod_perl by hand" bug w/ 1.3bx spotted by Brian Mosley
-
-no longer force 'PerlSendHeader On' for sub-requests which triggered a
-bug spotted by Doug Bagley and Gerald Richter
-
-Fix "Attempt to free unreferenced scalar." during kill -HUP w/
-PerlFreshRestart On and <Perl> in httpd.conf spotted by Brian Mosley
-
-clear endav and stacked_handlers on FreshRestart
-
-fix bug spotted by Gerald Richter where Apache->register_cleanup would
-cause a core dump
-
-Apache->module will no longer eval "require $module", it will now
-return true if the module is in %INC, false otherwise
-
-fix so END blocks encountered at startup are run at shutdown
-(I think one of the 1.07_xx version broke it)
-
-If exists, Makefile.PL will add /usr/local/stronghold/conf/httpd.conf's
-StrongholdKey to t/conf/httpd.conf for 'make test' for you
-
-Makefile.PL will edit Stronghold's Makefile to replace:
-"CFLAGS=$(CFLAGS)" with 'CFLAGS=$(CFLAGS)' so the SUBVERSION thang works
-
-fix $r->custom_response problem spotted by Brian Mosley so it works
-with SERVER_ERROR
-
-added new method child_terminate
-
-fix $r->current_callback so it can be called during startup
-
-perl Makefile.PL PERL_DEBUG=1 will:
--add `-g' to EXTRA_CFLAGS
--turn on PERL_TRACE
--set PERL_DESTRUCT_LEVEL=2
--link against libperld if -e $Config{archlibexp}/CORE/libperld$Config{lib_ext}
-
-Apache::Constants :common export tag no longer includes
-OPT_EXECCGI (was held off from 1.07_01's Changes Apache::Constants
-cleanup waiting to make sure HTML::Embperl and Apache::ePerl didn't
-rely on OPT_EXECCGI to be exported by default. both look fine now)
-
-added workaround Apache::RedirectLogFix module to work around the
-re-introduced log bug below
-
-to fix a double-header send bug spotted by Doug Bagley, backed out
-this Change from 1.06:
- Apache::Registry will return REDIRECT if $r->header_out("Location")
- so the request is logged properly, thanks to spot by Jon Drukman
-
-added experimental PerlRestartHandler
-(enabled with PERL_RESTART_HANDLER=1, note: _not_ enabled with EVERYTHING=1)
-
-moved Apache::sv_name function to the new Apache::Symbol package
-
-Apache::StatINC will call Apache::Symbol's undef_functions method for
-.pm classes if PerlSetVar UndefOnReload is On
-
-before re-compiling, Apache::Registry will now check if
-$package->can('undef_functions'), if so, invoke that method
-
-added Apache::Symbol module with an undef_functions method
-
-Apache->server_root_relative now defaults to "" when no
-filename/directory name argument is given (ie returns ServerRoot)
-
-made PERL_TRACE more useful with levels set via environment variable
-MOD_PERL_TRACE:
-d - trace directive handling during config read
-s - trace processing of perl sections
-h - trace Perl*Handler callbacks
-g - trace global variable handling, intepreter allocation, END blocks, etc.
-all - all of the above
-
-will add -DSTRONGHOLD to CFLAGS if build against stronghold, thanks to
-Todd R. Eigenschink
-
-fix Makefile.PL's parsing of SERVER_SUBVERSION, spotted by Paul Sutton
-
-$r->send_http_header can now accept an optional second argument, if
-present will set $r->content_type
-
-PerlPassEnv, PerlRequire and PerlModule now use an array_header
-structure for internal storage
-
-1.3b4 compat:
-- adapt to new table api changes (with help from Rob Hartill and Dean Gaudet)
-- adapt to *.h move to the new src/include directory
-
-Apache::Status enhancements:
-- "Loaded Modules" will now report last modified time
-- "packages" are now links, click, symbol table dump
-- now that packages are links, no longer do recursive dump
- (recurse yourself via hyperlinks, much easier to read!!!)
-- hashes, scalars and arrays are now links,
- click, Data::Dumper Dump (only if PerlSetVar StatusDumper is On)
-- functions are now links, click, subroutine info (requires the B module)
-- dump of any type also has a link "Peek Dump"
- (only if PerlSetVar StatusPeek is On and Apache::Peek is installed)
-- dump of any type also has a link "OP Tree Graph"
- (only if PerlSetVar StatusGraph is On)
- (requires the B and B::Graph modules and the dot program)
-- added t/modules/status test
-
-with the -DPERL_MARK_WHERE experimental feature enabled, there's a
-chance you'll never see "Use of uninitialized value." again without
-some more useful information, nor will you see '-e' reported outside
-of Apache::Registry
-
-perl_destruct_level can now be set via the environment variable
-PERL_DESTRUCT_LEVEL or -DPERL_DESTRUCT_LEVEL
-
-turn default perl_destruct_level down from 2 to Perl's default of 0
-
-use a copy of apache's ap_cpystrn against versions < 1.3b4-dev
-
-got rid of "Use of uninitialized value." warning in perl_util.c seen
-when running HTML::Embperl, hunted down by Todd Eigenschink and Gerald
-Richter
-
-added modules/src test for Apache::src
-
-documented Apache::src
-
-the Apache::src->new method will now default to the first
-auto/Apache/include directory found relative to @INC
-
-the apache header files (*.h) will now be installed in
-$(INST_ARCHLIB)/auto/Apache/include
-
-fix $Apache::ServerStarting bug that broke 'make test' w/ ApacheSSL
-and Stronghold spotted by Vivek Khera
-
-remove the need for File::Copy's mv() function, since it can't seem to
-decide if it has one or not
-
-_03's new tests assumed PerlCleanupHandler was enabled, fixed now
-thanks to spot by Rob Hartill
-
-Makefile.PL will now chmod a+x t/net/perl/* t/net/perl/io/*
-thanks to Rob Hartill
-
-experimental features can be enabled with -DDEFINEs instead of
-$variables or %ENV, changes to Makefile.PL make them simple to add,
-see eg/makepl_args.mod_perl for even simpler
-
-added eg/makepl_args.mod_perl
-
-the makepl_args.mod_perl can now have multiple lines, space, #comments
-and empty newlines are ignored, stops reading if it hits __END__
-
-Makefile.PL will now also look for $ENV{HOME}/.makepl_args.mod_perl
-and read in if exists
-
-before clearing handlers stacked via Apache->push_handlers at the end
-of each request, save the PerlChildExitHandler stack and putback after
-the clear. this way, modules pulled in at server startup can say:
-Apache->push_handlers(PerlChildExitHandler => sub {})
-
-a "top-level" mod_perl per-directory directive would cause core dump
-inside <Perl> sections. now trap that and exit with message that the
-directive should be inside a containter e.g. %Location, %VirtualHost
-(not sure what the real problem is here)
-
-re-work PERL_SECTIONS_SELF_BOOT stuff so it calls perl_section() directly,
-rather than perl_eat_config_string("<Perl>\n</Perl>"), because:
-- it no longer core dumps when a "top-level" per-server directive is found
-- it no longer requires 1.3b3+ (1.2.x will work)
-- it is faster
-
-PerlModule/PERL_SECTIONS_SELF_BOOT will delete $INC{$PerlModule} on
-the first config read pass, so it's re-read on the second pass
-
-if ($] < 5.004_04) Makefile.PL will warn that users should upgrade to
-5.004_04 or higher
-
-removed Apache::PerlSections' self test now that we have
-modules/psections.t and it won't work without the =pod line.
-
-remove =pod line from Apache:: modules (SIG, fork, Resource,
-PerlSections) to stop 5.004's pod2man's bogus warnings spotted by
-Eric Cholet
-
-fixed but in $r->get_remote_host, which was forcing the default type
-REMOTE_NAME even if another type was passed as the optional second argument
-
-renamed eg/perlio.pl to eg/test.pl
-
-moved SUPPORT section from INSTALL doc to its own file
-
-fixed auto-set of $ServerRoot bug in Apache::httpd_conf
-
-get rid of -Wall warning in Apache::sv_name
-
-=item 1.07_03 - January 8, 1998
-
-removed "[notice] mod_perl restarted" message since it doesn't go to
-the error_log as it should, spotted by Vivek Khera and Paul Phillips
-
-fixed corrupted $ENV{TZ} spotted by Michael Parker
-
-cut out 'make test' error_log noise, anything there now should only be
-an error or a non-error [notice]
-
-make Apache::Resource simpler to configure, to use w/ all defaults
-(1.3bx + PerlChildInitHandler required):
-PerlSetEnv PERL_RLIMIT_DEFAULTS On
-PerlModule Apache::Resource
-
-Makefile.PL will now:
-mv "t/conf/httpd.conf", "t/conf/httpd.conf.old"
-so httpd.conf is re-generated when Makefile.PL is re-run
-
-added new module Apache::src for finding it and picking out bits-n-pieces
-
-get rid of some <Perl> section warnings with help from Doug Bagley
-
-improved register_cleanup tests
-
-applied $r->register_cleanup patch from Doug Bagley to properly call
-MP_RCLEANUP_off after cleanups are run
-
-perl Makefile.PL can now accept ADD_MODULE, Makefile.PL will (s/,/ /g)
-and uncomment the list of modules from src/Configuration
- e.g.:
- ADD_MODULE=unique_id,proxy,info
-
-perl Makefile.PL can now accept PERL_EXTRA_CFLAGS, Makefile.PL will
-(s/,/ /g) which are added to EXTRA_CFLAGS
- e.g.:
- PERL_EXTRA_CFLAGS=-DFOO=1,-DBAR=2
-
-if the file `makepl_args.modperl' is present in . or .. it will be read into
-@ARGV, e.g. might contain EVERYTHING=1 DO_HTTPD=1
-
-fixes for 1.3b4-dev compat
-- get rid of AuthName space in generated .htaccess file for
- internal/hooks test
-
-if a PerlModule defines something in %Apache::ReadConfig <Perl>
-sections are run without need to actually have <Perl></Perl> in
-httpd.conf, i.e. httpd.conf could be nothing more than:
- PerlModule Apache::httpd_conf
-whilst experimental, enable by setting the envrionment variable
-PERL_SECTIONS_SELF_BOOT to something true
-
-experimental feature, modules can 'exit|die AUTH_REQUIRED;' or with
-any HTTP error code and that response is sent rather than SERVER_ERROR
-to test enable by setting $Apache::ERRSV_CAN_BE_HTTP = 1
-
-take CGI.pm version check out of Apache::Registry, now that we require
-5.004+, they'll have at least 2.36
-
-get rid of "Use of uninitialized value at -e line 65535" warning
-caused by perl_run_rgy_endav() spotted by Doug Bagley
-
-if there is an error inside <Perl>, filename and line number are now
-displayed in the error message, e.g.
-syntax error at t/conf/httpd.conf line 25
- instead of
-syntax error at (eval 1) line 2
-
-Apache::RegistryLoader->handler will now strip leading '/' when $uri is
-server_root_relative and no $filename is present
-
-Apache::Status menu item "Perl Section Configuration"
-(only if $Apache::ReadConfig is true)
-
-added Apache::Status menu item "Enabled mod_perl Hooks"
-
-added mod_perl.pm functions hook() and hooks()
-
-go back to internal <Perl> sections package name ApacheReadConfig
-
-Apache::PerlSections stuff:
-- added handy store method for writing dump() to disk
-- fixed self-test
-- updated docs to reflect new output format
-
-Apache::test stuff:
-- added run method
-- added MM_test method for Makefile.PL's to say:
- *MY::test = \&Apache::test::MM_test
-
-some httpd_conf.pm stuff:
-- added server_url method
-- added catch_signals method to terminate httpd on __DIE__ or INT
- ($conf->server_start calls this by default)
-- when httpd.conf is written, set BaseDir in a BEGIN block
-- drop trailing slash from Alias'
-- fix write() method's assignment of %$self to *Apache::ReadConfig::
-
-fix possible core dump when calling gv_fetchmethod()
-
-=item 1.07_02 - December 22, 1997
-
-fixed perl.exp thang on aix
-
-added tests t/modules/httpdconf.t and t/modules/perlsections.t
-
-added Apache::httpd_conf module
-
-if variable $Apache::ReadConfig is true, don't undef the <Perl>
-section eval package %Apache::ReadConfig::
-
-output of Apache::PerlSections->dump is now suitable to be eval'd
-
-added Apache->httpd_conf method (just pushes into
-@Apache::ReadConfig::PerlConfig and requires 1.3b3+)
-
-renamed package <Perl> sections are proccessed in
-from ApacheReadConfig to Apache::ReadConfig
-
-ensure values of %Location keys, etc. in <Perl> sections are HASH refs
-to stop possible core dump spotted by Stuart Frew
-
-fixed memory leak in $r->push_handlers() with help from Gerald Richter
-
-added new items to Apache::Status: "Environment",
-"Perl Configuration", and "Signal Handlers"
-
-when %ENV is setup, my_setenv() is now called so subprocesses will inherit
-
-"top-level" PerlSetEnv variables will now be set during server startup
-
-got rid of unintialized warning in Apache::Status
-
-$r->custom_response will now add the `"' needed if arg is not a url or
-filename
-
-added new Constants CONTINUE and NOT_AUTHORITATIVE as aliases for DECLINED
-
-change the `PerlScript' directive name to `PerlRequire' as suggested
-by Dick Hardt (PerlScript will still work, but is not documented)
-
-set variable $Apache::ServerStarting to 1 during perl_startup()
-
-set variable $Apache::ServerReStarting to 1 during perl_restart()
-
-Apache::SIG->set is now called at server startup by default
-
-applied patch from Doug Bagley to stop possible infininite loop in
-Apache->read
-
-create stacked_handlers = newHV() before modules are loaded,
-so PerlModule's can do things like:
- Apache->push_handlers(PerlChildInitHandler => sub {
- srand(time ^ $$);
- });
-
-$r->args can now be modified as suggested by Joel Truher
-
-remove obsolete (and broken) iedit of t/net/perl/cgi.pl thanks to
-Vivek Khera
-
-Apache::Resource now correctly converts MB values
-
-=item 1.07_01 - 12/1/97
-
-added t/internal/stacked test
-
-updated the FAQ from Frank Cringle
-
-added Apache::fork module which override's Perl's built-in fork() and
-provides a forkoption function, contributed by Michael Turner
-
-can now build/run w/ 5.004_55 threaded Perl
-
-added Apache::Status item for PerlScripts
-
-there can now be multiple PerlScript files in *.conf and .htaccess
-(same behavior as PerlModule)
-
-ServerRoot is now pushed into @INC at server startup
-
-filename argument to log_reason is now optional, defaults to $r->uri
-
-Apache::Constants cleanup:
- - @EXPORT now only holds items in :common
- - re-organized tags (adding some new ones)
- - added some documentation!
-
-$r->get_remote_host can now take an optional type argument, default is
-still REMOTE_HOST, other valid options are Apache::Constants :remotehost
-
-added new Apache::Constants tag :remotehost (for $r->get_remote_host)
-with new constants:
- REMOTE_HOST REMOTE_NAME REMOTE_NOLOOKUP REMOTE_DOUBLE_REV
-
-added new Apache::Constants tag :satisfy (for $r->satisfies)
-with new constants:
- SATISFY_ALL, SATISFY_ANY, SATISFY_NOSPEC
-
-added new method $r->satisfies
-
-added new method $r->some_auth_required
-
-`METHODS' Apache::Constant added to import tag :methods
-
-perl_stdout2client() will now set $| instead of perl_handler(), so
-thanks to Salvador Ortiz for the tip
-
-PerlSetEnv will now call my_setenv() underneath thanks to Tim Bunce
-for the tip
-
-fix mod_perl_traps.pod typo so it can install, spotted by Brian Tiemann
-
-=item 1.07 - 11/25/97
-
-added notes from Larry Denneau and Michael Smith on building with
-mod_auth_dbm to mod_perl_traps.pod
-
-added $r->custom_response method
-
-$r->proxyreq can now be set
-
-'use Apache qw(warn);' will now work during server startup
-
-fixed loading of PerlScript, so errors are reported!
-(your PerlScript must "return a true value")
-
-fix TEST.win32 thanks to Peter Tillemans
-
-s/DEFAULT_RSS_LIMIT/DEFAULT_RLIMIT_RSS/ in Apache::Resource
-thanks to Jarkko Hietaniemi
-
-fix Apache::RegistryLoader bug spotted by Brian Mosley
-
-changed "Options ExecCGI" to "Options +ExecCGI" in httpd.conf-dist to
-fix problem in 'make test' seen by Frank Ridderbusch
-
-=item 1.06 - 11/20/97
-
-fixed core dump seen under linux if PerlChild{Init,Exit}Handler is
-defined (bug was introduced in 1.05 when PerlDispatchHandler was added)
-
-added new module Apache::Resource
-
-fix core dump in $r->notes when val is an IV, spotted by Dwayne Fontenot
-
-get rid of "use of uninitialized value" from <Perl></Perl> pointed out
-by Joel Wagner
-
-fixed strict refs bug in Apache::PerlSections spotted by Brian Mosley
-
-Apache::Registry will return REDIRECT if $r->header_out("Location")
-so the request is logged properly, thanks to spot by Jon Drukman
-
-call mod_perl_pass_env() during perl_startup() so PerlScript and
-<Perl> sections can see PerlPassEnv variables
-
-mkdir t/logs so we can run tests with ApacheSSL
-
-Makefile.PL will add -I$(SSL_BASE)/include to EXTRA_CFLAGS for ApacheSSL
-
-fix core dump with 1.3b3-dev
-
-=item 1.05_01 - 11/15/97
-
-If Apache::SIG is set, don't install the default $SIG{PIPE}="IGNORE"
-
-added PerlPassEnv directive suggested by Joel Wagner
-
-stop core dump in Apache::exit spotted by Joel Wagner if called as a
-function, too early (before PerlHandler) without having called
-Apache->request($r)
-
-fixed bug spotted by Roland Friedwagne where CGI.pm-2.37bx's header()
-method (Apache->send_cgi_header underneath) would not work unless
-PerlSendHeader was On (added new tests to internal/headers.t to make
-sure from now on!)
-
-applied patches from Peter Tillemans so we can run the test suite
-under win32
-
-applied win32 patches from Peter Tillemans so perl_handler() is mutex
-locked and to cut out Makefile.PL attempt to symlink the eg directory
-
-Apache::test will define the bootstrap method for Apache and
-Apache::Constants to quiet 'make test' noize spotted by Andreas
-
-=item 1.05 - 11/06/97
-
-no longer include $r->server->server_name as part of the
-Apache::Registry uri->package name translation by default. if you
-*really* need this to happen set this in PerlScript:
- $Apache::Registry::NameWithVirtualHost = 1;
-and, please tell me why you need it, we'll figure out a better way
-
-yanked DeleteINC thingy from StatINC
-
-applied patch from Randal Schwartz so StatINC doesn't loop when it has
-to reload itself
-
-disable CV cache of stacked handlers for now, they stick around too
-long, e.g. Apache::StatINC won't work, thanks to Randal Schwartz for
-spotting this
-
-applied patch from Ben Reser so $r->send_fd returns the length (as it
-should have been doing)
-
-added current_callback() method handy for PerlDispatchHandler's
-
-added suggestion from Andreas for a PerlDispatchHandler hook
-
-re-worked code in perl_load_startup_script() that was causing IRIX 6.x
-to choke when saving dowarn, thanks to Lasse Petersen for tracking
-this down
-
-fixed newline eating bug spotted by Eckard Brauer when headers and
-body are sent in the same print() statement
-
-renamed 'core' test directory to 'internal'
-
-remove t/TEST's search for obsolete directories, which caused trouble
-on IRIX 6, spotted by Lasse Petersen
-
-for internal redirects (spotted by $r->cgi_header_out), don't
-perl_call_halt(), instead, tie STDOUT to the Apache::FakeRequest class
-which just soaks up print() output.
-
-suggestion from Salvador Ortiz, for table methods, if value is
-undef, call table_unset underneath, these methods are subprocess_env,
-header_in, header_out, err_header_out, notes and dir_config. e.g.:
-
- $r->header_out("Content-length" => undef);
-
-ensure constant subroutine re-definition warnings are surpressed
-during restart (when PerlFreshRestart On), spotted by Vivek Khera
-
-added Apache::FakeRequest module
-
-added tests for embperl and eperl
-
-applied patch from Lupe Christoph so Makefile.PL will not throw out
--DSERVER_SUBVERSION if present in apache_x.x.x/src/Configuration
-
-fixed bug in Apache->send_cgi_header that was sending headers twice
-with "here" docs, spotted by Leonard Megliola
-
-Apache->server->log_error will return undef if logs are not open yet
-as suggested by Mike Fletcher
-
-fixed typo bug in Apache::Status spotted by Brian Tiemann
-
-=item 1.04 - 10/30/97
-
-PerlScript and -Mmod_perl are no longer handed to perl_parse(),
-instead perl_parse() gets a -e to set $ENV{MOD_PERL} and
-$ENV{GATEWAY_INTERFACE} (and possibly other switches -T, -w)
-PerlScript is pulled in via 'do $PerlScript';
-
-applied patch from Ron Hawkins to fix bug in perl_setup_env() when
-running with Stronghold in secure mode
-
-added Apache::PerlSections module, currently with one method: dump()
-
-for use in <Perl> sections, PerlScript and PerlModules, can now say
-'my $s = Apache->server' during server startup, which returns a
-server_rec* blessed into the Apache::Server class just as $r->server
-does during request time.
-
-Apache::Server class can now warn() and log_error()
-
-avoid using LWP::Simple so we don't get caught up on HTTP_PROXY which
-was cause 'make test' to fail several tests for some people.
-thanks to Philippe Froidevaux, Tom Hughes and Frank Cringle
-
-added some 3rd-party tests for Apache::Stage and Apache::Sandwich
-
-added Apache::test module
-
-back out support for internal redirects, caused big problems with
-sfio-enabled Perl spotted by Lupe Christoph and Salvador Ortiz
-(can still try by setting $Apache::DoInternalRedirect=1 #ifndef USE_SFIO)
-
-added Apache::SIG module for testing
-
-Apache::exit will not rflush if r->connection->aborted
-
-updated Vivek's mod_perl_tuning.pod
-
-now that 1.3b3-dev config gears are not tied so tight to a FILE*,
-<Perl> sections may define $PerlConfig and/or @PerlConfig, who's
-string values are fed to the apache config
-
-some mod_perl.pm fixes
-
-Apache::Status "Loaded Modules" item enhancements:
--now shows file location
--can click on module package for dump of its symbol table
--pretty table format
-
-don't add -I. to perl_startup() which may cause confusion spotted by
-Mike Fletcher
-
-make _sure_ perl_per_request_init() is called for sub-requests so
-everything works properly, e.g. Action or a mod_include'd #perl
-thanks to Peter Levart and Scott Holdren for spotting this
-
-=item 1.03 - 10/23/97
-
-configure/build/INSTALL enhancements with much help from Bowen Dwelle:
-- to use an apache Configuration file that mod_perl will not edit:
- perl Makefile.PL CONFIG=Configuration.custom
-
-- perl Makefile.PL DYNAMIC=1 ALL_HOOKS=1 ...
- Configure mod_perl with ../apache_1.2.4/src ? [y]
- Shall I build httpd in ../apache_1.2.4/src for you? [y] n
- now, $APACHE_SRC/modules/perl/Makefile will be enabled with those hooks
-
-- to aid EXTRA_CFLAGS when building by hand or using a custom
- Configuration file: `perl -Mmod_perl -e subversion` prints:
- SERVER_SUBVERSION=\"mod_perl/$mod_perl::VERSION\"
-
-- fixed up INSTALL quite a bit
-
-added $r->post_connection alias for $r->cleanup_handler
-
-if 1.3b2+, drop log_error(), use new aplog_error() instead (everywhere)
-
-if Tie::IxHash can't be loaded for <Perl> sections, don't complain
-
-applied patch from Rob so mod_perl.pm is in the tar_Apache target
-
-removed Apache->request depreciation warning
-
-added redirect.t test to test remote redirect and internal redirects
-
-fixed internal re-direction handling of Location: /local/file.html
-
-removed several eg/ scripts that were "ports" of CGI.pm-x.xx/examples
-now that CGI.pm runs solid under mod_perl and mod_perl requires
-5.004+, there's no need for $r->print and CGI::Switch, so those
-examples don't need "porting"
-
-force 'PerlSendHeader On' for sub-requests, e.g. Apache::Sandwich
-so headers don't show up in the browser
-
-fixed PerlSendHeader bug with virtual includes spotted by Scott Holdren
-
-make lib/mod_perl.pm -> mod_perl.pm symlink (for 'make test') relative,
-suggested by Bowen Dwelle
-
-applied patch from Andreas to add a new $r->subprocess_env method
-
-fixed Apache::StatINC brokeness spotted by Bowen Dwelle and applied a
-StatINC doc patch from him too
-
-fixed bug with PERL_TRACE=1 spotted by Jimmy Oh
-
-restarting httpd ala kill -HUP will now reload all modules and flush
-the Apache::Registry cache
-(must set 'PerlFreshRestart On' in httpd.conf for this to work)
-
-=item 1.02 - 10/17/97
-
-have Makefile.PL edit t/net/perl/cgi.pl's #! line to fix perl location
-thanks to Frank Cringle for spotting this
-
-=item 1.01 - 10/16/97
-
-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 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
-
-=item 1.00_03 - 09/21/97
-
-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'
-
-=item 1.00_02 - 09/15/97
-
-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
-
-=item 1.00 - 07/28/97
-
-some 1.3a1 compatible things:
-- mod_perl is now a dll under win32
-(Extra thanks to Gurusamy Sarathy for fixing Perl so this works)
-- cope with limit() -> limit_section() rename
-- API_EXPORT perl_call_handler and perl_stdout2client for mod_include/win32
-- added win32 dirent.h kludge to workaround conflict(s) between perl's
- dirent.h apache's readdir.h
-- -Wall clean again
-
-added new sub request methods:
-- lookup_uri (sub_req_lookup_uri)
-- lookup_file (sub_req_lookup_file)
-The returned request_rec * is blessed into the `Apache::SubRequest'
-class so destroy_sub_req() is called automatically during DESTROY
-- the run_sub_req() function is available in this class as the run() method
-
-added patched Makefile.tmpl-Xcert from Vivek Khera to support XCert's Stronghold Sentry
-
-$r->cgi_header_out should do case-insensive checks,
-bug spotted by Ralf Engelschall
-
-eval { bootstrap Apache::Constants } so perl -c works outside of httpd
-
-added `PerlChildExitHandler' callback hook (requires 1.3a2-dev or higher)
-
-added `PerlChildInitHandler' callback hook (requires 1.3a1 or higher)
-
-don't enable PERL_SECTIONS or PERL_SSI unless apache version >= 1.2.0
-thanks to hint from Vivek Khera
-
-removed Makefile-1.2 (don't need one anymore!)
-
-removed Apache->connection->close method which _nobody_ should still have
-their code (it has produced a warning since 0.93_01 - 03/04/97)
-
-added Apache->connection methods local_addr() and remote_addr() thanks to
-Eric James Negaard
-
-applied patch from Hakan Tandogan so mod_perl's Makefile picks up SSL_INCLUDE
-
-fixed chdir/current dir bug in Apache::Registry thanks to Joel Wagner
-
-=item 1.00b2 - 07/07/97
-
-fixed scoping bug in Apache::Registry spotted by Marshall Dudley
-
-append LockFile to t/conf/httpd.conf if SERVER_VERSION >= 1.2.1
-
-add ''s for CC='$(CC)' workaround for bug spotted by David Lloyd and others
-
-added Apache::Debug->import so 'use Apache::Debug level => 4' will:
--level sets $Apache::Registry::Debug
--define UNIVERSAL::AUTOLOAD to stop spinning when undefined sub is called
--Carp::confess instead of die()
--allocate $^M if $Config{cflags} =~ /EMERGENCY_SBRK/
-
-croak() if should_client_block() to prevent spin into "Out of memory!"
-
-make compatible with 1.2.1 r->read_length change so we don't hang
-on file uploads
-
-can't run 'make test' as root with 1.2.1, if user `nobody' exists,
-use that, otherwise prompt user for `User' and `Group' as suggested by
-Michael Parker
-
-Andrew Tennant reported that `PassEnv' didn't work.
-we now turn off %ENV magic when clearing %ENV so it does work
-
-win32 stuff:
--include handy patch for modules.c as there's no win32 Configure script yet
--fixed mod_perl.h mutex #define broken-ness
-
-the following will now work as expected (building {Apache,Constants}.s[ol]):
- perl Makefile.PL NO_HTTPD=1 DYNAMIC=1 && make
-thanks to hints from Bowen Dwelle
-
-added Makefile.PL option where 'perl Makefile.PL EVERYTHING=1'
-will enable all features:
-ALL_HOOKS, PERL_SECTIONS, PERL_STACKED_HANDLERS, PERL_METHOD_HANDLERS, PERL_SSI
-
-fixed cgi_to_mod_perl.pod mess
-
-added AIX note from Eric Bartley to the INSTALL doc
-
-=item 1.00b1 - 06/29/97
-
-turning off $^W in Apache::Registry when using Cwd to avoid
-'use of uninitialized variable' warning
-
-added Apache::DESTROY to shutup AutoLoader compliants spotted by Tim Newsome
-
-Constants.pm:
--added constant for DONE (included with export tag ':common')
--removed constants for DYNAMIC_MODULE_LIMIT, HUGE_STRING_LEN,
- MAX_HEADERS, MAX_STRING_LEN, METHODS
-
-added benchmark/ directory with benchmarking examples
-
-added pointers to Mike Stok's FAQ mirrors
-
-added short-n-simple cgi_to_mod_perl document
-
-fixed various Makefile.PL w/Stronghold bugs spotted Vivek Khera and Ted Corning
-- PERL_SSI=1 will work (and add -DAPACHE_SSL)
-- Makefile.tmpl is fixed up so mod_perl/x.xx is added to Server:
-- 'make test' will pause (sleep 2) between starting httpsd and running the tests
-
-swap link order of Makefile.tmpl for Stronghold, regardless of version,
-thanks to Ted Corning
-
-perl_clear_env() will now leave $ENV{TZ} in place to
-cure bug with hpux 9.04 spotted and suggested fix from
-1Lt. Samuel S. Tai
-
-Apache::Registry will now 'chdir dirname $r->filename' before the
-script/subroutine is compiled so 'use Foo' can find Foo.pm in '.'
-bug spotted by Janne Himanka
-
-win32 port:
--added INSTALL.win32
--added src/modules/perl/mod_perl.mak
--tweaked Makefile.PL:
- -does not try to build httpd
- -generates perlxsi.c, Apache.c, Constants.c (since we use mod_perl.mak)
--Apache::Registry does not test '-x $filename' if $Is_Win32
--wrap callbacks in a mutex lock/unlock
-
-applied patch from Eric Bartley to fix Apache::Include
-
-change Apache::Registry behavior back to returing $r->status instead of OK
-
-=item 0.99
-
-added DO_HTTPD option to avoid configuration prompts, suggested by
-Michael Alan Dorman
-
-only build Constants.s[ol] with DYNAMIC=1
-
-swap link order in Makefile.tmpl for Stronghold as we did for b11
-thanks to Ted Corning for spotting
-
-applied patch from Rob so 'make tar_Apache' creates the tarball in $PWD
-
-@Lists in <Perl> sections can now deal with TAKE2, TAKE23, TAKE3, etc.
-
-updated FAQ pointers to Frank's new version
-
-Apache::Registry will return OK instead of $r->status, suggested by Owen Scott Medd
-
-skip t/constants/export test on platforms that don't support dl
-
-removed Apache::CGI stub
-
-removed alias for Apache::CGI::exit and Apache::TieHandle::TIEHANDLE
-
-cleanup up Makefile.PL, no longer support 1.2bx's
-
-another patch applied from Alexander Demenshin who found av_undef
-does not take care of everything, we must SvREFCNT_dec too!
-
-fix bug with PERL_METHOD_HANDLERS spotted by Eric Bartley
-
-=item 0.98_12
-
-applied patch from Alexander Demenshin <aldem@techie.com> to plug
-leaks in perl_{stdout,stdin}2client
-
-can now say 'perl Makefile.PL PERL_SSI=1' to enable mod_include stuff
-
-the link order of apache 1.2b12-dev has been switched back to the way
-it was in b10, now we only have to muck with Makefile.tmpl if $Is_b11
-
-once again, ensure CGI.pm knows GATEWAY_INTERFACE if it is use'd in a
-PerlScript, thanks to Tom Hughes for spotting this
-
-removed trick to make `require Apache::TieHandle' a noop, *nobody*
-should still have that in any code, if so, sorry, get rid of it!
-
-inspired by Pai-Ling Hsiao, added tiny Apache::Include module so the
-mod_include <--!#perl directive can take advantage of
-Apache::Registry, like so:
-
- <!--#perl sub="Apache::Include" arg="/perl/ssi.pl" -->
-
-added $r->translate_name method to run translate handlers
-
-fix Apache::Status so it sends http headers! spotted by Mike Stok
-
-have cgi.t skip its tests if CGI.pm is not installed, for Rob, the
-only person in the whole world who doesn't have CGI.pm installed ;-)
-
-s/make/$(MAKE)/ for 'make test_report' thanks to Tom Hughes
-
-=item 0.98_11
-
-switch Apache::parse_args behavior back to pre-0.98_09
-
-=item 0.98_10
-
-if mod_php is in Configuration, keep Makefile.tmpl link order as is,
-and set Rule WANTHSREGEX=no
-
-removed `BrowserMatch' from t/conf/httpd.conf
-
-can now 'make test' without needing to run 'make' first
-
-get rid of Manifest warnings during 'perl Makefile.PL'
-
-reset $/ to "\n" after each request (t/net/test will test this)
-
-set $ENV{GATEWAY_INTERFACE} before perl_run() so it's set for
-server startup PerlScript's
-
-=item 0.98_09
-
-fixed bug in Apache::perl_hook('Access') spotted by Eric Bartley
-
-applied patch from Peter Levart <Peter.Levart@SELECT-TECH.SI>
-to make Apache::parse_args more reliable
-
-if using Perl 5.003, use system cp since File::Copy is broken,
-bug spotted by Rob
-
-switch link order in Makefile.tmpl back to what it was in b10 (tmp workaround):
-s/$(LIBS) $(REGLIB)/$(REGLIB) $(LIBS)/
-Thanks to hint from Mike Fletcher
-
-=item 0.98_08
-
-added 'make test_report'
-
-=item 0.98_07
-
-STATIC=1 is the default now, you make choose DYNAMIC=1
-
-force STATIC=1 if $Config{osname} =~ /svr4/; #unixware
-
-documented mod_perl+mod_include integration in mod_perl.pod
-
-Constants.xs will now make due if SERVER_SUBVERSION is not defined
-
-still build Constants.s[ol] even if we've configured with STATIC=1
-
-=item 0.98_06
-
-smoothed out Stronghold configuration bumps with help from
-Ted Corning <ted@newscorp.com>. (see updated INSTALL)
-
-documented <Perl> sections in mod_perl.pod
-
-added eg/perl_sections.txt from Rob
-
-=item 0.98_05
-
-applied fix from Brian Millett so Makefile.PL can deal with Ben-SSL-1.2
-
-applied patch from Rob to quiet -Wall in new PERL_SECTION code
-
-=item 0.98_04
-
-added BSDI dynamic loading notes from Gary Shea <shea@xmission.com> to
-the INSTALL doc
-
-added PRINTF method (again!) for tie'd STDOUT, spotted by Kristina Helen Long
-
-the following stuff now works inside <Perl></Perl> sections:
-- %VirtualHost, %Files and %Directory
-- implemented <Limit GET POST> sections like so:
-$Location{"/~dougm/"} = {
- AuthUserFile => '/tmp/htpasswd',
- AuthType => 'Basic',
- AuthName => 'Homepage',
- Limit => {
- METHODS => 'GET POST',
- require => 'user dougm',
- },
-};
-- `PerlModule' configuration directive
-
-set $SIG{PIPE} = 'IGNORE'; when the server starts to avoid hosing when:
- `Apache->print lost connection to client'
-thanks to Aaron Flin for the tip
-
-=item 0.98_03 - 05/19/97
-
-construct Perl interperter the first time perl_startup is called
-rather than the second:
--slapped self upside head wondering why I did not do this before
--now -DAPACHE_SSL for Stronghold or Ben-SSL does not matter
--<Perl></Perl> sections work again
--ugly avoid_first_alloc_hack is gone!
-
-added `ENVIRONMENT' section to mod_perl.pod
-
-added `PerlSetEnv' configuration directive
-
-back to only PerlHandler enabled by default
-
-if STATIC=1 is configured during 'perl Makefile.PL', Apache::Constants
-will also be linked static. This is the default on aix and bsdos.
-
-$r->register_cleanup will now save a pointer to the request_rec
-rather than doing it in PerlTransHandler
-
-applied patch from Martin Pool <m.pool@pharos.com.au> so we see the real
-line number if something goes wrong in an Apache::Registry script
-
-now add -I./ and -I$Config{archlibexp}/CORE to EXTRA_CFLAGS for
-mod_include integration
-
-=item 0.98_02
-
-$r->send_http_header now resets $r->status to 200 after calling
-send_http_header() to squash double header w/ Location: bug
-spotted by Jonathan Lieberman
-
-added $r->cgi_header_out so we can _really_ send headers the way
-mod_cgi does (e.g. Set-Cookie bug spotted by Jonathan Lieberman)
-
-=item 0.98_01
-
-made room for args in perl_call_handler() for mod_include integration
-in the future, this can be used to pass arguments to Perl*Handlers:
-
- PerlHandlerArgs Package::sub_name OneArg TwoArg RedArg BlueArg
-
-split out some config routines from mod_perl.c to config.c
-
-fixed bug in Apache/Makefile.PL thanks to Jeff Rowe
-
-now use translate slot to do some initialization
-
-Perl*Handlers can now be anonymous subs (need 5.003_98+), e.g.:
-
- PerlFixupHandler "sub { shift->header_out(Key => 'val') }"
-
-finally get cleanups right:
-- PerlCleanupHandler is now run during PerlLogHandler
-- new method $r->register_cleanup uses register_cleanup
- underneath and is always available
-
-@INC is now reset to default after each request
-
-fixed "const char *" bug in typemap spotted by Honza Pazdziora
-
-=item 0.98 - 05/02/97
-
-save a pointer to request_rec in the translate stage so we always have one
-for PerlCleanupHandler (e.g. no PerlHandler first), tracked down by Eric Bartley
-
-PerlTransHandler enabled by default now
-
-don't use server_argv0 when intializing perl_startup's argv[], caught by Andreas
-
-remove headers.t, will bring back in 0.98_01 and flesh out PerlNewSendHeader
-
-fix exit() so we don't need to $r->rflush first and we make Rob happy
-
-fix bug in $r->requires, caught by Eric Bartley
-
-go back to $|=1 #ifdef USE_SFIO, caught by Salvador Ortiz
-
-=item 0.97_02 - 04/29/97
-
-added documentation for stacked handlers and a little for method handlers.
-
-$^X is now set to server_argv0 as suggested by Frank Cringle
-
-Apache::Registry will now require CGI.pm version 2.35 or higher if you
-are using it. Makefile.PL will also test and warn if it is < 2.35
-
-removed examplish modules from the distribution into the contrib directory:
-AuthzAge.pm, AccessLimitNum.pm, MsqlProxy.pm, SSI.pm
-the contrib directory will be tar'd and uploaded to CPAN when updated.
-
-added headers.t test for Perl(New)SendHeader
-
-added option to link httpd with static Apache.o (the original way),
-(Eric Bartley reported problems on aix with Apache.so, others?)
-like so: perl Makefile.PL STATIC=1
-
-only bother setting $$ once per-child
-
-%ENV is now cleared by a registered cleanup function, rather than
-after PerlHandler is called
-
-applied patch from Andreas to ensure APACHE_SSL is defined if
-we're configuring with it
-
-putback -DSERVER_SUBVERSION now that netscape workaround is in 1.2b9
-
-PerlNewSendHeader enhancement so headers don't need to be part of
-a single print statement.
-
-applied fix from Rob Hartill so Makefile.PL can parse beta version >= 10!
-
-properly initialize cld->new_sendheader thanks to Rob Hartill
-
-$r->print is now an xsub for speedup, even with the new
-extra operation of checking $|, it's faster:
-
- Benchmark: timing 100 iterations of 0.97_01, 0.97_02...
- 0.97_01: 9 secs ( 2.03 usr 0.19 sys = 2.22 cpu)
- 0.97_02: 8 secs ( 1.84 usr 0.17 sys = 2.01 cpu)
-
-sfapachewrite() will now call Apache->print
-
-if $| is non-zero, call rflush() after writing to the client
-
-$| is reset to 0 before PerlHandler is called
-
-applied patch from Eric Bartley to:
--add get_remote_logname() method
--update Apache.pm documentation including:
- get_remote_logname, auth_type, auth_name, document_root, notes
-
-fix so $r->rflush works with older apache's
-
-=item 0.97_01 - 04/22/97
-
-added experimental `PerlNewSendHeader' config directive
-works like `PerlSendHeader', but scans headers for special
-headers like Location:, Status:, etc.
-simply uses a C global variable `sent_header', if true, sends
-data asis to client, otherwise calls $r->send_cgi_header
-currently, does not work with sfio (yet) and this only works if a
-single print statement sends the headers like so:
-
- print "Status: 302\n",
- "Location: http://www.somewhere.com/\n",
- "Content-type: text/html\n\n";
-
-"fixed" new preg* clashes w/ 1.2b9-dev spotted by Dean Gaudet
-
-reworked callback mechanism a bit:
-- folded duplicate code in run_stacked_handlers() + perl_call()
-- gv_fetchmethod called only if -DPERL_METHOD_HANDLERS
-- perl_handler_ismethod now() uses class stash in gv_fetchmethod
-- cache CV from perl_get_cv lookup if -DPERL_STACKED_HANDLERS
-- included patch from Eric Bartley so we can say:
- `Class->method' in Perl*Handler's if -DPERL_METHOD_HANDLERS
-- fixed bug spotted by Rob Hartill so Perl*Handler (OK|DECLINED) work again
-- added minimal tests for stacked handlers and method handlers
-- PERL_METHOD_HANDLERS=1 can be set when running Makefile.PL
-
-PerlCleanupHandler now uses register_cleanup underneath,
-instead of abusing the logger slot.
-PerlCleanupHandler is enabled by default
-
-added PRINTF for tie'd STDOUT
-
-detached Apache.o from httpd, now a dynamic extension. here's why:
-- shinks httpd size
-- possible to 'use Apache ()' outside of httpd
- (very few methods will work though!)
-- once mod_perl.c settles it will be possible to upgrade mod_perl
- without rebuilding httpd!
-
-added $r->server_root_relative function
-
-Apache::Status has 2 new menu items (need Devel::Symdump 1.99_01+):
- - "Inheritance Tree"
- - "ISA Tree"
-
-added new CGI.pm tests from Andreas
-
-=item 0.97 - 04/15/97
-
-don't add mod_perl/x.xx to Server: unless 'perl Makefile.PL ADD_VERSION=1'
-
-applied patch from Andreas to better Makefile.PL
-
-if httpd is 1.2b8, remove bogus target from modules/Makefile
-
-applied patch from Rob Hartill to add $r->rflush method
-
-applied patch Eric Bartley <bartley@PDN.CC.PURDUE.EDU> to:
-add $r->notes, $r->auth_name, $r->auth_type, $r->document_root methods
-ability to set $r->args, $r->connection->user and $r->connection->auth_type
-
-applied patch from Dean Gaudet so $r->exit uses log_transaction
-instead of multi_log_transaction
-
-=item 0.95_06
-
-fixed typo in new merge function that broke PerlHeaderParserHandler
-
-=item 0.95_05
-
-make sure merge of configs accounts for sendheader and setup_env too!
-
-applied patches from Glen McCallum <glenm@tusc.com.au> so build works
-with hpux 10.20's native compiler
-
-=item 0.95_04
-
-dir configs are now merged so <Location> blocks can have Perl*Handlers
-and PerSetVar's without stomping those that are in .htaccess
-
-Apache->seqno will use the scoreboard's my_access_count if the -DSTATUS
-option is enabled (default if mod_status is configured in)
-
-=item 0.95_03
-
-with 1.2b8-dev+, we no longer need a Makefile.tmpl
-
-added Apache->max_requests_per_child method
-
-now have taint.t test
-
-added <Perl> config section (see httpd.conf.pl)
-(needs 'perl Makefile.PL PERL_SECTIONS=1')
-
-Apache::Registry will now chdir to directory where the script
-
-Apache::AuthenDBI and Apache::Authen removed from distribution,
-now maintained by John Groenveld and Steve Kane
-
-added PerlInitHandler and PerlCleanupHandler hooks
-
-Apache::Registry will require CGI.pm version 2.32 or higher if it
-finds CGI.pm in %INC
-
-added Apache::Registry->push_cleanup method suggested by Frank Cringle.
-
-applied patches from Gerald Richter <richter@ecos.de> to:
--fix Apache::unescape_url_info
--one s/Apache::Config/Apache::MyConfig/ in Makefile.PL
-
-=item 0.95_02
-
-introduced experimental "stacked handlers" mechanism, allowing more
-than one Perl*Handler to be defined and run during each stage of the
-request.
-
-Perl*Handler directives can now define any number of subroutines, e.g.
-
- PerlTransHandler OneTrans TwoTrans RedTrans BlueTrans
-
-with a new method, Apache->push_handlers can add to the stack by
-scripts at runtime
-
-PerlLogHandler enabled by default during "stacked handlers" experiment
-
-applied patches from Andreas to quiet prototype warnings seen with
-perl5.003_94
-
-applied patches from Gerald Richter <richter@ecos.de> to:
--add Apache::uri_unescape_info function (and make $r->args/content use it)
--built Apache::MyConfig module
--Term::Readline Makefile.PL support for history, etc.
-
-=item 0.95 - 03/20/97
-
-******************************************
-*** CGI-XA/* removed from distribution ***
-CGI.pm-2.32 is now mod_perl compatible, and
-now ships with CGI::Switch and CGI::Apache.
-******************************************
-
-various documentation updates
-
-renamed Apache::CGI to CGI::Apache
-(you should be using CGI::Switch anyhow!!!)
-
-Perl*Handler package names no longer require a '::' to default
-to PackageName::handler() when Perl*Handler is just PackageName
-
-renamed eg/MyPackage.pl to startup.pl, pruned way down to
-discourage use of PerlScript and avoid the confusion it has caused in
-the past
-
-updated Makefile.tmpl-1.2 to work with 1.2b8-dev, there will be
-a "Multiple rules lines" warning, once 1.2b8 is released, we'll
-take this out
-
-added $r->prev and $r->next methods
-
-added Apache->taint method
-
-Apache->untaint method now in Apache.xs
-
-added $r->seqno method suggested by Lincoln Stein
-
-added GETC and READLINE for tie *STDIN completeness
-
-fixed Apache::CGI+file upload w/ patch from Andreas
-
-data read from client ($r->read*, $r->args), %ENV, $r->cgi_env and
-$r->*header*_* is now marked as tainted, t/net/test now tests this
-(only with with `PerlTaintCheck On' of course)
-
-various cleanup, including shifting things so Apache.o can be detached
-from httpd to Apache.sl if the need arises
-
-now -Wall clean, except for Perl's dXSUB_SYS->dummy
-
-set $|=1 by default #ifdef USE_SFIO
-
-added Apache->module method
-
-added Apache::Status->menu_item method
-
-fixed warnings in Apache->read spotted by Owen Scott Medd
-
-applied Apache::Registry fixes from Andreas
-
-applied NeXT fixes from Jeff Hallgren and Andreas
-
-applied XA.pm patch from Owen Scott Medd <osm@INTERGUIDE.COM>
-so filehandles can be ref's
-
-=item 0.94 - 03/09/97
-
-removed pp_hot.patch from distibution
-
-t/net/http-post.t will now test the tie'd *STDIN if $] >= 5.003_93
-
-*STDIN is now tie'd to the client, only works if perl version is
->= 5.003_93
-
-removed Apache::TieHandle from the distribution as it is no longer
-needed. however, scripts that are currently using:
-use Apache:TieHandle ();
-tie *STDOUT => "Apache::TieHandle";
-will not break, but will produce a no longer needed warning
-
-removed Apache::Registry's attempt to honor __END__, as Andreas
-pointed out, this can't really be done right unless we have
-Perl::Lex and Perl::Parse :-)
-
-applied Makefile.PL patch from Andreas to use modules instead of
-system() where possible
-
-Apache::Constants now defines SERVER_SUBVERSION,
-as suggested by Andreas
-
-removed is_perlaliased from Apache::Debug, caught by Andreas
-
-=item 0.93_01 - 03/04/97
-
-added 'use ExtUtils::testlib' to t/docs/startup.pl since PERL5LIB
-is shutoff with -T!?!
-
-picky compilers should no longer complain of things reported
-by Mike Stok and George Hartlieb when sfio is configured in
-
-added (temporary?) `PerlWarn' directive to pass the -w switch
-to perl_parse
-
-bug fix so stderr is hooked to the error_log as it was and
-should be (unless PERL_TRACE is defined)
-
-argv[0] to perl_parse is now "httpd", making the value of
-magic $^X "httpd"
-
-`PerlSetupEnv' now on by default
-
-Apache::Registry parses command line switches if it sees #!,
-only -w and -T are recognized at the moment (not enough!)
-
-Apache::Registry now honors __END__
-
-added Apache->untaint method
-
-added `PerlTaintCheck' directive to startup with -T switch
-
-during 'make test' t/TEST now installs a die handler to shutdown httpd
-before make aborts if a test fails as suggested by Gary Shea
-
-we now passthru httpd's CFLAGS1 via MM's DEFINE
-(I needed this for -DHPUX10 + Apache::Constants)
-
-we now define SERVER_SUBVERSION as suggested by Andreas
-
-fixed $$ bug in CGI::XA with fix from Salvador Ortiz
-
-added $r->is_initial_req method, now used by these modules:
-Apache::AuthenDBI, Apache::AccessLimitNum, Apache::AuthzAge
-
-Apache::warn now overrides CORE::warn in Apache::Registry scripts,
-which is an alias for Apache::log_error
-
-Apache::exit now overrides CORE::exit in Apache::Registry scripts,
-now converted CGI scripts can safely call plain 'ol exit;
-
-$r->exit will close the client connection for you, no need for
-$r->connection->close, which is no longer documented, and does
-nothing but warn not to call it.
-
-fixed cookie bugs in CGI::XA spotted by Andrew Tennant
-
-#undef some symbols that caused clashes #ifdef HPUX10
-and ones on solaris spotted by Bowen Dwelle
-
-=item 0.93
-
-updated Makefile.tmpl-1.2 to be inline with 1.2b6
-
-removed 1.2b5 Makefile.tmpl, 1.2b1..b5 no longer supported
-
-mortalize return value from $r->read_client_block
-
-make Apache::CGI scrict clean thanks to Frank Cringle
-
-=item 0.92 - 01/23/97
-
-fixed core-dump-causing bug spotted by Mike Stok
-
-=item 0.91 - 01/22/97
-
-perl_init now says 'use Apache::Constants qw(OK DECLINED)' (in C) so you can
-say 'Perl*Handler DECLINED', suggested by, you guessed it, Rob
-
-applied patch from Rob so Makefile.PL copies $APACHE_SRC/Configuration to src/
-if it has been changed
-
-added Makefile.tmpl-1.2b5 from Rob
-
-applied patch from Rob Hartill to stop $r->cgi_env($key) from core-dumping
-if $key does not exist
-
-applied PerlModule overflow check patch from Rob Hartill
-
-added $r->as_string method
-
-=item 0.90_01
-
-depreciation of Apache->request use outside of Apache::CGI and scripts
-that run under Apache::Registry now spits out a warning. See Apache.pm
-doc update for details.
-
-$r->is_perlaliased has gone away
-
-added api tests
-
-added tests for callback hooks besides PerlHandler
-
-added Apache::perl_hook function
-
-if a callback does not return a status values, we assume OK,
-fatal errors would have never made it that far anyhow,
-still log warning to error_log, but carry on
-
-clean up here and there
-
-added PerlHeaderParserHandler callback hook for apache versions >= 1.2b5
-
-added $r->connection->aborted method
-added $r->the_request and $r->header_only methods
-added Apache::Server methods: is_virtual and names
-
-added $r->headers_out and $r->err_header_out methods:
-header*_* methods are now consistent, see Apache.pm docs
-
-should now use $r->err_header_out instead of $r->err_headers_out
-to set the value of an err_header
-
-added 1.1.3 to Makefile.PL version map after hint from Arin Goldberg
-
-src/modules/perl/Makefile now detects modules linked static with
-your perl and links them with httpd
-
-Apache::CGI->read_from_client now calls $r->read instead of
-$r->read_client_block
-
-applied fix for bug in read_client_block thanks to Milan Votava
-
-updated Apache::SSI documentation
-
-can now 'make test PORT=xxxx'
-
-can now 'make start_httpd', 'make kill_httpd' for testing
-
-perl Makefile.PL ALL_HOOKS=1 enables all Perl*Handler callbacks
-
-$r->filename will re-stat r->finfo if you change the filename as
-suggested by Rob Hartill
-
-Makefile.PL now copies $APACHE_SRC/Configuration to src/ modifies,
-then tells apache's Configure to use this copy with -file
-
-applied patch from Pai-Ling Hsiao <pailing@STRAWBERRY.UCC.UCONN.EDU>
-o fix CGI::XA->*_group bugs
-
-t/constants/export.t now tests _all_ of @EXPORT and %EXPORT_TAGS
-
-fixed bugs in Apache::Constants spotted by John Groenveld and Rob Hartill
-
-Apache.xs now uses rwrite() if apache >= 1.2b4
-
-=item 0.90
-
-perl Makefile.PL PERL_TRACE=1 will now enable tracing
-
-changed Makefile.PL so we can enable callback hooks ala:
- perl Makefile.PL PERL_AUTHEN=1 PERL_FIXUP=1
-
-updated INSTALL and mod_perl.pod to reflect this change
-
-=item 0.89
-
-fixed bug spotted by Rob Hartill so perl_cmds[] is not prematurely
-terminated
-
-added Bundle::Apache module for use with CPAN.pm
-
-fixed Constants/Makefile.PL so -I picks up $(APACHE_SRC) no matter what,
-thanks to Mike Stok
-
-=item 0.88
-
-applied Makefile.PL patch from Rob Hartill so we compile with 1.2b3
-
-=item 0.87
-
-As suggested by Andreas, Makefile.PL now asks:
-"Configure mod_perl with ../apache_xxx ?"
- answering 'y' only means there is where we can find *.h
-"Shall I build httpd in $adir for you?"
- answering 'y' will run ../apache_xxx/Configure
- and httpd will be built when running 'make'
-
-$r->read now returns $nrd as it should
-
-'perl Makefile.PL NO_HTTPD=1' will build only the perl side of
-mod_perl (still need httpd.h for Constants.sl)
-
-'make test' now picks up modules in ./blib as it should, bug
-spotted by Mike Stok
-
-ServerName is set to localhost in httpd.conf as suggested by
-Mike Stok and Frank Cringle
-
-=item 0.86
-
-Port is a little more random for tests '8529'
-
-applied patch from Edmund Mergl <E.Mergl@BAWUE.DE> bringing CGI::XA
-up-to-date with CGI.pm 2.29
-
-perl_destruct_level is set to 0 in mod_perl.c, while progress is being
-made on fixing perl_{con,des}truct in 5.003_12
-
-if there is no httpd.conf, Makefile.PL creates one for you, filling in
-User and Group with uid and gid of the current process
-
-updated Makefile.tmpl-1.2 with Makefile.tmpl from apache 1.2b2
-
-if Makefile.PL finds apache version >= 1.2b3, instead of copying
-Makefile.tmpl to ../src/apache_x.x, it uses the new '-make Makefile.tmpl'
-option, made possible by Rob Hartill
-otherwise, same as before and it now tells you it's made a backup
-'Makefile.tmpl.bak'
-
-fixed 'make test', so you _really_ don't have to modify anything,
-hopefully
-
-if libwww-perl is not installed, the tests that require it will not be run,
-and it will be suggested that you install the library, but who doesn't
-have libwww-perl installed???
-
-=item 0.85_06
-
-same as 0.85_05, just fixed broken tarball
-
-=item 0.85_05
-
-fixed Makefile.PL bug spotted by Gary Shea <shea@XMISSION.COM>
-
-applied XA.pm fix from Edmund Mergl <E.Mergl@BAWUE.DE>
-
-updated docs and examples here and there
-
-'make test' improved, all uneeded directives and files stripped out,
-should be able to run with no modification, nothing by hand other than
-'make test'
-
-now make sure that CC we use to build httpd is the same as CC used to
-build Perl, thanks to Andreas
-
-added 'make offsite-tar' target for build the perl-side on machines
-without apache source
-
-fixed Makefile.tmpl* so people define EXTRA_FLAGS as suggested by Rob Hartill
-
-a few minor fixes for Apache-SSL users
-
-=item 0.85_04
-
-applied patch from Rob Hartill to fix bug in $r->cgi_env
-
-%ENV is cleared after each callback (&Perl*Handler)
-
-added $r->cgi_var as suggested by Andreas:
-calls $r->cgi_env($key) in a scalar context to prevent the
-mistake of calling in a list context.
-
-if a Perl*Handler returns something > 600 we assume OK (for now)
-
-bug fixed introduced in 0.85_03 for Perl*Handler's not prefixed with
-a Package:: causing httpd to sigsegv
-
-ship with Makefile.tmpl-Ben-SSL for Apache-SSL users
-
-Makefile.PL a little smarter
--knows if we're configuring with Ben-SSL, uses Makefile.tmpl-Ben-SSL
--after looking for 1.1.1 and 1.2*, globs for <apache*> not <apache_*>
--instead of rm -rf'ing the modules/perl/ directory we're configuring
- against, we only rm -f those found in our MANIFEST
-
-applied patch from Frank Cringle <fdc@CLIWE.PING.DE> to fix defaults
-in CGI::XA
-
-got rid of stupid warning "missing test.pl"
-
-=item 0.85_03
-
-cleaned up internal perl_setup_env()
-
-Perl*Handler's default to calling Perl*Handler::handler if the
-Perl*Handler is just a class name, e.g. 'PerlHandler Apache::Registry'
-will call Apache::Registry::handler
-In addition, the class module will be loaded if it is not already,
-so there is no need to specify PerlModule
-
-added Apache::Status module
-
-$r->print now sets a hard_timeout() before sending to the client
-$r->read now sets a hard_timeout() before reading from the client
-
-added $r->soft_timeout, $r->hard_timeout, $r->kill_timeout and
-$r->reset_timeout methods
-
-top-level Makefile.PL looks further for apache_x.x/src/
-prompts you if nothing found
-
-applied fix from Andreas to s/privlib/privlibexp/ in src/modules/perl/Makefile
-
-applied patch from Rob Hartill <robh@imdb.com> to correctly initialize
-cld->sendheader and cld->setup_env
-
-=item 0.85_02
-
-Apache::DBIAuthen renamed Apache::AuthenDBI and split out from
-Apache::Authen
-
-Apache::Authen->handler renamed Apache::Authen->check
-as it is not a handler, only used by handlers
-
-added ToDo file
-
-updated UserGuide, now called 'mod_perl.pod'
-
-updated INSTALL and README docs
-
-perl_init will only perl_alloc and perl_contstruct once when the server
-starts, meaning no more mad leaks when server is restarted
-
-modified test suite adding extra tests for sfio and TIEHANDLE
-
-unless Perl was configured to use perlio and sfio, STDOUT is tied by default to
-the client, no more need for tie *STDOUT => Apache::TieHandle
-
-Makefile.PL now looks for ../apache_1.1.1/src/, apache_1.2*/src/ to configure
-against
-
-Fixed Makefile.PL bug spotted by Frank Cringle <fdc@CLIWE.PING.DE>,
-when no apache source was present or chosen to configure against
-
-'make clean' will now cd $(APACHE_SRC) && $(MAKE) clean
-
-applied patch from Rob Hartill <robh@imdb.com> to bring us up-to-date
-with apache_1.2b0
-
-$r->content now calls $r->read instead of $r->read_client_block
-
-$r->read is no longer an alias for $r->read_client_block
-The new $r->read implementation is based on patches and ideas from
-Milan Votava <ms.anet.cz@MS.ANET.CZ>,
-Joonsuk Bae <bae@yahoo.com>,
-and Gisle
-
-=item 0.85_01
-
-added 'tar_Apache' target for copying the perl-side of mod_perl to other
-machines without dragging the apache-side along.
-
-'perl Makefile.PL' now Configures Apache to link mod_perl
-if ../apache_1.2-dev or ../apache_1.1.1 src/Configuration is found
-In addition, 'apache_httpd' is added to the 'make all' target
-
-now include Makefile.tmpl-1.2
-
-fix for 1.2's const requirement
-
-=item 0.85
-
-added the start of a mod_perl test suite
-
-got rid of conditional perl*rec members, which was causing compile problems
-for some people
-
-$r->exit now logs transactions before exit()'ing the process
-
-applied clean-up and debug enhancement patch to Apache::Registry from Andreas
-
-applied patch from Andreas to reduce Apache->request calls in Apache::CGI
-
-$r->cgi_env now accepts arguments for setting variables
-
-=item 0.84 - October 27, 1996
-
-added pointer to Patrick Kane's <modus@enews.com> FAQ
-
-applied Makefile.PL patches from Gisle
-
-=item 0.83_10
-
-send_cgi_header now sets $r->status to REDIRECT when it finds a Location
-header which is not an internal redirect
-
-Apache::Registry now returns $r->status rather than always OK
-
-dropped old approach of the original mod_perl.c, mod_perl_fast functionality
-has moved to the all-knowing, all-doing mod_perl
-
-Makefile.PL for Apache::Constants looks for httpd.h in ../../apache*/src/
-before prompting
-
-dropped OK from @{$Apache::Constants::EXPORT_TAGS{response_codes}}
-
-updated Constants.xs with patch from Gisle
-
-applied Makefile.PL patch from Gisle to set PERL= in Makefile*
-
-=item 0.83_09
-
-fixed bug with get_basic_auth_pw spotted by Patrick Kane <modus@enews.com>
-
-=item 0.83_08
-
-get_basic_auth_pw now returns the $send_pw, rather that setting it,
-see Apache.pm docs
-
-applied patch from Andreas with the following changes:
-
-1) regex directory added in Constants/Makefile.PL. Current apache
- always needs -Iregex, that means for us an additional
- -I$httpd/regex. I think, they should
-
- #include <regex/something.h>
-
-2) Assorted comments added to INSTALL, especially
-
- * FileHandle bug explained as being a 5.003 bug (not "current")
-
- * Configuration/Configuration.tmpl relation explained
-
- * && instead of ; to separate commands is a must in Makefiles
-
- * Gisle's hint about the default seems very important to me, so is
- there again.
-
-3) Drops the deprecated mod_alias patch from the whole distribution
-
-4) A whitespace patch for src/modules/perl/Makefile
-
-5) The regex directory also for src/modules/perl/Makefile
-
-6) Shuffling of code between mod_perl_fast.c and mod_perl.h until it
- fits the bill, who knows why :-0
-
-=item 0.83_07
-
-added the missing src/modules/perl/Makefile (again)
-
-=item 0.83_06
-
-brought back Makefile.tmpl for current public release
-
-added src/modules/perl/ldopts script, rather than using 'make ldopts'
-
-INSTALL doc fix so 1.1.1 users define RANLIB
-
-MODULE_MAGIC_NUMBER fix so we still build with 1.1.1
-
-no longer pstrdup when fetching r->args
-
-dropped undocumented SKIP_AUTH_HEADER thingy
-
-=item 0.83_05
-
-added missing Makefile to src/modules/perl/
-
-turned off PERL_TRACE, oops
-
-moved SERVER_VERSION from Apache.xs to Constants.xs
-
-applied another doc patch to Apache.pm from Gisle
-
-=item 0.83_04
-
-updated INSTALL and UsersGuide documents
-
-misc cleanup here and there
-
-Apache::Options is now just a stub that imports from Apache::Constants
-
-updated Apache.pm and Apache::Constants documentation
-
-added Apache::AuthzAge and Apache::AccessLimitNum modules
-
-added $r->requires and $r->is_main, and $r->main methods
-
-added callback hooks for authorization, access, type-check,
-fixup and logger stages of the request
-
-callback hooks can now be turned off at compile time with
--DNO_PERL_...., and are turned off by default, except for the
-handler stage (PerlHandler)
-
-reworked installation procedure to follow apache 1.2 recomendations,
-the procedure will still work with older versions of apache.
-No more Makefile.tmpl.x.x.x mess!!
-
-updated #if MODULE_MAGIC_NUMBERS >='s so we're inline with apache 1.2-dev-19961009130008
-
-=item 0.83_03
-
-Perl*Handler's are now called with Apache->request as an argument
-PerlHandler's may still ask for Apache->request so existing code and
-mechanisms such as Apache::Registry will continue to work
-However, other handlers such as PerlAuthenHandler and PerlTransHandler,
-cannot use Apache->request.
-
-added Apache::Constants module, based on patch to Apache.xs
-from Gisle
-
-updated Apache::Debug with patch from Gisle to
-- update the status codes from the latest
- HTTP::Status and produce a prettier and more output.
-
-- We also ensure that we do not generate output for HEAD requests and we
- set up status correctly.
-
-updated Apache.pm and Apache::Options docs, thanks to Gisle
-
-fixed PerlScript bug spotted by Gisle
-
-renamed Apache::Msql to Apache::MsqlProxy
-
-=item 0.83_02
-
-bug patch to Apache::Registry from Andreas
-
-=item 0.83_01
-
-minor clean-up
-
-fixed port and query_string related bugs in Apache::Msql example
-
-applied patch from Salvador Ortiz <sog@msg.com.mx> to fix PerlTransHandler bugs
-spotted by Hugues Lafarge <Hugues.Lafarge@afp.com>
-
-applied Apache::Registry patch from Andreas
-- allows filanames to start with a digit (you probably saw a "bad
- symbol after ::" error)
-
-- strips path_info before deciding which package the script is compiled
- into.
-
-=item *developer's release* release 0.83 - September 12, 1996
-
-added Apache::Msql module
-
-added $r->handler method
-
-added $r->proxyreq method
-
-added PerlTransHandler directive
-
-minor clean-up
-
-=item *developer's test* release 0.82 - September 11, 1996
-
-added Apache::Authen and Apache::AuthenDBI modules
-
-added $r->get_basic_auth_pw method
-
-added $r->note_basic_auth_failure method
-
-added PerlAuthHandler directive
-
-added $r->dir_config method
-
-added PerlSetVar directive
-
-we now have mod_perl.h
-
-fix for using mod_perl_fast with Apache-SSL
-
-=item release 0.81 - September 08, 1996
-
-added Apache::CGI->exit method as suggested by Andreas
-
-items needed for 1.2 are now conditional using MODULE_MAGIC_NUMBER
-
-included Makefile.tmpl.1.2
-
-=item release 0.80 - September 06, 1996
-
-fix so we can send $strings of binary data to the client
-
-fix so we can log bytes sent
-
-added Andreas' CGI::XA kit for users of CGI.pm + mod_perl_fast
-
-added PerlSetupEnv directive
-
-added PerlSendHeader directive
-
-we now take advantage of Perl's new IO abstraction so STDIN and
-STDOUT are hooked up to the client.
-Thanks to Sven Verdoolaege <skimo@breughel.ufsia.ac.be> for the
-initial patch
-
-added $r->connection->close method
-
-added $r->exit method
-
-applied patch from Rob Hartill <robh@imdb.com> so read_client_block
-works with apache-1.2 changes
-
-updated UsersGuide to suggest using configuration that does not
-require patching mod_alias.c, thanks to Rob Hartill <robh@imdb.com>
-
-added $r->method_number method
-
-$r->method() now accepts an argument to change the request method
-(for things like internal re-directs)
-
-added send_cgi_header method
-
-added internal_redirect_handler method
-
-applied NeXT fix from Andreas
-
-applied patch from Andreas to fix eval error line number
-in Apache::Registry
-
-changed Changes file so it can be read with 'perldoc Changes'
-
-=item release 0.76b2 - August 16, 1996
-
-updated Apache::CGI, now requires CGI.pm 2.22+
-
-#undef pregcomp to fix namespace clash with Apache 1.2
-
-added (placeholder for) PerlSetVar directive (need to think about it some more)
-
-applied patch from Andreas Koenig <andreas.koenig@franz.ww.tu-berlin.de>
-to fix bug introduced with perl5.003_01 + IRIX combo
-
-=item release 0.76b1 - July 26, 1996
-
-included Sven Verdoolaege's (experimental) patch for minimal TIEHANDLE
-support, so we can tie *STDOUT, 'print' instead of '$r->print' that is.
-
-added (experimental) Apache::TieHandle module
-
-included Chip Salzenberg's FileHandle.pm patch
-
-added UsersGuide document
-
-if no PerlHandler is defined we fail with a SERVER_ERROR
-
-Apache::Registry now checks to make sure uri is not a directory
-
-applied Apache::Registry patch from Andreas for minor clean-up
-and an extra error check
-
-=item release 0.75a1 - July 21, 1996
-
-added Apache::Registry module contributed by
-Andreas Koenig <andreas.koenig@franz.ww.tu-berlin.de>
-
-Apache::SSI now checks ExecCGI option before doing an 'exec'
-
-included patch for mod_alias.c to allow for PerlAlias directive
-
-added allow_options and is_perlaliased methods to Apache.pm
-
-added Apache::Options module
-
-added Apache::Debug module
-
-applied patch from Andreas Koenig <andreas.koenig@franz.ww.tu-berlin.de> to
--fake up a PerlScript if one is not specified
--ITERATE over PerlModule directive so it will accept multiple modules
--no longer store request_rec in $Apache::Request
-we now require ExtUtils::Embed as it has been re-named for
-the standard perl distribution as of 5.003_01
-
-
-=item release 0.71b1 - July 19, 1996
-
-added PERL_CCFLAGS to Makefile.tmpl as suggested by
-Lincoln Stein <lstein@genome.wi.mit.edu>
-
-subroutines no longer need to return '0' for OK status, 200 and 1
-are 'OK' too.
-
-added 'PerlHandler' as replacement for 'PerlResponse',
-seems like a more appropriate name after Salvador's
-'AddHandler' suggestion
-
-added item to the handler_rec so we can say 'AddHandler'
-Thanks to Salvador Ortiz <sog@msg.com.mx>
-
-fixed bug with storing 'PerlModule's read from srm.conf
-Thanks to Salvador Ortiz <sog@msg.com.mx> for the spot and helping with the fix
-more Makefile.tmpl fixes from Andreas Koenig <andreas.koenig@franz.ww.tu-berlin.de>
-
-=item release 0.70b1 - July 14, 1996
-
-applied patches from Andreas Koenig <andreas.koenig@franz.ww.tu-berlin.de>
-to fix Makefile.tmpl bug, NeXT define troubles,
-typos and documentation clean-up
-
-Added Apache::SSI module for server side includes
-
-Added 'PerlModule' directive for loading modules in srm.conf
-
-fixed read_client_block bug that was causing trailing garbage to show up
-n the client for some people.
-Thanks to Alan Beale <agb@openplus.co.uk> for the fix.
-
-
-=item release 0.60a5 - June 25, 1996
-
-fixed bug in mod_perl_fast that was causing bizarre problems for some people
-
-=item release 0.60a4 - June 18, 1996
-
-dropped content and args methods from Apache.xs, moved to Apache.pm
-The xs implementation was causing problems for some people
-
-added Apache::unescape_url function
-
-added $r->header_in method
-
-
-=item release 0.60a3 - June 17, 1996
-
-Added read() alias for read_client_block
-
-Updated Makefile.tmpl to use the renamed ExtUtils::embed
-
-Fixed various small bugs that were causing big problems
-
-pid $$ now set in mod_perl_fast, thanks to Alan Beale <agb@openplus.co.uk>
-
-Added basic_http_header() method
-
-
-=item release 0.60a2 - May 21, 1996
-
-fixed bug in mod_perl_fast.c the caused problems with
-$r->content and $r->args
-
-Added Apache::CGI module for those who use CGI.pm
-
-There's now a Makefile.PL (currently for installing perl-only modules).
-
-
-=item release 0.60a1 - May 18, 1996
-
-Started getting ready for optional Safe wrapper around scripts
-
-Added $r->get_remote_host() method, putting $r->connection->remote_host back to normal
-
-=item release 0.50a2 - May 9, 1996
-
-new (faster) approach with mod_perl_fast
-
-Thanks to John Detloff <detloff@arizona.edu>
-for friendly error checking code.
-
-we now use an Apache.pm file
-
-moved more code from mod_perl to Apache.xs so mod_perl_fast could share it
-
-rganized Apache.xs
-
-fixed $r->connection->remote_host
-
-hiding of 'Authorization' header is optional now
-
-added 'print' alias to 'write_client'
-
-dropped set_ prefix for several methods
-
-=item release 0.50a1 - May 1, 1996
-
-xs_init now gets linked with us, as generated by Devel::embed
-so we can bootstrap static extensions (including Apache)
-
-stomped out *main:: variables, moved to Apache.xs as methods
-
-added method 'request' to return the request pointer object
-And did a typedef request_rec * Apache
-so we don't need to say @request_recPtr::ISA = 'Apache'; anymore
-
-added method 'write_client' for sending a @list of data to the client
-
-added methods that simply access members of request_rec
--method
--uri
--protocol
--path_info
--filename
-
-added method 'args'
-when called in a scalar context, it returns the query string
-when called in a list context, it splits the query_string into key => vairs
-
-moved parsing code to Apache.xs, and now data is only read when the user
-asks for it with the content() method.
-
-added method 'content'
-when called in a scalar context, it reads data from the client
-when called in a list context, it splits the content into key => vairs
-
-added method 'headers_in' to return a %hash of request headers
-the 'Authentication' header is not returned
-
-added perl_call_argv to Apache->bootstrap ourselves
-
-we now flush the script's %ENV
-users can set-up a standard CGI %ENV via method $r->cgi_vars
-
-the script's STDERR in now redirected to the error_log
-
-added client_to_stdout and client_to_stdin methods to
-hookup the script's STDOUT and STDIN
-** This is broken right now **
-
-added method 'connection' and Apache::Connection class
-returns a object reference to the request_rec's conn_rec
-methods availible include:
-
- - remote_host
- - remote_ip
- - remote_logname
- - remote_user
- - auth_type
-
-added method 'server' and Apache::Server class
-returns a object reference to the request_rec's server_rec
-methods availible include:
-
- - server_admin
- - server_host
- - port
-
-Changes for Apache 1.1x
--rprintf to bputs, etc.
-
-
-=item March 25, 1996
-
-Initial version of mod_perl.c and perl_glue.xs
-by Gisle Aas <aas@oslonett.no>
-Thanks for getting this started Gisle!
-
-
-=back
-
-=cut
diff --git a/tags/v1_29/Connection/.cvsignore b/tags/v1_29/Connection/.cvsignore
deleted file mode 100644
index ea6a5c9..0000000
--- a/tags/v1_29/Connection/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-pm_to_blib
-Connection.xs
-
diff --git a/tags/v1_29/Connection/Connection.pm b/tags/v1_29/Connection/Connection.pm
deleted file mode 100644
index 616f2fc..0000000
--- a/tags/v1_29/Connection/Connection.pm
+++ /dev/null
@@ -1,9 +0,0 @@
-package Apache::Connection;
-
-use mod_perl ();
-
-$VERSION = '1.00';
-__PACKAGE__->mod_perl::boot($VERSION);
-
-1;
-__END__
diff --git a/tags/v1_29/Connection/Makefile.PL b/tags/v1_29/Connection/Makefile.PL
deleted file mode 100644
index fd55d3d..0000000
--- a/tags/v1_29/Connection/Makefile.PL
+++ /dev/null
@@ -1,12 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- 'NAME' => 'Apache::Connection',
- 'VERSION_FROM' => 'Connection.pm', # finds $VERSION
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
diff --git a/tags/v1_29/Constants/.cvsignore b/tags/v1_29/Constants/.cvsignore
deleted file mode 100644
index c58b391..0000000
--- a/tags/v1_29/Constants/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-pm_to_blib
diff --git a/tags/v1_29/Constants/Constants.pm b/tags/v1_29/Constants/Constants.pm
deleted file mode 100644
index 24110de..0000000
--- a/tags/v1_29/Constants/Constants.pm
+++ /dev/null
@@ -1,281 +0,0 @@
-package Apache::Constants;
-
-use mod_perl ();
-
-{
- no strict;
- $VERSION = "1.09";
- __PACKAGE__->mod_perl::boot($VERSION);
-}
-
-unless(defined &import) {
- require Exporter;
- require Apache::Constants::Exports;
- *import = \&Exporter::import;
-}
-
-sub autoload {
- if (defined &__AUTOLOAD) { #make extra sure we don't recurse
- #why must we stringify first???
- __AUTOLOAD() if "$Apache::Constants::AUTOLOAD";
- goto &$Apache::Constants::AUTOLOAD;
- }
- else {
- require Carp;
- Carp::confess("__AUTOLOAD is undefined, ",
- "trying to AUTOLOAD $Apache::Constants::AUTOLOAD");
- }
-}
-
-if ($ENV{MOD_PERL}) {
- #outside of mod_perl this will recurse looking for __AUTOLOAD, grr
- *AUTOLOAD = \&autoload;
-}
-
-my %ConstNameCache = ();
-
-sub export {
- my $class = shift;
- for my $new (@_) {
- next if grep { $new eq $_ } @Apache::Constants::EXPORT_OK;
- push @Apache::Constants::EXPORT_OK, $new;
- if(%Apache::Constants::EXPORT) {
- $Apache::Constants::EXPORT{$new} = 1;
- }
- }
-}
-
-sub name {
- my($self, $const) = @_;
- require Apache::Constants::Exports;
- return $ConstNameCache{$const} if $ConstNameCache{$const};
-
- for (@Apache::Constants::EXPORT,
- @Apache::Constants::EXPORT_OK) {
- if ((\&{$_})->() eq $const) {
- return ($ConstNameCache{$const} = $_);
- }
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Constants - Constants defined in apache header files
-
-=head1 SYNOPSIS
-
- use Apache::Constants;
- use Apache::Constants ':common';
- use Apache::Constants ':response';
-
-=head1 DESCRIPTION
-
-Server constants used by apache modules are defined in
-B<httpd.h> and other header files, this module gives Perl access
-to those constants.
-
-=head1 EXPORT TAGS
-
-=over 4
-
-=item common
-
-This tag imports the most commonly used constants.
-
- OK
- DECLINED
- DONE
- NOT_FOUND
- FORBIDDEN
- AUTH_REQUIRED
- SERVER_ERROR
-
-=item response
-
-This tag imports the B<common> response codes, plus these
-response codes:
-
- DOCUMENT_FOLLOWS
- MOVED
- REDIRECT
- USE_LOCAL_COPY
- BAD_REQUEST
- BAD_GATEWAY
- RESPONSE_CODES
- NOT_IMPLEMENTED
- CONTINUE
- NOT_AUTHORITATIVE
-
-B<CONTINUE> and B<NOT_AUTHORITATIVE> are aliases for B<DECLINED>.
-
-=item methods
-
-This are the method numbers, commonly used with
-the Apache B<method_number> method.
-
- METHODS
- M_CONNECT
- M_DELETE
- M_GET
- M_INVALID
- M_OPTIONS
- M_POST
- M_PUT
- M_TRACE
- M_PATCH
- M_PROPFIND
- M_PROPPATCH
- M_MKCOL
- M_COPY
- M_MOVE
- M_LOCK
- M_UNLOCK
-
-=item options
-
-These constants are most commonly used with
-the Apache B<allow_options> method:
-
- OPT_NONE
- OPT_INDEXES
- OPT_INCLUDES
- OPT_SYM_LINKS
- OPT_EXECCGI
- OPT_UNSET
- OPT_INCNOEXEC
- OPT_SYM_OWNER
- OPT_MULTI
- OPT_ALL
-
-=item satisfy
-
-These constants are most commonly used with
-the Apache B<satisfies> method:
-
- SATISFY_ALL
- SATISFY_ANY
- SATISFY_NOSPEC
-
-=item remotehost
-
-These constants are most commonly used with
-the Apache B<get_remote_host> method:
-
- REMOTE_HOST
- REMOTE_NAME
- REMOTE_NOLOOKUP
- REMOTE_DOUBLE_REV
-
-=item http
-
-This is the full set of HTTP response codes:
-(NOTE: not all implemented here)
-
- HTTP_OK
- HTTP_MOVED_TEMPORARILY
- HTTP_MOVED_PERMANENTLY
- HTTP_METHOD_NOT_ALLOWED
- HTTP_NOT_MODIFIED
- HTTP_UNAUTHORIZED
- HTTP_FORBIDDEN
- HTTP_NOT_FOUND
- HTTP_BAD_REQUEST
- HTTP_INTERNAL_SERVER_ERROR
- HTTP_NOT_ACCEPTABLE
- HTTP_NO_CONTENT
- HTTP_PRECONDITION_FAILED
- HTTP_SERVICE_UNAVAILABLE
- HTTP_VARIANT_ALSO_VARIES
-
-=item server
-
-These are constants related to server version:
-
- MODULE_MAGIC_NUMBER
- SERVER_VERSION
- SERVER_BUILT
-
-=item config
-
-These are constants related to configuration directives:
-
- DECLINE_CMD
-
-=item types
-
-These are constants related to internal request types:
-
- DIR_MAGIC_TYPE
-
-=item override
-
-These constants are used to control and test the context of configuration
-directives.
-
- OR_NONE
- OR_LIMIT
- OR_OPTIONS
- OR_FILEINFO
- OR_AUTHCFG
- OR_INDEXES
- OR_UNSET
- OR_ALL
- ACCESS_CONF
- RSRC_CONF
-
-=item args_how
-
- RAW_ARGS
- TAKE1
- TAKE2
- TAKE12
- TAKE3
- TAKE23
- TAKE123
- ITERATE
- ITERATE2
- FLAG
- NO_ARGS
-
-=back
-
-=head1 Misuses
-
-You should be aware of the issues relating to using constant
-subroutines in Perl. For example this:
-
- $r->custom_response(FORBIDDEN => "File size exceeds quota.");
-
-will not set a custom response for C<FORBIDDEN>, but for the string
-C<"FORBIDDEN">, which clearly isn't what is expected. You'll get an
-error like this:
-
- [Tue Apr 23 19:46:14 2002] null: Argument "FORBIDDEN" isn't
- numeric in subroutine entry at ...
-
-Therefore, the best solution is not to use the hash notation for
-things that don't require it:
-
- $r->custom_response(FORBIDDEN, "File size exceeds quota.");
-
-Another important note is that instead of using HTTP codes, you should
-use designed for that purpose constants. Therefore, this is wrong:
-
- sub handler { return 200; }
-
-The correct use is:
-
- use Apache::Constants qw(OK);
- sub handler { return OK; }
-
-Also remember that C<OK != HTTP_OK>.
-
-=head1 AUTHORS
-
-Doug MacEachern, Gisle Aas and h2xs
-
-=cut
diff --git a/tags/v1_29/Constants/Makefile.PL b/tags/v1_29/Constants/Makefile.PL
deleted file mode 100644
index e23a9cb..0000000
--- a/tags/v1_29/Constants/Makefile.PL
+++ /dev/null
@@ -1,13 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- NAME => "Apache::Constants",
- VERSION_FROM => "Constants.pm",
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
-
diff --git a/tags/v1_29/File/.cvsignore b/tags/v1_29/File/.cvsignore
deleted file mode 100644
index 8e61110..0000000
--- a/tags/v1_29/File/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-pm_to_blib
-File.xs
diff --git a/tags/v1_29/File/File.pm b/tags/v1_29/File/File.pm
deleted file mode 100644
index db536e4..0000000
--- a/tags/v1_29/File/File.pm
+++ /dev/null
@@ -1,220 +0,0 @@
-package Apache::File;
-
-use strict;
-use Fcntl ();
-use mod_perl ();
-
-{
- no strict;
- $VERSION = '1.01';
- __PACKAGE__->mod_perl::boot($VERSION);
-}
-
-my $TMPNAM = 'aaaaaa';
-my $TMPDIR = $ENV{'TMPDIR'} || $ENV{'TEMP'} || '/tmp';
-my $Mode = Fcntl::O_RDWR()|Fcntl::O_EXCL()|Fcntl::O_CREAT();
-my $Perms = 0600;
-
-sub tmpfile {
- my $class = shift;
- my $limit = 100;
- my $r = Apache->request;
- while($limit--) {
- my $tmpfile = "$TMPDIR/${$}" . $TMPNAM++;
- ($tmpfile) = $tmpfile =~ /^([^<>|;*]+)$/; #untaint
- my $fh = $class->new;
- sysopen($fh, $tmpfile, $Mode, $Perms);
- $r->register_cleanup(sub { unlink $tmpfile }) if $r;
- if($fh) {
- return wantarray ? ($tmpfile,$fh) : $fh;
- }
- }
-}
-
-1;
-__END__
-
-=head1 NAME
-
-Apache::File - advanced functions for manipulating files at the server side
-
-=head1 SYNOPSIS
-
- use Apache::File ();
-
-=head1 DESCRIPTION
-
-Apache::File does two things: it provides an object-oriented interface
-to filehandles similar to Perl's standard IO::File class. While the
-Apache::File module does not provide all the functionality of
-IO::File, its methods are approximately twice as fast as the
-equivalent IO::File methods. Secondly, when you use Apache::File, it
-adds several new methods to the Apache class which provide support for
-handling files under the HTTP/1.1 protocol.
-
-=head1 Apache::File methods
-
-=over 4
-
-=item new()
-
-This method creates a new filehandle, returning the filehandle object
-on success, undef on failure. If an additional argument is given, it
-will be passed to the open() method automatically.
-
- use Apache::File ();
- my $fh = Apache::File->new;
-
- my $fh = Apache::File->new($filename) or die "Can't open $filename $!";
-
-=item open()
-
-Given an Apache::File object previously created with new(), this
-method opens a file and associates it with the object. The open()
-method accepts the same types of arguments as the standard Perl open()
-function, including support for file modes.
-
- $fh->open($filename);
-
- $fh->open(">$out_file");
-
- $fh->open("|$program");
-
-=item close()
-
-The close() method is equivalent to the Perl builtin close function,
-returns true upon success, false upon failure.
-
- $fh->close or die "Can't close $filename $!";
-
-=item tmpfile()
-
-The tmpfile() method is responsible for opening up a unique temporary
-file. It is similar to the tmpnam() function in the POSIX module, but
-doesn't come with all the memory overhead that loading POSIX does. It
-will choose a suitable temporary directory (which must be writable by
-the Web server process). It then generates a series of filenames using
-the current process ID and the $TMPNAM package global. Once a unique
-name is found, it is opened for writing, using flags that will cause
-the file to be created only if it does not already exist. This
-prevents race conditions in which the function finds what seems to be
-an unused name, but someone else claims the same name before it can be
-created.
-
-As an added bonus, tmpfile() calls the register_cleanup() method
-behind the scenes to make sure the file is unlinked after the
-transaction is finished.
-
-Called in a list context, tmpfile() returns the temporary file name
-and a filehandle opened for reading and writing. In a scalar context
-only the filehandle is returned.
-
-
- my($tmpnam, $fh) = Apache::File->tmpfile;
-
- my $fh = Apache::File->tmpfile;
-
-=back
-
-=head1 Apache Methods added by Apache::File
-
-When a handler pulls in Apache::File, the module adds a number of new
-methods to the Apache request object. These methods are generally of
-interest to handlers that wish to serve static files from disk or
-memory using the features of the HTTP/1.1 protocol that provide
-increased performance through client-side document caching.
-
-=over 4
-
-=item $r->discard_request_body()
-
-This method tests for the existence of a request body and if present,
-simply throws away the data. This discarding is especially important
-when persistent connections are being used, so that the request body
-will not be attached to the next request. If the request is malformed,
-an error code will be returned, which the module handler should
-propagate back to Apache.
-
- if ((my $rc = $r->discard_request_body) != OK) {
- return $rc;
- }
-
-=item $r->meets_conditions()
-
-In the interest of HTTP/1.1 compliance, the meets_conditions() method
-is used to implement ``conditional GET'' rules. These rules include
-inspection of client headers, including If-Modified-Since,
-If-Unmodified-Since, If-Match and If-None-Match.
-
-As far as Apache modules are concerned, they need only check the
-return value of this method before sending a request body. If the
-return value is anything other than OK, the module should return from
-the handler with that value. A common return value other than OK is
-HTTP_NOT_MODIFIED, which is sent when the document is already cached
-on the client side, and has not changed since it was cached.
-
- if((my $rc = $r->meets_conditions) != OK) {
- return $rc;
- }
- #else ... go and send the response body ...
-
-=item $r->mtime()
-
-This method returns the last modified time of the requested file,
-expressed as seconds since the epoch. The last modified time may also
-be changed using this method, although update_mtime() method is better
-suited to this purpose.
-
- my $date_string = localtime $r->mtime;
-
-=item $r->set_content_length()
-
-This method sets the outgoing Content-length header based on its
-argument, which should be expressed in byte units. If no argument is
-specified, the method will use the size returned by $r->filename. This
-method is a bit faster and more concise than setting Content-length in
-the headers_out table yourself.
-
- $r->set_content_length;
- $r->set_content_length(-s $r->finfo); #same as above
- $r->set_content_length(-s $filename);
-
-=item $r->set_etag()
-
-This method is used to set the outgoing ETag header corresponding to
-the requested file. ETag is an opaque string that identifies the
-currrent version of the file and changes whenever the file is
-modified. This string is tested by the meets_conditions() method if
-the client provide an If-Match or If-None-Match header.
-
- $r->set_etag;
-
-=item $r->set_last_modified()
-
-This method is used to set the outgoing Last-Modified header from the
-value returned by $r->mtime. The method checks that the specified time
-is not in the future. In addition, using set_last_modified() is faster
-and more concise than setting Last-Modified in the headers_out table
-yourself.
-
-You may provide an optional time argument, in which case the method
-will first call the update_mtime() to set the file's last modification
-date. It will then set the outgoing Last-Modified header as before.
-
- $r->update_mtime((stat $r->finfo)[9]);
- $r->set_last_modified;
- $r->set_last_modified((stat $r->finfo)[9]); #same as the two lines above
-
-=item $r->update_mtime()
-
-Rather than setting the request record mtime field directly, you can
-use the update_mtime() method to change the value of this field. It
-will only be updated if the new time is more recent than the current
-mtime. If no time argument is present, the default is the last
-modified time of $r->filename.
-
- $r->update_mtime;
- $r->update_mtime((stat $r->finfo)[9]); #same as above
- $r->update_mtime(time);
-
-=cut
diff --git a/tags/v1_29/File/Makefile.PL b/tags/v1_29/File/Makefile.PL
deleted file mode 100644
index cc7e625..0000000
--- a/tags/v1_29/File/Makefile.PL
+++ /dev/null
@@ -1,12 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- NAME => "Apache::File",
- VERSION_FROM => "File.pm",
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
diff --git a/tags/v1_29/INSTALL b/tags/v1_29/INSTALL
deleted file mode 100644
index ba383d4..0000000
--- a/tags/v1_29/INSTALL
+++ /dev/null
@@ -1,425 +0,0 @@
-=head1 NAME
-
-INSTALL - Apache mod_perl installation instructions
-
-=head1 DESCRIPTION
-
-How to build, test, configure and install mod_perl
-
-=head1 PREREQUISITES
-
-=over 3
-
-Apache version 1.3.6+
-
-Perl version 5.004 or higher (5.005_03 or higher recommended)
-
-Win32 users, see INSTALL.win32
-
-=back
-
-=head1 Build and install mod_perl
-
-=over 3
-
-In this current directory run:
-
- perl Makefile.PL
- make
- make test (optional)
- make install
-
-Makefile.PL will search for apache source trees to configure against,
-if no source trees are found, you will be prompted for a path to one.
-
-When asked:
-
- "Configure mod_perl with ../apache_xxx/src ?"
-
-answering 'y' just tells Makefile.PL where we can find src/*.h
-
-When asked:
-
- "Shall I build httpd in $adir for you?"
-
-answering 'y' will run ../apache_xxx/src/Configure
-and httpd will be built when running 'make'
-
-To avoid this prompt and default to the first apache source tree found
-to configure and build against, use the following command:
-
- perl Makefile.PL DO_HTTPD=1
-
-To avoid the prompts and avoid building httpd, use the following
-command:
-
- perl Makefile.PL NO_HTTPD=1
-
-You may wish see the instructions below on how to build by hand.
-
-In any case, you need to 'make install' so the perl side of mod_perl
-will be installed.
-
-By default, all callback hooks except for PerlHandler are turned off.
-You may edit src/modules/perl/Makefile, or enable when running
-Makefile.PL
-
-Possible arguments are:
-
- PERL_POST_READ_REQUEST
- PERL_TRANS
- PERL_INIT
-
- PERL_HEADER_PARSER
- PERL_AUTHEN
- PERL_AUTHZ
- PERL_ACCESS
- PERL_TYPE
- PERL_FIXUP
- PERL_LOG
- PERL_CLEANUP
- PERL_CHILD_INIT
- PERL_CHILD_EXIT
- PERL_DISPATCH
-
- PERL_STACKED_HANDLERS
- PERL_METHOD_HANDLERS
- PERL_SECTIONS
- PERL_SSI
-
-Example to enable PerlAuthenHandler and PerlFixupHandler:
-
- perl Makefile.PL PERL_AUTHEN=1 PERL_FIXUP=1
-
-To enable all callback hooks:
-
- perl Makefile.PL ALL_HOOKS=1
-
-To enable _all_ of the above, set EVERYTHING=1
-
- perl Makefile.PL EVERYTHING=1
-
-To enable tracing set PERL_TRACE=1
-
- perl Makefile.PL PERL_TRACE=1
-
-If a file name `makepl_args.mod_perl' is found in the same directory
-as the mod_perl build location with any of these options, it will be
-read in by Makefile.PL
-
-Example:
-
- % ls -1 .
- apache_1.3/
- makepl_args.mod_perl
- mod_perl-1.12/
-
- % cat makepl_args.mod_perl
- EVERYTHING=1 DO_HTTPD=1
-
- % cd mod_perl-1.12
- % perl Makefile.PL && make test && make install
-
-You'll see all options enabled and you will not be prompted for apache
-source location, it will default to ../apache_1.3
-
-There is a sample makepl_args.mod_perl in the eg/ directory, in which
-you might find a few options to enable experimental features to play
-with too! :-)
-
-=item Installation of Apache header files
-
-By default, the apache headers files are installed into
-$Config{sitearchexp}/auto/Apache/include
-
-The reason for installing the header files is to make life simple for
-module authors/users when building/installing a module that taps into
-some Apache C functions, e.g. Embperl, Apache::Peek, etc.
-
-If you wish not to install these files, tell Makefile.PL like so:
-
- perl Makefile.PL APACHE_HEADER_INSTALL=0
-
-=item Linking Perl extensions static with httpd
-
-Normally, if an extension is linked static with Perl it is listed in
-Config.pm's $Config{static_exts}, in which case, mod_perl will also
-link this extension static with httpd. However, if an extension is
-linked static with Perl after it is installed, it is not listed in
-Config.pm. You may either edit Config.pm and add these extensions, or
-configure mod_perl like so:
-
- perl Makefile.PL "PERL_STATIC_EXTS=Something::Static Another::One"
-
-=back
-
-=head1 Testing mod_perl
-
-=over 3
-
-Running 'make test' will start an httpd on port 8529 running under
-the uid and gid of the 'perl Makefile.PL' process, the httpd will
-be terminated when the tests are finshed.
-
-To change the default port say:
-
- perl Makefile.PL PORT=xxxx
-
-To simply start the newly build httpd before 'make install' run:
-
- make start_httpd
-
-To shutdown this httpd run:
-
- make kill_httpd
-
-See t/README on how to run the mod_perl test suite by hand
-
-NOTE to Ben-SSL users:
-httpsd does not seem to handle '/dev/null' as the location of certain
-files, you'll have to change these by hand.
-Tests are run with 'SSLDisable'
-
-=back
-
-=head1 Using an alternative Configuration file
-
-=over 3
-
-If you wish to use a B<Configuration> file without having mod_perl's
-Makefile.PL give it's copy to apache's B<Configuration>, configure
-like so:
-
- perl Makefile.PL CONFIG=Configuration.custom
-
-Where B<Configuration.custom> is the name of any file relative to the
-apache source tree you build against. See the "building apache and
-mod_perl by hand" instructions below on how to add the mod_perl
-information to your custom Configuration file.
-
-=back
-
-=head1 Building apache and mod_perl by hand
-
-=over 3
-
-** Only if you did not let Makefile.PL take care of this already **
-
-=item mod_perl Makefile
-
-When Makefile.PL is run $APACHE_SRC/modules/perl/Makefile will be
-modified to enable options (e.g. ALL_HOOKS=1)
-
-You may also edit mod_perl-x.xx/src/modules/perl/Makefile before
-or after running Makefile.PL if you wish
-
-=item Configuration
-
-Edit apache_xxx/src/Configuration, adding:
-
- AddModule modules/perl/libperl.a
-
-We suggest you add this entry at the end of the Configuration file if
-you want your callback hooks to have precedence over core handlers.
-
-Add the following to EXTRA_LIBS:
-
- EXTRA_LIBS=`perl -MExtUtils::Embed -e ldopts`
-
-Add the following to EXTRA_CFLAGS:
-
- EXTRA_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
-
-=item mod_perl source files
-
-Copy the source files into the apache build directory:
-
- % cp -r src/modules/perl apache_xxx/src/modules/
-
-Run:
-
- % perl Makefile.PL DYNAMIC=1 && make install
-
-When prompted, you must tell Makefile.PL where to find apache sources
-(for header files), answer 'n' when asked
-"Shall I build httpd in ../apache_x.x.x/src for you?"
-
-Follow the apache install docs from there
-
-=back
-
-=head1 Configuring and building with Stronghold
-
-=over 3
-
-You must first build and install Stronghold without mod_perl,
-following Stronghold's install procedure.
-
-Then, you may rebuild following the instructions above to:
-
- Build and install mod_perl
-
- or
-
- Building apache and mod_perl by hand
-
-Before running `make test', you must add your `StrongholdKey'
-to t/conf/httpd.conf
-
-I you are configuring by hand, be sure to edit
-src/modules/perl/Makefile and uncomment #APACHE_SSL
-
-For Solaris 2.5 users, there has been a report related to the REGEX
-that comes with Stronghold, after building Apache with mod_perl would
-produce core dumps.
-To get around this:
-
-In STRONGHOLD/src/Configuration, Change:
-
- Rule WANTHSREGEX=default
-
-To:
-
- Rule WANTHSREGEX=no
-
-=back
-
-=head1 Installing on multiple machines
-
-=over 3
-
-You may wish to build httpd once, then copy it to other machines.
-The Perl side of mod_perl needs the apache headers files to compile,
-to avoid dragging and build apache on all your other machines, there
-are a few Makefile targets to help you out:
-
- 'make tar_Apache'
-
-This will tar all files mod_perl installs in your 'site_perl' directory,
-into a file called 'Apache.tar'.
-You can then unpack this under 'site_perl' on another machine.
-
- 'make offsite-tar'
-
-This will copy all header files from the apache source directory you
-configured mod_perl against, then it will 'make dist' where you'll
-a mod_perl-x.xx.tar.gz created, ready to unpack on another machine
-to compile and install the Perl side of mod_perl.
-
-=back
-
-=head1 Notes
-
-=over 3
-
-=item Compilers
-
-On most systems, both Perl and Apache+mod_perl must be built using the
-same compiler. Sometimes Perl's configuration will choose one
-compiler, e.g. I<cc>, but Apache's configuration chooses a different
-one, e.g. I<gcc>. If you run into this problem, consult Perl's and
-Apache's INSTALL documents on how to ensure both are built with the
-same compiler.
-
-=item BSDI users
-
-Gary Shea <shea@xmission.com> discovered a nasty BSDI bug (seen in
-versions 2.1 and 3.0) related to dynamic loading and two workarounds:
-
-Turns out they use argv[0] to determine where to find the link
-tables at run-time, so if a program either changes argv[0],
-or does a chdir() (like apache!), it can easily confuse the
-dynamic loader. The short-term solutions to the problem are
-pitifully simple. Either of the following will work:
-
-1) Call httpd with a full path, e.g. /opt/www/bin/httpd
-
-2) Put the httpd you wish to run in a directory in your PATH
-before any other directory containing a version of httpd, then
-call it as 'httpd' -- don't use a relative path!
-
-=item AIX users
-
-If you build mod_perl as a DSO you will get core dumps as soon as you
-try to use xs modules in perl, e.g. use Fcntl or use Socket. The
-following patch to perl 5.005_3 does fix that problem:
-
- --- perl5.005_03/ext/DynaLoader/dl_aix.xs.orig Fri Mar 3 17:00:58 2000
- +++ perl5.005_03/ext/DynaLoader/dl_aix.xs Sun Apr 2 13:37:05 2000
- @@ -74,8 +74,8 @@
- } Module, *ModulePtr;
-
- /*
- - * We keep a list of all loaded modules to be able to call the fini
- - * handlers at atexit() time.
- + * We keep a list of all loaded modules to be able to reference count
- + * duplicate dlopen's.
- */
- static ModulePtr modList;
-
- @@ -88,7 +88,6 @@
-
- static void caterr(char *);
- static int readExports(ModulePtr);
- -static void terminate(void);
- static void *findMain(void);
-
- static char *strerror_failed = "(strerror failed)";
- @@ -165,7 +164,6 @@
- if (!mainModule) {
- if ((mainModule = findMain()) == NULL)
- return NULL;
- - atexit(terminate);
- }
- /*
- * Scan the list of modules if have the module already loaded.
- @@ -222,7 +220,16 @@
- mp->refCnt = 1;
- mp->next = modList;
- modList = mp;
- - if (loadbind(0, mainModule, mp->entry) == -1) {
- + /*
- + * Assume anonymous exports come from the module this dlopen
- + * is linked into, that holds true as long as dlopen and all
- + * of the perl core are in the same shared object. Also bind
- + * against the main part, in the case a perl is not the main
- + * part, e.g mod_perl as DSO in Apache so perl modules can
- + * also reference Apache symbols.
- + */
- + if (loadbind(0, (void *)dlopen, mp->entry) == -1 ||
- + loadbind(0, mainModule, mp->entry) == -1) {
- dlclose(mp);
- errvalid++;
- strcpy(errbuf, "loadbind: ");
- @@ -336,12 +343,6 @@
- safefree(mp->name);
- safefree(mp);
- return result;
- -}
- -
- -static void terminate(void)
- -{
- - while (modList)
- - dlclose(modList);
- }
-
- /* Added by Wayne Scott
-
-Please make sure that you rebuild both perl and mod_perl after applying
-this patch.
-
-=item more info
-
-Type 'perldoc mod_perl' for info on configuring, running
-and writing Apache/Perl scripts and modules.
-
-=back
-
-=head1 Support
-
-See the SUPPORT file.
-
-
-
-
-
diff --git a/tags/v1_29/INSTALL.apaci b/tags/v1_29/INSTALL.apaci
deleted file mode 100644
index cec3671..0000000
--- a/tags/v1_29/INSTALL.apaci
+++ /dev/null
@@ -1,300 +0,0 @@
-=head1 NAME
-
-INSTALL.apaci - Installing mod_perl under Unix with the new hybrid build environment for Apache 1.3
-
-=head1 SUMMARY
-
-This document describes how to build and install mod_perl as clean as possible
-with Apache 1.3 under Unix platforms by making use of both the Apache 1.3
-ConfigStart/End facility and the new Autoconf-style Interface (APACI). In
-addition the Dynamic Shared Object (DSO) mechanism can be used to build
-mod_perl as an Apache module which can be loaded on-demand under run-time.
-
-=head1 ATTENTION
-
-I<This currently is a pure Unix-based solution because the complete Apache 1.3
-source configuration mechanism currently is only workable under Unix. It
-doesn't work under the Win32 platform, so mod_perl cannot use it, too. For
-Win32 installation instructions please read the INSTALL.win32 document.>
-
-=head1 BACKGROUND
-
-The source configuration mechanism in Apache 1.3 provides four major
-highlights mod_perl can benefit from:
-
-=over 3
-
-=item B<Per-module configuration scripts (ConfigStart/End)>
-
-This is a mechanism modules can use to link theirself into the configuration
-processing. It is useful for automatically adjusting configuration and build
-parameters from the modules sources. It is triggered by
-C<ConfigStart>/C<ConfigEnd> sections inside I<modulename>C<.module> files.
-
-=item B<Apache Autoconf-style Interface (APACI)>
-
-This is the new top-level C<configure> script from Apache 1.3 which provides a
-GNU Autoconf-style interface. It is useful for configuring the source tree
-without manually editing any C<src/Configuration> files. Any parametrization
-can be done via command line options to the C<configure> script. Internally
-this is just a nifty a wrapper to the old C<src/Configure> script.
-
-=item B<Dynamic Shared Object (DSO) support>
-
-This is beside Windows NT support one of most interesting features in Apache
-1.3. Its a way to build Apache modules as so-called C<dynamic shared objects>
-(usually named I<modulename>C<.so>) which can be loaded via the C<LoadModule>
-directives from within Apache's C<httpd.conf> file. The benefit is that the
-modules is part of the C<httpd> program only on-demand, i.e. only when the
-user wants the module it is loaded into the address space of the C<httpd>
-module. This is for instance interesting for memory consumption and easy
-upgrade issues. The DSO mechanism is provided by Apache's C<mod_so.c> which
-needs to be compiled into the C<httpd> program. This is automatically done
-when DSO is enabled for module C<mod_xxx> via C<configure --enable-module=xxx>
-or by explicitly adding C<mod_so> via C<configure --enable-module=so>.
-
-=item B<APache eXtenSion (APXS) support tool>
-
-This is a new support tool from Apache 1.3 which can be used to build an
-Apache module as a DSO even B<outside> the Apache source-tree. One can say
-APXS is what MakeMaker and XS is for Perl. It knows the platform dependent
-build parameters for making DSO files and provides an easy way to run the
-build commands with them.
-
-=back
-
-Taking these four features together provides a way to integrate mod_perl into
-Apache in a very clean and smooth way. I<No patching of the Apache source tree
-is needed in the standard situation and even not only the source tree itself
-is needed in the APXS situation>.
-
-=head1 DESCRIPTION
-
-To benefit from the above described features a new hybrid build environment
-was created for the Apache-side of mod_perl. The Apache-side consists of the C
-source files of mod_perl which have to be compiled into the C<httpd> program.
-They are usually copied to the subdirectory C<src/modules/perl/> in the Apache
-source tree. To integrate this subtree into the Apache build process a lot of
-adjustments were done by mod_perl's C<Makefile.PL> in the past. And
-additionally the C<Makefile.PL> controlled the Apache build process. The
-side-effect of this approach was that it is both an not very clean and
-especially captive way. Because it assumed mod_perl is the only third-party
-modules which has to be integrated into Apache. This is very problematic.
-
-The new approach described below avoids these problems. It only prepares the
-C<src/modules/perl/> subtree inside the Apache source tree I<without>
-adjusting or editing anything else. This way no conflicts can occur. Instead
-mod_perl is activated (and then configures itself) when the Apache source tree
-is configured via standard APACI calls later.
-
-=head1 THE GAME ITSELF
-
-There are various ways available to build Apache with the new hybrid build
-environment:
-
-=head2 The all-in-one way
-
-If your goal is just to build and install Apache 1.3 with mod_perl out of
-their source trees and have no special interests in further adjusting or
-enhancing Apache do the following:
-
- $ gunzip <apache_1.3.X.tar.gz | tar xvf -
- $ gunzip <mod_perl-1.X.tar.gz | tar xvf -
- $ cd mod_perl-1.X
- $ perl Makefile.PL \
- APACHE_PREFIX=/path/to/install/of/apache \
- APACHE_SRC=../apache-1.3.X/src \
- DO_HTTPD=1 \
- USE_APACI=1 \
- EVERYTHING=1 \
- APACI_ARGS='[...]' \
- [...]
- $ make
- $ make test
- $ make install
-
-This builds Apache statically with mod_perl, installs Apache under
-C</path/to/install/of/apache/> and mod_perl into the C<site_lib> hierarchy of
-your existing Perl installation. All in one step.
-
-=head2 The flexible way
-
-This is the standard situation when you want to be flexible while building:
-Statically building mod_perl into the C<httpd> binary of Apache but via
-different steps, so you have a chance for other third-party Apache modules,
-etc.
-
-=over 3
-
-=item B<1. Prepare the Apache 1.3 source tree>
-
-The first step is the extract the distributions:
-
- $ gunzip <apache_1.3.X.tar.gz | tar xvf -
- $ gunzip <mod_perl-1.X.tar.gz | tar xvf -
-
-=item B<2. Install mod_perl's Perl-side and prepare the Apache-side>
-
-The second step is to install the Perl-side of mod_perl into the Perl system
-and prepare the C<src/modules/perl/> subdirectory inside the Apache source
-tree:
-
- $ cd mod_perl-1.XX
- $ perl Makefile.PL \
- APACHE_SRC=../apache_1.3.X/src \
- DO_HTTPD=1 \
- USE_APACI=1 \
- PREP_HTTPD=1 \
- EVERYTHING=1 \
- [...]
- $ make
- $ make test
- $ make install
- $ cd ..
-
-(The C<APACHE_SRC> set the path to your Apache source tree, the C<DO_HTTPD>
-option forces this path and only this path to be used, the C<USE_APACI> option
-triggers the new hybrid build environment and the C<PREP_HTTPD> forces only a
-preparation of the C<APACHE_SRC/modules/perl/> tree but no automatic builds.)
-
-This now prepares the Apache-side of mod_perl in the Apache source tree but
-don't touches anything else inside it. It then just builds the Perl-side of
-mod_perl and installs it into the Perl installation hierarchy.
-
-Important: If you use C<PREP_HTTPD> as described above, to complete the
-build you must go into an apache source directory and run C<make> and
-C<make install>.
-
-=item B<3. Additionally prepare other third-party modules>
-
-Now you still have a chance to prepare more third-party modules. For instance
-the PHP3 language can be added similarly to the above mod_perl procedure.
-
-=item B<4. Build the Apache package>
-
-Finally its time to build the Apache package and thus also the
-Apache-side of mod_perl and any other prepared third-party modules:
-
- $ cd apache_1.3.X
- $ ./configure \
- --prefix=/path/to/install/of/apache \
- --activate-module=src/modules/perl/libperl.a \
- [...]
- $ make
- $ make test
- $ make install
-
-(The C<--prefix> option is usually always needed and the C<--activate-module>
-option activates mod_perl for the configuration process and thus also for the
-build process.)
-
-=back
-
-Now bask in the glow and be happy to received a mod_perl-aware Apache 1.3
-system without having to mangle the Apache source tree for mod_perl plus the
-freedom of being able to adding more third-party modules.
-
-=head1 EXPERIMENTAL
-
-With Apache 1.3 there is support for building modules as Dynamic Shared
-Objects (DSO). So there is support for DSO in mod_perl now, too. I<BUT THIS
-IS STILL EXPERIMENTAL, SO BE WARNED!>
-
-=head2 When DSO can be used
-
-If you want to build C<mod_perl> as DSO you must make sure that Perl
-was built with system's native malloc(). If Perl was built with its
-own malloc() and C<-Dbincompat5005>, it pollutes the main C<httpd>
-program with I<free> and I<malloc> symbols. When C<httpd> restarts
-(happens at startup too), any references in the main program to
-I<free> and I<malloc> become invalid, and this causes memory leaks and
-segfaults.
-
-Notice that mod_perl's build system warns about this problem.
-
-With Perl 5.6.0+ this pollution can be prevented with
-C<-Ubincompat5005>. or C<-Uusemymalloc> for any version of Perl, but
-there's a chance that might hurt performance depending on platform, so
-C<-Ubincompat5005> is likely a better choice.
-
-If you get the following reports with Perl version 5.6.0+:
-
- % perl -V:usemymalloc
- usemymalloc='y';
- % perl -V:bincompat5005
- bincompat5005='define';
-
-rebuild Perl with C<-Ubincompat5005>.
-
-For Perl versions pre-5.6.x, if you get:
-
- % perl -V:usemymalloc
- usemymalloc='y';
-
-rebuild Perl with C<-Uusemymalloc>.
-
-now rebuild mod_perl.
-
-
-=head2 Build mod_perl as DSO inside Apache source tree via APACI
-
-We already said that the new mod_perl build environment is a hybrid one. What
-does it mean? It means for instance that the same C<src/modules/perl/> stuff
-can be used to build mod_perl as a DSO, too. I<And again without having to
-edit anything specially for this>. When you want to build C<libperl.so> (sorry
-for the name, C<libmodperl.so> would be more correct, but because of historic
-Apache issues the name has to be C<libperl.so>. Don't confuse this with
-the real C<libperl.a> or even C<libperl.so> from the Perl installation)
-all you have to do is to add one single option to the above steps.
-
-You have two options here, dependend on which way you choose above: If you
-choose the all-in-one way above then add
-
- USE_DSO=1
-
-to the mod_perl/Makefile.PL options. If you choose the flexible way then
-add
-
- --enable-shared=perl
-
-to the Apache/configure options.
-
-As you can see only an additional C<USE_DSO=1> or C<--enable-shared=perl>
-option is needed. Anything else is done automatically: C<mod_so> is
-automatically enabled, the Makefiles are adjusted automatically and even the
-C<install> target from APACI now additionally installs the C<libperl.so> into
-the Apache installation tree. And even more: The C<LoadModule> and
-C<AddModule> directives are automatically added to the C<httpd.conf> file.
-
-=head2 Build mod_perl as DSO outside Apache source tree via APXS
-
-Above we've seen how to build mod_perl as DSO I<inside> the Apache source
-tree. But there is a nifty alternative: Building mod_perl as DSO I<outside>
-the Apache source tree via the new Apache 1.3 support tool C<apxs> (APache
-eXtension). The advantage is obvious: You can extend an already installed
-Apache with mod_perl even if you don't have the sources (for instance you
-installed an Apache binary package from your vendor).
-
-Here are the steps:
-
- $ gunzip <mod_perl-1.X.tar.gz | tar xvf -
- $ cd mod_perl-1.X
- $ perl Makefile.PL \
- USE_APXS=1 \
- WITH_APXS=/path/to/bin/apxs \
- EVERYTHING=1 \
- [...]
- $ make
- $ make test
- $ make install
-
-This will build the DSO C<libperl.so> B<outside> the Apache source tree with
-the new Apache 1.3 support tool C<apxs> and installs it into the existing
-Apache hierarchy.
-
-=head1 AUTHOR
-
- Ralf S. Engelschall
- rse@engelschall.com
- rse@apache.org
-
diff --git a/tags/v1_29/INSTALL.raven b/tags/v1_29/INSTALL.raven
deleted file mode 100644
index d50b614..0000000
--- a/tags/v1_29/INSTALL.raven
+++ /dev/null
@@ -1,50 +0,0 @@
-This document explains how to install mod_perl with Raven SSL and Apache.
-Please consult http://www.covalent.net/support if you have additional
-questions.
-
-METHOD 1: Installing mod_perl dynamically (DSO) - Installs Raven SSL and
-mod_perl dynamically
-
-1) untar and gunzip Raven SSL and mod_perl into their respective directories
-2) cd raven_ssl-x.x.x. Install Raven SSL and Apache via
-./setup --with-apache
-3) cd mod_perl directory
-4) perl Makefile.PL USE_APXS=1 \
- WITH_APXS=/usr/local/apache/bin/apxs \
- EVERYTHING=1
- [...]
-5) make ; make install
-6) move the LoadModule and Addmodule Perl lines in the Apache configuration
-file above the
-<IfDefine SSL> lines
-
-
-
-METHOD 2: Installing mod_perl statically - Installs Raven SSL dynamically
-and mod_perl statically
-
-1) untar and gunzip Apache, Raven SSL and mod_perl into their respective
-directories
-2) cd raven_ssl-x.x.x. Install Raven SSL via ./setup
-3) /usr/local/raven/bin/raven_admin_tls
- select Option 1, 'Export Raven'
- note: this option exports the required EAPI patches and the needed Raven
-SSL module files into your Apache source tree
-4) cd mod_perl-x.x
-5) perl Makefile.PL APACHE_PREFIX=/path/to/apache_1.x.x \
- APACHE_SRC=/path/to/apache_x.x.x \
- EVERYTHING=1 \
- USE_APACI=1 \
- PREP_HTTPD=1 \
- DO_HTTPD=1
-6) make ; make install
-7) cd apache directory
-8) ./configure --target=httpsd \
- --enable-module=most \
- --enable-shared=max \
- --enable-suexec \
- --suexec-logfile=logs/suexec.log \
- --activate-module=src/modules/perl/libperl.a
-9) make ; make install
-10) in the Apache .conf file make sure that the AddModule mod_perl.c line is
-above <IfDefine SSL>
diff --git a/tags/v1_29/INSTALL.simple b/tags/v1_29/INSTALL.simple
deleted file mode 100644
index bcd189e..0000000
--- a/tags/v1_29/INSTALL.simple
+++ /dev/null
@@ -1,17 +0,0 @@
-#where APACHE_PREFIX is where you wish to have Apache installed
-#e.g. APACHE_PREFIX=/usr/local/apache
-
-% lwp-download http://www.apache.org/dist/apache_x.x.x.tar.gz
-
-% lwp-download http://perl.apache.org/dist/mod_perl-x.xx.tar.gz
-
-% tar -zxf apache_x.x.x.tar.gz
-
-% tar -zxf mod_perl-x.xx.tar.gz
-
-% cd mod_perl-x.xx
-
-# mod_perl will build Apache for you
-% perl Makefile.PL DO_HTTPD=1 USE_APACI=1 APACHE_PREFIX=/usr/local/apache
-
-% make test && make install
diff --git a/tags/v1_29/INSTALL.simple.mod_ssl b/tags/v1_29/INSTALL.simple.mod_ssl
deleted file mode 100644
index 362222e..0000000
--- a/tags/v1_29/INSTALL.simple.mod_ssl
+++ /dev/null
@@ -1,21 +0,0 @@
-#download the sources
-% lwp-download http://www.apache.org/dist/apache_x.xx.tar.gz
-% lwp-download http://perl.apache.org/dist/mod_perl-x.xx.tar.gz
-% lwp-download http://www.engelschall.com/sw/mod_ssl/distrib/mod_ssl-x.x.x-x.x.x.tar.gz
-
-#unpack the sources
-% tar -zxf mod_perl-x.xx
-% tar -zxf apache_x.xx.tar.gz
-% tar -zxf mod_ssl-x.x.x-x.x.x.tar.gz
-
-#configure
-% cd mod_ssl-x.x.x-x.x.x
-% ./configure --with-apache=../apache_x.xx
-% cd ../mod_perl-x.xx
-% perl Makefile.PL USE_APACI=1 EVERYTHING=1 \
- SSL_BASE=/opt/ssl \
- APACHE_PREFIX=/opt/apachessl \
- APACI_ARGS=--enable-module=ssl,--enable-module=rewrite
-
-# build/test/install Apache/mod_ssl/mod_perl
-% make test && make install
diff --git a/tags/v1_29/INSTALL.simple.ssl b/tags/v1_29/INSTALL.simple.ssl
deleted file mode 100644
index e0b8c6d..0000000
--- a/tags/v1_29/INSTALL.simple.ssl
+++ /dev/null
@@ -1,19 +0,0 @@
-
-% lwp-download http://www.apache.org/dist/apache_x.xx.tar.gz
-% lwp-download http://perl.apache.org/dist/mod_perl-x.xx.tar.gz
-% lwp-download http://www.apache-ssl.org/.../apache_x.x.x+ssl_x.xx.tar.gz
-% tar -zxf apache_x.xx.tar.gz
-% cd apache_x.xx
-% tar -zxf ../apache_x.x.x+ssl_x.xx.tar.gz
-% patch < SSLpatch
-% <edit the src/Configuration file if needed>
-% cd -
-% tar -zxf mod_perl-x.xx.tar.gz
-% cd mod_perl-x.xx
-% perl Makefile.PL && make test && make install
- (answer 'y' to the 2 prompts below)
-% Configure mod_perl with ../apache_x.xx/src ? [y] y
-% Shall I build httpd in ../apache_x.xx/src for you? [y] y
- (... see make stuff here ...)
-% cp ../apache_x.xx/src/httpsd <to wherever your httpsd lives>
-
diff --git a/tags/v1_29/INSTALL.simple.stronghold b/tags/v1_29/INSTALL.simple.stronghold
deleted file mode 100644
index ba1c82c..0000000
--- a/tags/v1_29/INSTALL.simple.stronghold
+++ /dev/null
@@ -1,13 +0,0 @@
-
-<download, build, install Stronghold as per the Stronghold docs>
-% lwp-download http://perl.apache.org/dist/mod_perl-x.xx.tar.gz
-% tar -zxf mod_perl-x.xx.tar.gz
-% cd mod_perl-x.xx
-% perl Makefile.PL && make test && make install
- (answer 'y' to the 2 prompts below)
-<if you've installed Stronghold in /usr/local/stronghold, you'll be
- prompted to configure and build against, answer 'y' to both:>
-% Configure mod_perl with /usr/local/stronghold/src ? [y] y
-% Shall I build httpd in /usr/local/stronghold/src for you? [y] y
- (... see make stuff here ...)
-% cp /usr/local/stronghold/src/httpsd <to wherever your httpsd lives>
diff --git a/tags/v1_29/INSTALL.win32 b/tags/v1_29/INSTALL.win32
deleted file mode 100644
index 4078573..0000000
--- a/tags/v1_29/INSTALL.win32
+++ /dev/null
@@ -1,204 +0,0 @@
-=head1 NAME
-
-INSTALL.win32 - Apache mod_perl installation instructions for Win32
-
-=head1 DESCRIPTION
-
-How to build, test, configure and install mod_perl under Win32
-
-=head1 PREREQUISITES
-
-=over 3
-
-patience - mod_perl is considered alpha under NT and Windows9x.
-
-MSVC++ 5.0+, Apache version 1.3-dev or higher and Perl 5.004_02 or higher.
-
-As of version 1.24_01, mod_perl will build on Win32 ActivePerls
-based on Perl-5.6.1 (builds 6xx). Versions 1.28_01 will build on
-ActivePerls 8xx, based on Perl-5.8.0.
-
-=back
-
-=head1 BINARIES
-
-See http://perl.apache.org/distributions.html for Win32 binaries,
-including ActivePerl ppms of mod_perl and some Apache::* packages.
-
-=head1 CHANGES
-
-Beginning with version 1.3.15, Apache has changed the convention
-for naming Win32 modules in order to follow that for Unix systems.
-Consequently, the name of the mod_perl module built here has
-been changed from ApacheModulePerl.dll to mod_perl.so. This
-is just a change in convention; if you are building mod_perl
-against pre-1.3.15 Apache sources, and wish to follow the old
-convention, simply copy mod_perl.so to your Apache modules directory
-as ApacheModulePerl.dll.
-
-=head1 BUILDING
-
-There are two ways to build mod_perl - with MS Developer Studio,
-and through command-line arguments to 'perl Makefile.PL'.
-
-=head2 Building with MS Developer Studio
-
-=over 3
-
-=item Setup the Perl side
-
-Run
-
- perl Makefile.PL
- nmake install
-
-This will install the Perl side of mod_perl and setup files for the
-library build.
-
-=item Build mod_perl.so
-
-Using MS developer studio,
-
- select "File -> Open Workspace ...",
- select "Files of type [Projects (*.dsp)]"
- open mod_perl-x.xx/src/modules/win32/mod_perl.dsp
-
-=item Settings
-
- select "Tools -> Options -> [Directories]"
-
- select "Show directories for: [Include files]"
-
-You'll need to add the following paths:
-
- C:\apache_x.xx\src\include
- . (should expand to C:\...\mod_perl-x.xx\src\modules\perl)
- C:\perl\lib\Core
-
-select "Project -> Add to Project -> Files" adding:
-
- perl.lib (or perl56.lib) (e.g. C:\perl\lib\Core\perl.lib)
- ApacheCore.lib (e.g. C:\Apache\ApacheCore.lib)
-
- select "Build -> Set Active Configuration... ->
- [mod_perl - Win32 Release]"
-
- select "Build -> Build mod_perl.so"
-
-You may see some harmless warnings, which can be reduced (along with
-the size of the DLL), by setting:
-
- "Project -> Settings -> [C/C++] -> Category: [Code Generation] ->
- Use runtime library: [Multithreaded DLL]
-
-=item Testing
-
-Once mod_perl.so is built and apache.exe is installed you may
-test mod_perl with:
-
- nmake test
-
-=item Apache setup
-
-You do not need to rebuild apache, just copy mod_perl.so to
-$SERVER_ROOT/modules
-
-=back
-
-=head2 Building with arguments to 'perl Makefile.PL'
-
-Generating the Makefile as, for example,
-
- perl Makefile.PL APACHE_SRC=\Apache
-
-will build mod_perl (including mod_perl.so) entirely from
-the command line. The arguments accepted include
-
-=over 3
-
-=item APACHE_SRC
-
-This can be one of two values: either the path to the Apache build
-directory (eg, ..\apache_1.3.xx), or to the installed Apache location
-(eg, \Apache). This is used to set the locations of ApacheCore.lib
-and the Apache header files. Also, mod_perl.so will be installed
-to APACHE_SRC\modules, if such a directory exists and if an
-INSTALL_DLL argument isn't used.
-
-=item INSTALL_DLL
-
-This gives the location of where to install mod_perl.so
-(eg, \Apache\modules). If not given, a value of APACHE_SRC\modules
-will be used, if this directory exists.
-
-=item INSTALL_LIB
-
-This gives the location of where to install mod_perl.lib
-(eg, \Apache\libexec). If not given, a value of APACHE_SRC\libexec
-will be used, if this directory exists.
-
-=item DEBUG
-
-If true (DEBUG=1), a Debug version will be built (this assumes
-that a Debug Apache has been built). If false, or not given,
-a Release version will be built.
-
-=item EAPI
-
-If true (EAPI=1), EAPI (Extended API) will be defined when
-compiling. This is useful when building mod_perl against mod_ssl
-patched Apache sources. If false, or not given, EAPI will
-not be defined.
-
-=back
-
-After this, running
-
- nmake
- nmake test
- nmake install
-
-will complete the installation.
-
-This latter method of building mod_perl will also install the
-Apache and mod_perl header files, which can then be accessed
-through the Apache::src module.
-
-=head1 CONFIGURATION
-
-Add this line to httpd.conf:
-
- LoadModule perl_module modules/mod_perl.so
-
-Be sure that 'C:\perl\bin' is in your path so apache can find perl.dll.
-You may also want to use the directive
-
- LoadFile "C:/Perl/bin/perl56.dll"
-
-(before loading mod_perl.so) to load your perl dll.
-
-See the cgi_to_mod_perl.pod and mod_perl.pod documents for general
-configuration.
-
-=head1 NOTES
-
-mod_perl-win32 is considered alpha, at the time of this writing,
-and Apache 1.xx is not as well developed for Win32 as the
-Unix counterpart.
-
-CGI::Switch does not work with apache_1.3a1 because basic_http_header()
-is not exported by the ApacheCore.dll. For now, just change:
-
- use CGI::Switch ();
- my $q = CGI::Switch->new;
-
- - to -
-
- use CGI ();
- my $q = CGI->new;
-
-There are basic multi-threading limitations of mod_perl 1 on
-Win32. See the Win32 documentation at http://perl.apache.org/
-for a discussion, and also for details of the use of mod_perl 2
-(with Apache 2) which overcomes this limitation.
-
diff --git a/tags/v1_29/LICENSE b/tags/v1_29/LICENSE
deleted file mode 100644
index 6d88f5e..0000000
--- a/tags/v1_29/LICENSE
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1996-2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
-
diff --git a/tags/v1_29/Leak/.cvsignore b/tags/v1_29/Leak/.cvsignore
deleted file mode 100644
index f8d0aec..0000000
--- a/tags/v1_29/Leak/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-pm_to_blib
-Leak.c
-Leak.bs
diff --git a/tags/v1_29/Leak/Leak.pm b/tags/v1_29/Leak/Leak.pm
deleted file mode 100644
index e4023d6..0000000
--- a/tags/v1_29/Leak/Leak.pm
+++ /dev/null
@@ -1,86 +0,0 @@
-package Apache::Leak;
-
-use strict;
-use DynaLoader ();
-use Exporter ();
-*import = \&Exporter::import;
-{
- no strict;
- @EXPORT = qw(leak_test);
- $VERSION = '1.00';
- @ISA = qw(DynaLoader);
- __PACKAGE__->bootstrap($VERSION);
-}
-
-sub LOOP_N () {2}
-
-sub leak_test (&;$$) {
- my($cv, $x, $fh) = @_;
- $x ||= LOOP_N;
- $fh ||= \*STDERR;
- my $first = $x;
-
- while($x--) {
- my $handle;
- my $enter = NoteSV($handle);
- my $leave = 0;
- print $fh "ENTER: $enter SVs\n";
- {
- $cv->();
- }
- $leave = CheckSV($handle);
- print $fh "\nLEAVE: $leave SVs\n";
- if($enter != $leave) {
- my $n = $leave - $enter;
- if($x+1 == $first) {
- }
- else {
- print $fh "!!! $n SVs leaked !!!\n";
- }
- }
- }
-}
-
-sub handler {
- my $r = shift;
- my $uri = $r->uri;
- my $handle;
- my $count = NoteSV($handle);
- $r->push_handlers(PerlLogHandler => sub {
- warn "Leak test for $uri:\n";
- warn " ENTER: $count SVs\n";
- $count = CheckSV($handle);
- warn " LEAVE: $count SVs\n";
- });
- 0;
-}
-
-1;
-__END__
-
-=head1 NAME
-
-Apache::Leak - Module for tracking memory leaks in mod_perl code
-
-=head1 SYNOPSIS
-
- use Apache::Leak;
-
- leak_test {
- my $obj = Foo->new;
- $obj->thingy;
- };
- #now look in error_log for results
-
-=head1 DESCRIPTION
-
-"Under Construction."
-
-=head1 SEE ALSO
-
-Devel::Leak
-
-=head1 AUTHOR
-
-Doug MacEachern
-Leak.xs derived from Nick Ing-Simmons' Devel::Leak
diff --git a/tags/v1_29/Leak/Leak.xs b/tags/v1_29/Leak/Leak.xs
deleted file mode 100644
index 5a1d2ec..0000000
--- a/tags/v1_29/Leak/Leak.xs
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- Copyright (c) 1995,1996-1998 Nick Ing-Simmons. All rights reserved.
- This program is free software; you can redistribute it and/or
- modify it under the same terms as Perl itself.
-*/
-/*
- modified by dougm for use with 5.004_04
- future versions may be made special for the mod_perl environment
-*/
-
-#include <EXTERN.h>
-#include <perl.h>
-#include <XSUB.h>
-
-#include "patchlevel.h"
-#if ((PATCHLEVEL == 4) && (SUBVERSION <= 76))
-#define PL_sv_arenaroot sv_arenaroot
-#endif
-
-typedef long used_proc _((void *, SV *, long));
-typedef struct hash_s *hash_ptr;
-
-#define MAX_HASH 1009
-
-static hash_ptr pile = NULL;
-
-static void
-LangDumpVec(char *who, int count, SV **data)
-{
- int i;
- PerlIO_printf(PerlIO_stderr(), "%s (%d):\n", who, count);
- for (i = 0; i < count; i++)
- {
- SV *sv = data[i];
- if (sv) {
- PerlIO_printf(PerlIO_stderr(), "%2d ", i);
- sv_dump(sv);
- }
- }
-}
-
-struct hash_s {
- struct hash_s *link;
- SV *sv;
- char *tag;
-};
-
-static char *lookup(hash_ptr *ht, SV *sv, void *tag)
-{
- unsigned hash = ((unsigned long) sv) % MAX_HASH;
- hash_ptr p = ht[hash];
- while (p) {
- if (p->sv == sv) {
- char *old = p->tag;
- p->tag = (char *) tag;
- return old;
- }
- p = p->link;
- }
- if ((p = pile))
- pile = p->link;
- else
- p = (hash_ptr) malloc(sizeof(struct hash_s));
- p->link = ht[hash];
- p->sv = sv;
- p->tag = (char *)tag;
- ht[hash] = p;
- return NULL;
-}
-
-static void check_arenas()
-{
- SV *sva;
- for (sva = PL_sv_arenaroot; sva; sva = (SV *) SvANY(sva)) {
- SV *sv = sva + 1;
- SV *svend = &sva[SvREFCNT(sva)];
- while (sv < svend) {
- if (SvROK(sv) && ((IV) SvANY(sv)) & 1) {
- warn("Odd SvANY for %p @ %p[%d]",sv,sva,(sv-sva));
- abort();
- }
- ++sv;
- }
- }
-}
-
-static long int sv_apply_to_used(void *p, used_proc *proc, long int n)
-{
- SV *sva;
- for (sva = PL_sv_arenaroot; sva; sva = (SV *) SvANY(sva)) {
- SV *sv = sva + 1;
- SV *svend = &sva[SvREFCNT(sva)];
-
- while (sv < svend) {
- if (SvTYPE(sv) != SVTYPEMASK) {
- n = (*proc) (p, sv, n);
- }
- ++sv;
- }
- }
- return n;
-}
-
-static char * t_old = "old";
-static char * t_new = "new";
-
-static long note_sv(void *p, SV *sv, long int n) {
- lookup((struct hash_s **)p, sv, t_old);
- return n+1;
-}
-
-static long note_used(hash_ptr **x)
-{
- hash_ptr *ht;
- Newz(603, ht, MAX_HASH, hash_ptr);
- *x = ht;
- return sv_apply_to_used(ht, note_sv, 0);
-}
-
-static long check_sv(void *p, SV *sv, long hwm)
-{
- char *state = lookup((struct hash_s **)p, sv, t_new);
- if (state != t_old) {
- PerlIO_printf(PerlIO_stderr(), "%s %p : ", state ? state : t_new, sv);
- sv_dump(sv);
- }
- return hwm+1;
-}
-
-static long check_used(hash_ptr **x) {
- hash_ptr *ht = *x;
- long count = sv_apply_to_used(ht, check_sv, 0);
- long i;
- for (i = 0; i < MAX_HASH; i++) {
- hash_ptr p = ht[i];
- while (p) {
- hash_ptr t = p;
- p = t->link;
- if (t->tag != t_new) {
- LangDumpVec(t->tag ? t->tag : "NUL", 1, &t->sv);
- }
- t->link = pile;
- pile = t;
- }
- }
- free(ht);
- *x = NULL;
- return count;
-}
-
-MODULE = Apache::Leak PACKAGE = Apache::Leak
-
-PROTOTYPES: Enable
-
-IV
-NoteSV(obj)
- hash_ptr * obj = NO_INIT
-
- CODE:
- RETVAL = note_used(&obj);
-
- OUTPUT:
- obj
- RETVAL
-
-IV
-CheckSV(obj)
- hash_ptr * obj
-
- CODE:
- RETVAL = check_used(&obj);
-
- OUTPUT:
- RETVAL
-
-void
-check_arenas()
-
-
diff --git a/tags/v1_29/Leak/Makefile.PL b/tags/v1_29/Leak/Makefile.PL
deleted file mode 100644
index 5a8eefc..0000000
--- a/tags/v1_29/Leak/Makefile.PL
+++ /dev/null
@@ -1,7 +0,0 @@
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
- NAME => "Apache::Leak",
- VERSION_FROM => "Leak.pm",
-);
-
diff --git a/tags/v1_29/Leak/typemap b/tags/v1_29/Leak/typemap
deleted file mode 100644
index bebea8b..0000000
--- a/tags/v1_29/Leak/typemap
+++ /dev/null
@@ -1,2 +0,0 @@
-hash_ptr * T_PTR
-
diff --git a/tags/v1_29/Log/.cvsignore b/tags/v1_29/Log/.cvsignore
deleted file mode 100644
index 8f4cf49..0000000
--- a/tags/v1_29/Log/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-pm_to_blib
-Log.xs
diff --git a/tags/v1_29/Log/Log.pm b/tags/v1_29/Log/Log.pm
deleted file mode 100644
index 7b59c0f..0000000
--- a/tags/v1_29/Log/Log.pm
+++ /dev/null
@@ -1,56 +0,0 @@
-package Apache::Log;
-
-use mod_perl ();
-
-$VERSION = '1.01';
-__PACKAGE__->mod_perl::boot($VERSION);
-
-1;
-__END__
-
-=head1 NAME
-
-Apache::Log - Interface to Apache logging
-
-=head1 SYNOPSIS
-
- use Apache::Log ();
- my $rlog = $r->log;
- $rlog->debug("You only see this if `LogLevel' is set to `debug'");
-
- my $slog = $r->server->log;
-
-=head1 DESCRIPTION
-
-The Apache::Log module provides an interface to Apache's I<ap_log_error>
-and I<ap_log_rerror> routines.
-
-=over 4
-
-=item emerg
-
-=item alert
-
-=item crit
-
-=item error
-
-=item warn
-
-=item notice
-
-=item info
-
-=item debug
-
-=back
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-=head1 SEE ALSO
-
-mod_perl(3), Apache(3).
-
-=cut
diff --git a/tags/v1_29/Log/Makefile.PL b/tags/v1_29/Log/Makefile.PL
deleted file mode 100644
index 12ab6f9..0000000
--- a/tags/v1_29/Log/Makefile.PL
+++ /dev/null
@@ -1,13 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- NAME => "Apache::Log",
- VERSION_FROM => "Log.pm",
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
-
diff --git a/tags/v1_29/MANIFEST b/tags/v1_29/MANIFEST
deleted file mode 100644
index 06340e9..0000000
--- a/tags/v1_29/MANIFEST
+++ /dev/null
@@ -1,238 +0,0 @@
-Changes
-Constants/Constants.pm
-Constants/Makefile.PL
-File/File.pm
-File/Makefile.PL
-ModuleConfig/ModuleConfig.pm
-ModuleConfig/Makefile.PL
-Log/Makefile.PL
-Log/Log.pm
-URI/Makefile.PL
-URI/URI.pm
-Util/Makefile.PL
-Util/Util.pm
-Server/Makefile.PL
-Server/Server.pm
-Connection/Makefile.PL
-Connection/Connection.pm
-LICENSE
-CREDITS
-INSTALL
-INSTALL.apaci
-SUPPORT
-INSTALL.win32
-INSTALL.raven
-MANIFEST
-STATUS
-Makefile.PL
-README
-apache-modlist.html
-mod_perl.gif
-mod_perl.pod
-mod_perl_cvs.pod
-mod_perl_tuning.pod
-cgi_to_mod_perl.pod
-mod_perl_traps.pod
-mod_perl_method_handlers.pod
-eg/makepl_args.mod_perl
-eg/README
-lib/mod_perl_hooks.pm.PL
-lib/mod_perl.pm
-lib/Apache/src.pm
-lib/Apache/httpd_conf.pm
-lib/Apache/testold.pm
-lib/Apache/Debug.pm
-lib/Apache/ExtUtils.pm
-lib/Apache/FakeRequest.pm
-lib/Apache/Opcode.pm
-lib/Apache/Options.pm
-lib/Apache/PerlRun.pm
-lib/Apache/PerlSections.pm
-lib/Apache/Registry.pm
-lib/Apache/RegistryNG.pm
-lib/Apache/RegistryBB.pm
-lib/Apache/RegistryLoader.pm
-lib/Apache/Resource.pm
-#lib/Apache/Safe.pm
-lib/Apache/SIG.pm
-lib/Apache/SizeLimit.pm
-lib/Apache/StatINC.pm
-lib/Apache/Symdump.pm
-lib/Apache/Constants/Exports.pm
-Apache/Apache.pm
-Apache/typemap
-Apache/Makefile.PL
-Symbol/Makefile.PL
-Symbol/Symbol.pm
-Symbol/Symbol.xs
-Symbol/test.pl
-Leak/Leak.pm
-Leak/Leak.xs
-Leak/Makefile.PL
-Leak/typemap
-src/modules/perl/apache_inc.h
-src/modules/perl/perl_PL.h
-src/modules/perl/Exports.c
-src/modules/perl/File.xs
-src/modules/perl/Constants.xs
-src/modules/perl/Apache.xs
-src/modules/perl/Connection.xs
-src/modules/perl/Server.xs
-src/modules/perl/ModuleConfig.xs
-src/modules/perl/Log.xs
-src/modules/perl/URI.xs
-src/modules/perl/Util.xs
-src/modules/perl/Table.xs
-src/modules/perl/ldopts
-src/modules/perl/mod_perl.c
-src/modules/perl/mod_perl.h
-src/modules/perl/op_mask.c
-src/modules/perl/mod_perl_opmask.c
-src/modules/perl/mod_perl_xs.h
-src/modules/perl/perl_util.c
-src/modules/perl/perlio.c
-src/modules/perl/perl_config.c
-src/modules/perl/Makefile
-src/modules/win32/mod_perl.dsp
-src/modules/win32/mod_perl.def
-src/opcodes.txt
-t/report.PL
-t/README
-t/TEST.PL
-t/TEST.win32
-t/conf/httpd.conf.pl
-t/conf/httpd.conf-dist
-t/conf/httpd.conf-win32
-t/conf/mod_perl_srm.conf
-t/net/config.pl.dist
-t/modules/actions.t
-t/modules/cgi.t
-t/modules/constants.t
-#t/modules/eperl.t
-#t/modules/embperl.t
-t/modules/file.t
-t/modules/httpdconf.t
-t/modules/log.t
-t/modules/uri.t
-t/modules/util.t
-t/modules/psections.t
-t/modules/perlrun.t
-t/modules/include.t
-t/modules/ssi.test
-t/modules/src.t
-t/modules/stage.t
-t/modules/status.t
-t/modules/symbol.t
-t/modules/module.t
-t/modules/request.t
-t/modules/cookie.t
-t/internal/api.t
-t/internal/auth.t
-t/internal/croak.t
-t/internal/dirmagic.t
-t/internal/error.t
-t/internal/headers.t
-t/internal/hooks.t
-t/internal/http-get.t
-t/internal/http-post.t
-t/internal/proxy.t
-t/internal/redirect.t
-t/internal/rwrite.t
-t/internal/stacked.t
-#t/internal/resolver.t
-t/internal/table.t
-t/internal/taint.t
-t/net/perl/have_module.pl
-t/net/perl/module.pl
-t/net/perl/file.pl
-t/net/perl/log.pl
-t/net/perl/uri.pl
-t/net/perl/util.pl
-t/net/perl/file_upload.cgi
-t/net/perl/tie_table.pl
-t/net/perl/qredirect.pl
-t/net/perl/hooks.pl
-t/net/perl/action.pl
-t/net/perl/api.pl
-t/net/perl/constants.pl
-t/net/perl/cgi.pl.PL
-t/net/perl/ssi.pl
-t/net/perl/echo
-t/net/perl/test
-t/net/perl/taint.pl
-t/net/perl/raw.pl
-t/net/perl/rwrite.pl
-t/net/perl/sym.pl
-t/net/perl/throw_error.pl
-t/net/perl/server_error.pl
-t/net/perl/dirty-script.cgi
-t/net/perl/dirty-test.cgi
-t/net/perl/dirty-lib
-t/net/perl/request-upload.pl
-t/net/perl/request-param.pl
-t/net/perl/request-cookie.pl
-#t/net/perl/resolver.pl
-t/net/perl/io/redir.pl
-t/net/perl/io/redir1.pl
-t/net/perl/io/redir2.pl
-t/net/perl/io/perlio.pl
-t/net/perl/io/ssi1.pl
-t/net/perl/io/ssi2.pl
-t/net/perl/io/include.pl
-t/net/perl/io/dir_config.pl
-t/net/perl/noenv/test.pl
-lib/Apache/RedirectLogFix.pm
-lib/Apache/Include.pm
-lib/Apache/Status.pm
-lib/Bundle/Apache.pm
-t/docs/book.gif
-t/docs/auth/.htaccess
-t/docs/dirmagic/cal.txt
-t/docs/null.txt
-t/docs/error.txt
-t/docs/env.iphtml
-t/docs/lists.ehtml
-t/docs/test.ep
-t/docs/test.html
-t/docs/rgy-include.shtml
-t/docs/badsyntax.pl
-t/docs/startup.pl
-t/docs/rl.pl
-t/docs/stacked.pl
-t/docs/LoadClass.pm
-t/docs/content.html
-t/docs/content.shtml
-t/docs/STAGE/u1/nada.txt
-t/TestDirectives/Makefile.PL
-t/TestDirectives/TestDirectives.pm
-benchmark/lwp-simple.pod
-benchmark/stopwatch.pod
-faq/Makefile
-faq/mod_perl_api.pod
-faq/mod_perl_cgi.pod
-faq/mod_perl_faq.pod
-faq/mjtg-news.txt
-htdocs/manual/mod/mod_perl.html
-Table/Makefile.PL
-Table/Table.pm
-apaci/Makefile.libdir
-apaci/Makefile.tmpl
-apaci/README
-apaci/configure
-apaci/libperl.module
-apaci/mod_perl.config.sh
-apaci/load_modules.pl.PL
-apaci/find_source.PL
-apaci/apxs_cflags.PL
-apaci/perl_config.PL
-apaci/mod_perl.exp
-.gdbinit
-INSTALL.simple
-INSTALL.simple.ssl
-INSTALL.simple.stronghold
-INSTALL.simple.mod_ssl
-t/docs/subr/.exists
-PerlRunXS/Makefile.PL
-PerlRunXS/PerlRunXS.pm
-src/modules/perl/PerlRunXS.xs
-
diff --git a/tags/v1_29/Makefile.PL b/tags/v1_29/Makefile.PL
deleted file mode 100644
index fc2578b..0000000
--- a/tags/v1_29/Makefile.PL
+++ /dev/null
@@ -1,2634 +0,0 @@
-#!perl
-
-BEGIN {
- $Is_Win32 = ($^O eq "MSWin32");
- $Is_Cygwin = ($^O =~ m/cygwin/g);
- if($Is_Win32) {
- require 5.004_02;
- require Win32;
- } elsif($Is_Cygwin) {
- require 5.005_03;
- } else {
- require 5.003_97;
- }
-}
-
-sub MMN_130 () { 19980527 }
-
-use ExtUtils::MakeMaker;
-use Config ();
-use FileHandle ();
-use DirHandle ();
-use File::Compare ();
-use File::Basename qw(dirname basename);
-use File::Path qw(mkpath rmtree);
-use Cwd;
-use File::Copy qw(cp);
-
-#use Apache::ExtUtils qw(%Config);
-
-unless (%Config) {
- *Config = \%Config::Config;
-}
-
-my %vcache = (); #SERVER_VERSION
-my %mcache = (); #MODULE_MAGIC_NUMBER
-
-#version 1.5 that ships with 5.003 is broken!
-*cp = sub {
- system "cp @_";
- for (@_) { -e $_ or die $! }
-} if $File::Copy::VERSION < 2.0;
-
-my $Is_dougm = (defined($ENV{USER}) && ($ENV{USER} eq "dougm"));
-my $USE_THREADS;
-my $thrlib = join '|', qw(-lpthread);
-
-if ($] < 5.005_60) {
- $USE_THREADS = (defined($Config{usethreads}) &&
- ($Config{usethreads} eq "define"));
-}
-else {
- $USE_THREADS = (defined($Config{use5005threads}) &&
- ($Config{use5005threads} eq "define"));
-}
-
-#hmm, seems the #include flip/flop isn't needed anymore
-#so ignore the stuff above for now
-$USE_THREADS = $ENV{PERL_USE_THREADS} || 0;
-
-require "./lib/mod_perl.pm";
-$VERSION = $mod_perl::VERSION = $mod_perl::VERSION;
-{
- $VERSION =~ s/(\d\d)(\d\d)$/$1_$2/;
-}
-{
- local *FH;
- open FH, "Changes";
- while(<FH>) {
- if(/^=item.*-dev/) {
- $VERSION .= "-dev";
- last;
- }
- last if /^=item/;
- }
- close FH;
-}
-
-use subs qw(iedit asrc);
-
-if($] < 5.004_04) {
- print <<EOF;
-I see you're building with Perl $]
-It is strongly recommended that you upgrade to 5.004_04 or higher,
-as there are memory leaks present in lower versions or Perl.
-EOF
-sleep(1);
-}
-
-#'
-
-%Apache::MyConfig::Setup = ();
-eval 'require Apache::MyConfig' ;
-
-$APACHE_SRC_DEFAULT = $@ ?
- '../apache_x.x/src' :
- $Apache::MyConfig::Setup{Apache_Src} ;
-
-#workaround bug in 5.8.0-RC1 where Cwd::cwd creates $ENV{IFS}
-#which makes apache configure fall apart on solaris
-my $ifs_exists = exists $ENV{IFS};
-my $PWD = cwd;
-delete $ENV{IFS} unless $ifs_exists;
-
-$ENV{APACHE_CWD} = $PWD;
-$ENV{PERL5LIB} = join ':', "$PWD/lib", $ENV{PERL5LIB};
-
-my %SSL = (
- "modules/ssl/apache_ssl.c" => "Ben-SSL",
- "apache_ssl.c" => "Ben-SSL",
- "mod_ssl.h" => "Stronghold",
- "modules/modssl" => "Stronghold",
-);
-
-unless (-e "t/docs/test.shtml") {
- cp "t/docs/test.html", "t/docs/test.shtml";
-}
-
-for (qw(.htaccess hooks.txt)) {
- my $file = "t/docs/$_";
- local *FH;
- open FH, ">$file" or
- die "can't write test file: $file: $!";
- chmod 0666, $file;
- close FH;
-}
-
-chmod 0644, "t/conf/mod_perl_srm.conf";
-
-mkdir "t/logs", 0777;
-chmod 0777, "t/logs";
-
-unless ($Is_Win32) {
- system "chmod a+x t/net/perl/* t/net/perl/io/*";
-}
-
-#generated by us at one time or another
-my(@do_clean) = qw{
- t/docs/.htaccess
- t/docs/hooks.txt
- src/Configuration
- lib/Apache/MyConfig.pm
- Apache/Apache.xs
- Constants/Constants.xs
- t/modules/ssi.t
- t/logs/error_log
- t/conf/srm.conf
- t/conf/dev-null
- t/logs/httpd.pid
- src/modules/perl/mod_perl_version.h
- t/net/perl/cgi.pl
- t/report
- t/TEST
- t/httpd
- apaci/find_source
- apaci/apxs_cflags
- apaci/mod_perl.config
-};
-#t/conf/httpd.conf
-#t/net/config.pl
-
-for(@do_clean) { unlink $_ }
-
-unless ($Is_Win32) {
- rename "t/conf/httpd.conf", "t/conf/httpd.conf.old";
-}
-
-rmtree "t/docs/stacked", 0, 0;
-
-gen_script("t/net/perl/cgi.pl");
-gen_script("t/report");
-gen_script("t/TEST");
-gen_script("apaci/find_source");
-gen_script("apaci/apxs_cflags");
-gen_script("apaci/perl_config", "$PWD/lib");
-gen_script("apaci/load_modules.pl");
-
-write_version_h("src/modules/perl");
-
-my(@test_pre_init) = qq(
-test_pre_init:
-);
-
-# Automatic setup support
-my(@adirs, %seen, %mft_map, %vers_map, $src_dir, $vers, $conf, $ans);
-%vers_map = (
- '1.1.1' => "Makefile.tmpl",
- '1.1.3' => "Makefile.tmpl",
- '1.2' => "Makefile.tmpl-1.2",
- '1.1.1Xcert-Sentry' => "Makefile.tmpl-XCert",
- '1.1.1Ben-SSL' => "Makefile.tmpl-Ben-SSL",
- '1.1.3Ben-SSL' => "Makefile.tmpl-Ben-SSL",
- '1.2Ben-SSL' => "",
- NONE => "",
-);
-
-$LIBPERL = "DEFAULT";
-$USE_APACI = $USE_DSO = $USE_APXS = 0;
-$WITH_APXS = "";
-$APACI_ARGS = "";
-@APACI_ARGS = ();
-$EVERYTHING = $EXPERIMENTAL = 0;
-$PERL_DEBUG = "";
-$PERL_DESTRUCT_LEVEL = "";
-$PERL_STATIC_EXTS = "";
-$PERL_USELARGEFILES = 1;
-$PERL_EXTRA_CFLAGS = "";
-$PERL_EXTRA_LIBS = "";
-$SSLCacheServerPort = 8539;
-$SSL_BASE = "";
-$Port = $ENV{HTTP_PORT} || 8529;
-#so Doug can 'make test' different-builds@sametime/samebox
-if(!$Is_Win32 and $ENV{RANDOM_PORT} and $$ > 8000 and $$ < 30000) {
- $PORT ||= $$;
- print "I'll use Port $PORT\n";
-}
-$PORT ||= $Port;
-$TARGET = "";
-$DO_HTTPD = $ENV{DO_HTTPD} || 0;
-$NO_HTTPD = $ENV{NO_HTTPD} || 0;
-$PREP_HTTPD = 0;
-$PERL_TRACE = 0;
-$ALL_HOOKS = 0;
-$APACHE_SRC = "";
-$APACHE_PREFIX = "";
-$APACHE_HEADER_INSTALL = 1;
-$PERL_SECTIONS = 0;
-$PERL_SSI = 0;
-$ADD_VERSION = 1;
-$STATIC = 1;
-$DYNAMIC = 0;
-$CONFIG = "";
-$ADD_MODULE = "";
-$PERL_DIRECTIVE_HANDLERS = 0;
-$PERL_TABLE_API = 0;
-$PERL_LOG_API = 0;
-$PERL_URI_API = 0;
-$PERL_UTIL_API = 0;
-$PERL_FILE_API = 0;
-$PERL_CONNECTION_API = 1; #these two were split out late in the game
-$PERL_SERVER_API = 1; #so they are on by default
-$PERL_RUN_XS = 0;
-$MOD_PERL_PREFIX;
-
-my %experimental = map { $_,1 } qw{
-PERL_AUTOPRELOAD
-PERL_RUN_XS
-PERL_MARK_WHERE
-DO_INTERNAL_REDIRECT
-PERL_TIE_SCRIPTNAME
-PERL_STASH_POST_DATA
-XS_IMPORT
-PERL_SAFE_STARTUP
-PERL_DEFAULT_OPMASK
-PERL_ORALL_OPMASK
-};
-
-my %PassEnv = map { $_,1 } qw(SSL_BASE);
-
-my @mp_args = (keys %PassEnv,
- qw(EXPERIMENTAL EVERYTHING DO_HTTPD NO_HTTPD CONFIG ADD_MODULE
- APACHE_PREFIX
- USE_APACI USE_DSO USE_APXS WITH_APXS APACI_ARGS PREP_HTTPD
- ALL_HOOKS ADD_VERSION STATIC DYNAMIC PORT XS_IMPORT));
-
-sub is_mp_arg {
- my $arg = shift;
-
- return 1 if $experimental{$arg};
-
- for (@mp_args) {
- return 1 if $arg eq $_;
- }
- return 0;
-}
-
-#callback hooks
-@callback_hooks = qw{
- PERL_DISPATCH
- PERL_CHILD_INIT PERL_CHILD_EXIT
- PERL_POST_READ_REQUEST PERL_TRANS PERL_HEADER_PARSER
- PERL_ACCESS PERL_AUTHEN PERL_AUTHZ
- PERL_TYPE PERL_FIXUP
- PERL_HANDLER PERL_LOG
- PERL_INIT PERL_CLEANUP PERL_RESTART
- PERL_STACKED_HANDLERS
- PERL_METHOD_HANDLERS
- PERL_DIRECTIVE_HANDLERS
- PERL_TABLE_API
- PERL_LOG_API
- PERL_URI_API
- PERL_UTIL_API
- PERL_FILE_API
- PERL_CONNECTION_API
- PERL_SERVER_API
-};
-
-$callback_alias{PERL_INIT} = "PERL_HEADER_PARSER";
-$callback_alias{PERL_CLEANUP} = "PERL_LOG";
-%callback_hooks = map { $_,0 } @callback_hooks;
-$callback_hooks{PERL_HANDLER} = 1; #PerlHandler always on
-%cant_hook = ();
-
-my @mm_args;
-{
- my($fh,$file);
- for (qw(./ ../ ./. ../.), "$ENV{HOME}/.") {
- last if $fh = FileHandle->new($file = $_."makepl_args.mod_perl");
- }
- if($fh) {
- print "Reading Makefile.PL args from $file\n";
- while(<$fh>) {
- chomp;
- s/^\s+//; s/\s+$//;
- next if /^#/ || /^$/;
- last if /^__END__/;
- if(/^APACI_ARGS/) {
- s/^APACI_ARGS=//;
- push @APACI_ARGS, $_;
- }
- else {
- unshift @ARGV, split /\s+/, $_;
- }
- }
- close $fh;
- }
- if(@APACI_ARGS) {
- unshift @ARGV, "APACI_ARGS=" . join(",", @APACI_ARGS);
- }
-}
-
-my $vcpp = ($Config{cc} =~ /^cl(\.exe)?$/);
-my %win32_args;
-my %win32_accept = map {$_ => 1}
- qw(APACHE_SRC INSTALL_DLL INSTALL_LIB DEBUG EAPI);
-
-while($_ = shift) {
- ($k,$v) = split /=/, $_, 2;
- if ($vcpp) {
- if ($win32_accept{$k}) {
- $win32_args{$k} = ($k eq 'DEBUG' or $k eq 'EAPI') ? 1 : $v;
- }
- else {
- push @mm_args, $_;
- }
- next;
- }
- unless (/^(PERL|APACHE)/ or is_mp_arg($k)) {
- push @mm_args, $_;
- }
-
- if ($k eq 'PREFIX') {
- require File::Spec;
- $MOD_PERL_PREFIX =
- File::Spec->catfile($v, $Config{'installstyle'}, 'site_perl',
- $Config{'version'}, $Config{'archname'});
- }
-
- $v = 1 unless defined $v;
- if($experimental{$k}) {
- $experimental{$k}++;
- $PERL_EXTRA_CFLAGS .= " -D${k}=1";
- }
- ${$k} = $v, next if defined ${$k};
- $callback_hooks{$k} = $v if exists $callback_hooks{$k};
-}
-
-my $win32_auto;
-if ($vcpp and $win32_args{APACHE_SRC}) {
- $EVERYTHING = 1;
- my $fixed_apsrc = win32_fix_path($win32_args{APACHE_SRC});
- $APACHE_SRC = -d "$fixed_apsrc/include" ? $fixed_apsrc :
- (-d "$fixed_apsrc/src/include" ? $fixed_apsrc . '/src' :
- die "Cannot find the Apache include directory under $fixed_apsrc");
- $win32_auto = 1;
- unless ($win32_args{INSTALL_DLL}) {
- my $w32_ap_mod = $fixed_apsrc . '/modules';
- $win32_args{INSTALL_DLL} = $w32_ap_mod if -d $w32_ap_mod;
- }
- unless ($win32_args{INSTALL_LIB}) {
- my $w32_ap_lib = $fixed_apsrc . '/libexec';
- $win32_args{INSTALL_LIB} = $w32_ap_lib if -d $w32_ap_lib;
- }
-}
-
-my %very_experimental = map {$_,1}
-qw(PERL_DEFAULT_OPMASK PERL_SAFE_STARTUP PERL_ORALL_OPMASK
- PERL_STARTUP_DONE_CHECK PERL_DSO_UNLOAD);
-
-if($EXPERIMENTAL) {
- for (keys %experimental) {
- next if $very_experimental{$_}; #have to *really* ask for this one
- next if $experimental{$_}++ > 1;
- $PERL_EXTRA_CFLAGS .= " -D$_=1";
- }
-}
-
-if($experimental{PERL_DEFAULT_OPMASK} > 1) {
- $experimental{PERL_SAFE_STARTUP} = 2;
- $PERL_EXTRA_CFLAGS .= " -DPERL_SAFE_STARTUP=1";
-}
-
-for (keys %PassEnv) {
- $ENV{$_} = $$_ if $$_;
-}
-
-$USE_APACI = 1 if $USE_DSO;
-if(0) {
-#if($USE_DSO or $USE_APXS and !$DO_HTTPD) {
- print "*" x 65, $/;
- print <<EOF;
-* WARNING: mod_perl as a DSO is known to fail on most platforms *
-* We recommend linking mod_perl static instead *
-EOF
- print "*" x 65, $/;
- my $ans = prompt("Continue?", "n");
- if($ans =~ /^n$/i) {
- print "Aborting build process\n";
- exit;
- }
-}
-
-if ($USE_APXS) {
- if(-e $USE_APXS and !(-d _)) {
- $WITH_APXS = $USE_APXS;
- }
- if(not -x $WITH_APXS and $USE_APXS and $APACHE_PREFIX) {
- for (qw(sbin bin)) {
- last if -e ($WITH_APXS = "$APACHE_PREFIX/$_/apxs");
- }
- }
- unless (-x $WITH_APXS) {
- chomp($WITH_APXS = `which apxs`);
- }
-
- print "Will configure via APXS";
- print " (apxs=$WITH_APXS)" if $WITH_APXS;
- print "\n";
- ++$NO_HTTPD;
-}
-
-system_sanity_check();
-
-if ($PERL_USELARGEFILES and $] >= 5.006) {
- $PERL_EXTRA_CFLAGS .= " $Config{ccflags}";
-}
-
-# apache-1.3.xx won't compile with -D_GNU_SOURCE
-$PERL_EXTRA_CFLAGS =~ s/-D_GNU_SOURCE//;
-
-if ($USE_APACI) {
- print "Will configure via APACI";
- if($USE_DSO) {
- print " (DSO enabled)";
- }
- $NO_HTTPD = 1 if $PREP_HTTPD;
- print "\n";
-}
-
-@ARGV = @mm_args;
-$STATIC = 0 if $DYNAMIC;
-$Configuration = $CONFIG || "Configuration";
-
-for (keys %callback_alias) {
- $callback_hooks{$callback_alias{$_}}++
- if $callback_hooks{$_};
-}
-
-if($EVERYTHING) {
- @callback_hooks{qw(PERL_STACKED_HANDLERS PERL_METHOD_HANDLERS)} = (1) x 2;
- for(qw(ALL_HOOKS PERL_SSI PERL_SECTIONS PERL_DIRECTIVE_HANDLERS
- PERL_LOG_API PERL_URI_API PERL_UTIL_API PERL_TABLE_API PERL_FILE_API)) {
- $$_ = 1;
- }
-}
-
-if($ALL_HOOKS) {
- for (@callback_hooks) {
- next if /(Api|Table|Handler)s?$/i;
- $callback_hooks{$_}++;
- }
-}
-
-if($DYNAMIC) {
- $PERL_DIRECTIVE_HANDLERS = $PERL_TABLE_API = $PERL_FILE_API =
- $PERL_LOG_API = $PERL_URI_API = $PERL_UTIL_API = 1;
-}
-
-my @xs_modules = qw{
-Apache Apache::Constants
-};
-
-if($Is_Win32) {
- $NO_HTTPD = 1;
- $PERL_DIRECTIVE_HANDLERS = 1;
-}
-
-
-unless ($NO_HTTPD && !$PREP_HTTPD) {
-for $src_dir ($APACHE_SRC, <../apache*/src>,
- <../stronghold*/src>, </usr/local/stronghold*/src>,
- "../src", "./src")
-{
- next unless -d $src_dir;
- next if $seen{$src_dir}++;
- next unless $vers = httpd_version($src_dir);
- unless(exists $vers_map{$vers}) {
- print STDERR "Apache version '$vers' unsupported\n";
- next;
- }
- $mft_map{$src_dir} = $vers_map{$vers};
- #print STDERR "$src_dir -> $vers_map{$vers}\n";
- push @adirs, $src_dir;
- $modified{$src_dir} = (stat($src_dir))[9];
- last if $DO_HTTPD;
-}
-
-unless (@adirs) {
- print "Enter `q' to stop search\n";
- while(1) {
- print "Please tell me where I can find your apache src\n" ;
- $src_dir = prompt("", $APACHE_SRC_DEFAULT);
- last if $src_dir eq "q";
- if(-d $src_dir) {
- push(@adirs, $src_dir);
- $mft_map{$src_dir} = $vers_map{httpd_version($src_dir)};
- last;
- }
- else {
- print "Can't stat `$src_dir'\n";
- }
- }
-}
-
-}
-
- if($PERL_EXTRA_CFLAGS) {
- $PERL_EXTRA_CFLAGS = join(" ", split(",", $PERL_EXTRA_CFLAGS));
- $PERL_EXTRA_CFLAGS =~ s/\s+/ /g;
- }
-
- if($PERL_DEBUG) {
- my $lib = "$Config{archlibexp}/CORE/libperld$Config{lib_ext}";
- if (-e $lib) {
- $LIBPERL = "-lperld";
- $libperl = " -- $LIBPERL";
- }
- $PERL_EXTRA_CFLAGS .= " -g";
- $PERL_TRACE=1;
- $PERL_DESTRUCT_LEVEL=2;
- print "DEBUG mode...\n";
- print "...adding `-g' to EXTRA_CFLAGS\n";
- print "...turning on PERL_TRACE\n";
- print "...setting PERL_DESTRUCT_LEVEL=2\n";
- print "...linking against libperld\n" if $libperl;
- sleep(1);
- }
-
- $PERL_EXTRA_CFLAGS .= " -DPERL_DESTRUCT_LEVEL=$PERL_DESTRUCT_LEVEL"
- if $PERL_DESTRUCT_LEVEL;
-
-for $adir (sort {$modified{$b} <=> $modified{$a}} @adirs) {
- $conf = "$adir/$Configuration";
- $httpd_h = asrc($adir)."/httpd.h";
-
- if (-e $httpd_h) {
- unless($NO_HTTPD and not $DYNAMIC and not $PREP_HTTPD) {
- unless($DO_HTTPD) {
- $ans = prompt("Configure mod_perl with $adir ?", "y");
- next unless $ans =~ /^y$/i;
- }
- $APACHE_SRC = $adir;
- $IsBenSSL = -e "$adir/apache_ssl.c";
- last unless(-e $conf || -e "$conf.tmpl"); #building from 'make offsite-tar'
- }
- #++$NO_HTTPD if $USE_APACI;
- my $mmn = magic_number($APACHE_SRC);
- if(($mmn < MMN_130) and $USE_APACI) { #1.3.0
- print "Sorry, need 1.3.0+ for USE_APACI\n";
- $USE_APACI = $USE_DSO = 0;
-
- }
- for my $api (qw(LOG URI UTIL FILE TABLE)) {
- local $_ = join "_", "PERL", $api, "API";
- if(($mmn < MMN_130) and $$_) { #1.3.0
- $$_ = 0;
- $cant_hook{$_} = "(need 1.3.0 or higher)";
- }
- }
- if($USE_DSO and $PERL_SSI) {
- $PERL_SSI=0;
- $cant_hook{PERL_SSI} = "(doesn't work w/ USE_DSO=1)";
- }
- unless ($DO_HTTPD or $NO_HTTPD) {
- $ans = prompt("Shall I build httpd in $adir for you?", "y");
- ++$NO_HTTPD, ++$PREP_HTTPD unless $ans =~ /^y$/i;
- }
-
- if($NO_HTTPD) {
- #must generate Makefile.config for 1.3bx
- unless (-e "$adir/Makefile.config") {
- my $cfgfile = $CONFIG ? $CONFIG : "Configuration";
- print "(cd $adir && ./Configure -file $cfgfile)";
- }
- }
-
- #copy the source files
- if(!$NO_HTTPD or $USE_APACI or $PREP_HTTPD) {
- mkpath "$adir/modules/perl";
- #ignore make's output here
- `(cd $adir/modules/perl && make clean 2> /dev/null)`;
-
- local(*MANI);
- open MANI, "MANIFEST" or die "open MANIFEST $!";
- my $atopdir = dirname($adir);
-
- unlink "$atopdir/perlxsi.c";
- #only rm and cp files mod_perl ships with
- while(<MANI>) {
- next unless m,^src/modules/perl/,; chomp;
- #print "rm -f $adir/$_\n";
- unlink "$atopdir/$_";
- next if not m,.+\.(xs|c|h)$, and $USE_APACI;
- next if $DYNAMIC and /\.xs$/;
- #print "cp $_ $atopdir/$_\n" if $USE_APACI;
- my $dest = "$atopdir/$_";
- cp $_, $dest;
- #$mani_src{$_}++;
- }
- close MANI;
-
- cp "src/modules/perl/mod_perl_version.h",
- "$atopdir/src/modules/perl/mod_perl_version.h";
-
- if($USE_APACI) {
- open MANI, "MANIFEST" or die "open MANIFEST $!";
- while(<MANI>) {
- next unless m,^apaci/,; chomp;
- s/\.PL$//;
- (my $to = $_) =~ s,^apaci/,src/modules/perl/,;
- unlink "$atopdir/$to";
- print "cp $_ $atopdir/$to\n";
- my $dest = "$atopdir/$to";
- cp $_, $dest;
- chmod 0755, $dest if -x $_;
- }
- close MANI;
- }
- }
-
- ($APACHE_ROOT = $APACHE_SRC) =~ s,/src/?$,,;
-
- last if $NO_HTTPD; # or $USE_APACI;
-
- unless(-e "src/Configuration" and (-M "src/Configuration" < -M $conf) and not $USE_APACI) {
- unless(-e $conf) {
- cp "$conf.tmpl", $conf;
- }
- cp $conf, "src/Configuration";
- $conf = "src/Configuration";
-
- conf_fixup("$adir/Makefile.tmpl", $conf);
- }
- }
-
- if ($NO_HTTPD) {
-
- }
- elsif($USE_APACI) {
- #take care of things later
- }
- else {
- $conf = "src/Configuration";
- my($dash_make, $cfgfile);
- $dash_make = " -make $PWD/src/$mft_map{$adir} "
- if $can_dash_make{asrc $adir} and $mft_map{$adir};
- #print STDERR "(cd $adir; ./Configure${dash_make} -file $PWD/$conf)\n";
- $cfgfile = $CONFIG ? $CONFIG : "$PWD/$conf";
- $dash_make ||= "";
- system "(cd $adir && ./Configure${dash_make} -file $cfgfile)";
-
- open FH, "$APACHE_SRC/Makefile" or
- die "can't open $APACHE_SRC/Makefile $!";
- while(<FH>) {
- $SSL_BASE ||= $1 if /^\s*SSL_BASE\s*=\s*(.*)/;
- $EXTRA_CFLAGS = $1 if /CFLAGS1\s*=\s*(.*)/;
- $SSLINCS = $1 if /SSLINCS\s*=\s*(.*)/;
- }
- close FH;
-
- if($SSL_BASE) {
- $SSL_INCLUDE = " -I$SSL_BASE/include ";
- $SSL_CFLAGS = "-DAPACHE_SSL $SSL_INCLUDE";
- }
-
- #stronghold
- if($SSLINCS) {
- $SSL_INCLUDE = " $SSLINCS ";
- $SSL_CFLAGS = "-DAPACHE_SSL $SSL_INCLUDE";
- }
- }
- print "EXTRA_CFLAGS: $EXTRA_CFLAGS\n" if $EXTRA_CFLAGS;
- print "SSL_CFLAGS: $SSL_CFLAGS\n" if $SSL_CFLAGS;
- last if $APACHE_SRC;
-}
-
-if($PERL_DIRECTIVE_HANDLERS) {
- push @xs_modules, "Apache::ModuleConfig";
- $callback_hooks{PERL_DIRECTIVE_HANDLERS} = 1;
-}
-
-#if($PERL_RUN_XS or $experimental{PERL_RUN_XS} > 1) {
-if (0) {
- my $mmn = $USE_APXS ? MMN_130 : magic_number($APACHE_SRC);
- if($mmn >= MMN_130) {
- push @xs_modules, "Apache::PerlRunXS";
- }
- else {
- $PERL_RUN_XS = 0;
- $experimental{PERL_RUN_XS} = 0;
- print "Sorry, need 1.3.0+ for Apache::PerlRunXS\n";
- }
-}
-for (qw(Log URI Util Connection Server File Table)) {
- my $s = "PERL_".uc($_)."_API";
- if($$s or $Is_Win32) {
- push @xs_modules, "Apache::$_";
- $callback_hooks{$s} = 1;
- }
-}
-
-my @xs_mod_snames = map { (my $s = $_) =~ s/.*:://; $s } @xs_modules;
-
-win32_setup() if $Is_Win32;
-
-if($DYNAMIC) {
- print "Will build Apache::* extensions dynamic\n";
- for (@xs_mod_snames) {
- cp "src/modules/perl/${_}.xs", "${_}/${_}.xs";
- }
-}
-
-if($APACHE_SRC or $USE_APXS) {
- ++$STATIC if grep { $_ eq lc($Config{osname}) } qw(aix svr4 unixware);
-
- my $mmn = $USE_APXS ? MMN_130 : magic_number($APACHE_SRC);
- my $httpdv = $USE_APXS ? 130 : httpd_version($APACHE_SRC,1);
-
- unless($httpdv >= 130) {
- phat_warn("Apache Version 1.3.0 required, aborting...");
- exit(1);
- }
-
- if($httpdv >= 130) {
- if($callback_hooks{PERL_CHILD_INIT}) {
- $My::child_init++;
- }
- }
- else {
- $callback_hooks{PERL_CHILD_INIT} = 0;
- $cant_hook{PERL_CHILD_INIT} =
- "(need 1.3.0 or higher)";
- }
-
- if($mmn >= 19970728) {
- $callback_hooks{PERL_CHILD_EXIT} = $My::child_exit =
- $callback_hooks{PERL_CHILD_INIT} = $My::child_init = 1;
- }
- else {
- $callback_hooks{PERL_CHILD_EXIT} = 0;
- $cant_hook{PERL_CHILD_EXIT} =
- "(need 1.3.0 or higher)";
- }
-
- unless($mmn >= 19970825) {
- $callback_hooks{PERL_POST_READ_REQUEST} = 0;
- $cant_hook{PERL_POST_READ_REQUEST} =
- "(need 1.3.0 or higher)";
- }
-
- setup_for_static() unless $USE_APXS;
-
- iedit "$APACHE_SRC/modules/perl/Makefile",
- "s!^PERL\\s*=.*!PERL=$Config{'perlpath'}!" unless $USE_APACI or $USE_APXS;
-
- for (@callback_hooks) {
- ($k,$v) = ($_,$callback_hooks{$_});
-
- unless ($USE_APACI or $USE_APXS) {
- iedit "$APACHE_SRC/modules/perl/Makefile", "s/^$k /#$k /" if $v;
- }
-
- $why = ($cant_hook{$k} || "(enable with $k=1)") unless $v;
- $k =~ s/([A-Z]+)/ucfirst(lc($1))/ge;
- $k =~ s/_//g;
- $k .= "Handler" unless $k =~ /(Api|Table|Handler)s?$/;
- push @mod_perl_hooks, $k;
- print $k . '.' x (28 - length($k));
- print $v ? "enabled\n" : "disabled $why\n";
- }
-
- unless($httpdv >= 120) {
- $PERL_SECTIONS = $PERL_SSI = 0;
- $cant_hook{PERL_SECTIONS} = $cant_hook{PERL_SSI} =
- "(need 1.2.0 or higher)";
- }
-
- $PERL_SSI = 0 if $Is_Win32;
- unless ($Is_Win32) {
- for (qw(PERL_SECTIONS PERL_SSI), keys %experimental) {
- $k = $_;
-
- if($experimental{$_}) {
- next unless $experimental{$_} > 1;
- print $k . '.' x (28 - length($k));
- print "enabled (experimental)";
- }
- else {
- $why = ($cant_hook{$_} || "(enable with $k=1)") unless $$_;
- $k =~ s/([A-Z]+)/ucfirst(lc($1))/ge;
- $k =~ s/_//g;
- $k =~ s/Ssi$/SSI/; #*shrug*
- push @mod_perl_hooks, $k;
- print $k . '.' x (28 - length($k));
- print $$_ ? "enabled" : "disabled $why\n";
- }
-
- print "\n";
- unless ($USE_APACI or $USE_APXS) {
- iedit "$APACHE_SRC/modules/perl/Makefile", "s/^($_) /#\$1 /"
- if $$_;
- }
- }
- }
- unless ($USE_APACI or $USE_APXS) {
- iedit "$APACHE_SRC/modules/perl/Makefile", "s/^#TRACE/TRACE/" if $PERL_TRACE;
- }
-
- my $ssl_name = is_ssl();
- if($ssl_name) {
- print "I see you are building with $ssl_name,\nI'll set the SSL flags in mod_perl's Makefile\n";
-
- if($ssl_name =~ /stronghold/i) {
- my $skey;
- my $lfile;
- my $conf = "$APACHE_SRC/../conf/httpd.conf";
- if(-e $conf) {
- open FH, $conf;
- while(<FH>) {
- chomp;
- if(/^StrongholdKey/) {
- $skey = $_;
- last;
- }
- elsif(s/^StrongholdLicenseFile\s+//) {
- $lfile = $_;
- unless ($lfile =~ m:^/:) {
- $lfile = "$PWD/$APACHE_SRC/../$lfile";
- }
- }
- }
- close FH;
- }
-
- if($skey) {
- $StrongholdKey = $skey;
- print "Using $skey for 'make test'\n";
- }
- elsif(-e $lfile) {
- $StrongholdKey = join " ",
- "StrongholdLicenseFile", $lfile;
- print "Using $StrongholdKey for 'make test'\n";
- }
- else {
- print "Before running `make test', ",
- "you must add your `StrongholdLicenseFile' to t/conf/httpd.conf\n";
- }
- }
-
- unless ($USE_APACI or $USE_APXS) {
- iedit "$APACHE_SRC/modules/perl/Makefile",
- "s:^#APACHE_SSL.*:APACHE_SSL = $SSL_CFLAGS:";
- }
- }
-
- #my $incdir = ($mmn >= 19970825) ? "../../main" : "../..";
- my $minc = asrc($APACHE_SRC);
- $minc =~ /(main|include)/;
- my $incdir = $1 ? "../../$1" : "../..";
- my $edit_note = quotemeta(<<EOF);
-#### Start of Makefile.PL created section ####
-#---------------------------------------------------------------------
-# This Makefile is derived from:
-# $PWD/src/modules/perl/Makefile
-# which comes with the mod_perl distribution and
-# written by mod_perl's Makefile.PL.
-# Rerunning Makefile.PL overwrites this file. Consequently...
-
-# DO NOT EDIT THIS FILES, EDIT
-# $PWD/src/modules/perl/Makefile
-# INSTEAD
-#---------------------------------------------------------------------
-
-MOD_PERL_VERSION = $VERSION
-
-INCDIR = $incdir
-
-EOF
-
- unless ($USE_APACI or $USE_APXS) {
- iedit "$APACHE_SRC/modules/perl/Makefile", "s/^#__ORIGINAL__/$edit_note/";
- }
-
- if($mmn >= 19970912 and not $USE_APACI and not $USE_APXS and not $Is_Win32) { #1.3b1
- system "cat $APACHE_SRC/Makefile.config $APACHE_SRC/modules/perl/Makefile > /tmp/mpmf.$$";
- system "mv /tmp/mpmf.$$ $APACHE_SRC/modules/perl/Makefile";
- }
-
- if($callback_hooks{PERL_TRANS}) {
- push @test_pre_init,
- "\t", '$(CP) t/conf/mod_perl_srm.conf t/conf/srm.conf', "\n";
- }
- unless ($USE_APXS) {
- unless (-l "t/httpd" or $Is_Win32) {
- system "$Config{lns} $APACHE_SRC/httpd t/httpd";
- }
- write_extra_tests();
- }
-}
-
-unless (-e "t/net/config.pl") {
- cp "t/net/config.pl.dist", "t/net/config.pl";
-}
-
-init_config_pl() if $Is_Win32;
-
-my (%win32_path);
-if ($win32_auto) {
- require File::Spec;
- win32_inc_and_lib();
- win32_fix_dsp();
-}
-
-write_my_config($APACHE_SRC);
-
-unless($Is_Win32 or -e "t/conf/httpd.conf" or ($NO_HTTPD && !$PREP_HTTPD)) {
- init_tests_and_config();
-}
-
-init_tests_and_config() if $USE_APXS;
-
-sub init_config_pl {
- my $mmn = magic_number($APACHE_SRC) || 0;
-
- my $hf = FileHandle->new(">>t/net/config.pl") or
- die "can't open t/net/config.pl $!";
-
- my $apaci_cfg = APACI->init;
-
- my($k,$v);
- my(%all) = %callback_hooks;
- while (($k,$v) = each %experimental) {
- $all{$k} = ($experimental{$k} > 1) ? 1 : 0;
- }
- print $hf "%callback_hooks = (\n";
- while (($k,$v) = each %all) {
- print $hf " $k => $v,\n";
- my $yes_no = $v ? "yes" : "no";
- print $apaci_cfg "$k = $yes_no\n" if $apaci_cfg;
- }
- print $hf " MMN => $mmn,\n";
- print $hf " USE_DSO => 1,\n" if $USE_DSO;
- print $hf ");\n1;\n";
- $hf->close;
- $apaci_cfg->close if $apaci_cfg;
-}
-
-sub init_tests_and_config {
- local *FH;
- open FH, ">t/conf/dev-null";
- print FH "#mod_ssl has a problem with /dev/null\n";
- close FH;
-
- cp "t/conf/httpd.conf-dist", "t/conf/httpd.conf";
- chmod 0644, "t/conf/httpd.conf";
-
- $uid = $>;
- $gid = $);
-
- #use only first value if $) contains more than one
- $gid =~ s/^(\d+).*$/$1/;
-
- $User = $Is_Win32 ? "nobody" :
- $ENV{APACHE_USER} || (getpwuid($uid) || "#$uid");
- $Group = $Is_Win32 ? "nogroup" :
- $ENV{APACHE_GROUP} || (getgrgid($gid) || "#$gid");
-
- if($User eq "root") {
- my $other = (getpwnam('nobody'))[0];
- $User = $other if $other;
- }
- if($User eq "root") {
- print "Cannot run tests as User `$User'\n";
- $User = prompt("Which User?", "nobody");
- $Group = prompt("Which Group?", $Group);
- }
- print STDERR "Will run tests as User: '$User' Group: '$Group'\n";
-
- if($Port != $PORT) {
- iedit "t/conf/httpd.conf", "s/^(Port) .*/\$1 $PORT/";
- iedit "t/net/config.pl", "s/$Port/$PORT/;";
- }
- if($experimental{PERL_SAFE_STARTUP} > 1) {
- if($experimental{PERL_DEFAULT_OPMASK} < 2) {
- iedit "t/conf/httpd.conf", "s/^#(PerlOpmask)/\$1/";
- }
- }
-
- init_config_pl();
-
- if($USE_APACI and not $PREP_HTTPD and not $USE_APXS) {
- my $shrpenv = $Config{shrpenv} || "";
- $shrpenv .= ' ' if $shrpenv;
- my $cmd = "CC=\"${shrpenv}$Config{cc}\" ";
-
- if($PERL_EXTRA_CFLAGS) {
- $cmd .= qq(CFLAGS="$PERL_EXTRA_CFLAGS" );
- }
-
- if ($USE_DSO) {
- # override apache's notion of this flag
- $cmd .= qq(LDFLAGS_SHLIB_EXPORT="$Config{ccdlflags}" );
-
- #if Perl is linked with -lpthread, httpd needs tobe too
- if ($Config{libs} =~ /($thrlib)/) {
- $PERL_EXTRA_LIBS .= " $1";
- }
- }
- if ($PERL_EXTRA_LIBS) {
- $cmd .= qq(LIBS="$PERL_EXTRA_LIBS" );
- }
- $cmd .= "./configure " .
- "--activate-module=src/modules/perl/libperl.a";
-
- # Do not disable the rule EXPAT for Stronghold, since this
- # rule is not implementated yet and breaks the configure process.
- if(is_ssl() !~ /stronghold/i) {
- $cmd .= " --disable-rule=EXPAT";
- }
-
- if($USE_DSO) {
- $cmd .= " --enable-shared=perl";
- }
- if($APACI_ARGS) {
- $cmd .= " " . join " ", split(',', $APACI_ARGS);
- }
- if($APACHE_PREFIX and $APACI_ARGS !~ /--prefix=/) {
- $cmd .= " --prefix=$APACHE_PREFIX";
- }
- if ($APACI_ARGS =~ /--target=(\S+)/) {
- $TARGET = $1;
- }
- if($ADD_MODULE) {
- for (split ",", $ADD_MODULE) {
- if(/^([a-zA-Z0-9][a-zA-Z0-9_]+)$/) {
- $cmd .= " --enable-module=$1";
- }
- elsif(m:(src/modules/[^/]+/[^/]+)$:) {
- $cmd .= " --activate-module=$1";
- }
- }
- }
- print "(cd $APACHE_ROOT && $cmd)\n";
- system "(cd $APACHE_ROOT && $cmd)";
- }
-
- if($USE_APXS) {
- my $cmd = "./configure --with-perl=$^X";
- $cmd .= " --with-apxs=$WITH_APXS" if $WITH_APXS;
- system "(cd apaci && $cmd)";
- }
-
- #expand ./t to full path
- iedit "t/conf/httpd.conf", "s: \./t(\\S*): $PWD/t\$1:";
-
- for (qw(User Group)) {
- $$_ = qq{"$$_"} if $$_ =~ /\s/; # User takes one parameter
- iedit "t/conf/httpd.conf", "s/^$_ .*/$_ $$_/";
- }
- conf_append(<<EOF) if $IsBenSSL;
-SSLDisable
-SSLCacheServerPort $SSLCacheServerPort
-SSLCacheServerPath /tmp
-EOF
- conf_append($StrongholdKey) if $StrongholdKey;
- if(is_ssl() =~ /stronghold/i) {
- iedit "t/conf/httpd.conf", "s:^SSL:#SSL:";
- }
- #phooey!
- my $v = httpd_version($APACHE_SRC, 1);
- my $mmn = magic_number($APACHE_SRC) || 0;
-
- conf_append("LockFile logs/mod_perl.lock") if $v >= 121 or $mmn >= MMN_130;
- conf_append("PerlChildInitHandler My::child_init") if $My::child_init;
- conf_append("PerlChildExitHandler My::child_exit") if $My::child_exit;
- conf_append("PerlTransHandler My::ProxyTest")
- if $callback_hooks{PERL_TRANS} and
- $callback_hooks{PERL_STACKED_HANDLERS} and
- $mmn > 19980270 and $Is_dougm;
-
- conf_append(<<EOF) if $callback_hooks{PERL_STACKED_HANDLERS};
-<Location /chain>
-SetHandler perl-script
-PerlHandler Stacked::one Stacked::two Stacked::three Stacked::four
-</Location>
-EOF
-}
-
-{
- (my $pmv = $VERSION) =~ s/_//g;
- $pmv =~ s/-dev$//;
- my $hooks = "@mod_perl_hooks";
- my $dummy = "hooks=`$hooks'\n" unless $hooks;
- cp "lib/mod_perl_hooks.pm.PL", "lib/mod_perl_hooks.pm";
-
- if ($Is_Win32) {
- my @args = ($^X, '-spi.bak', '-e', "\"s/sub mod_perl::hooks.*/sub mod_perl::hooks { qw($hooks) }/\"", 'lib/mod_perl_hooks.pm');
- system(@args) == 0 or die "@args failed\n";
- }
- iedit "lib/mod_perl_hooks.pm",
- qq(s/sub mod_perl::hooks.*/sub mod_perl::hooks { qw($hooks) }/);
-
- require "lib/mod_perl_hooks.pm";
- my @list = mod_perl::hooks();
-
- unless ($Is_Cygwin) { # test doesn't seem to be needed, works for me (Per Einar)
- @list == @mod_perl_hooks or die "Edit of lib/mod_perl_hooks.pm failed $!\n";
- }
-
- unlink $Is_Win32 ? "lib/mod_perl_hooks.pm.bak" : "lib/mod_perl_hooks.pm~";
-}
-
-#checking for LWP code, borrowed from LWP's own Makefile.PL :-)
-unless ($Is_Win32) {
- print "Checking CGI.pm VERSION..........";
- eval {
- require CGI;
- };
- if($CGI::VERSION >= 2.39) {
- print "ok\n";
- }
- else {
- print "I suggest upgrading from $CGI::VERSION to 2.39+\n";
- sleep 2;
- }
- print "Checking for LWP::UserAgent......";
- eval {
- require LWP::UserAgent;
- };
- if ($@) {
- $no_lwp++;
- $missing_modules++;
- print "failed\n";
- print <<EOT;
-$@
-The libwww-perl library is needed to run the test suite.
-Installation of this library is recommended, but not required.
-
-EOT
- sleep(2); # Don't hurry too much
- } else {
- print "ok\n";
- }
- print "Checking for HTML::HeadParser....";
- eval {
- require HTML::HeadParser;
- };
- if ($@) {
- $no_lwp++;
- $missing_modules++;
- print "failed\n";
- print <<EOT;
-$@
-The HTML-Parser package is needed (by libwww-perl) to run the test suite.
-EOT
- sleep(2); # Don't hurry too much
- } else {
- print "ok\n";
- }
-}
-
-sub is_ssl {
- my $d = shift || $APACHE_SRC;
- for (keys %SSL) {
- #warn "looking for $APACHE_SRC/$_\n";
- return $SSL{$_} if -e "$d/$_";
- }
- return 0;
-}
-
-sub write_extra_tests {
- #ensure we can find blib/
- local *FH;
- open FH, ">t/docs/blib.pl";
- print FH "use lib qw(\n",
- (map { "$PWD/$_\n" } qw(blib/lib blib/arch)),
- ");\n1;\n";
- close FH;
-
- for my $f (qw(.htaccess hooks.txt)) {
- open FH, ">t/docs/$f";
- print FH " ";
- close FH;
- chmod 0666, "t/docs/$f";#make sure httpd can write to it
- }
-
- if($PERL_SSI) {
- cp "t/modules/ssi.test", "t/modules/ssi.t";
- } else {
- unlink "t/modules/ssi.t"; # might be there from prior run
- }
-
- mkdir "t/docs/subr", 0755;
- if ($Is_Win32) {
- open FH, ">t/docs/subr/index.html"
- or die "Cannot open t/docs/subr/index.html: $!";
- print FH scalar(localtime);
- close FH;
- }
- else {
- system "date > t/docs/subr/index.html";
- }
-
- return unless
- $callback_hooks{PERL_STACKED_HANDLERS}
- and $callback_hooks{PERL_FIXUP};
- local *FH;
- my $meth_test;
- if($callback_hooks{PERL_METHOD_HANDLERS}) {
- $meth_test = <<'EOF';
-#see startup.pl
-PerlFixupHandler MyClass->method
-PerlFixupHandler $MyClass::Object->method
-PerlFixupHandler MyClass
-PerlFixupHandler LoadClass
-PerlFixupHandler LoadClass->method
-EOF
- }
- my $dir = "t/docs/stacked";
- mkdir $dir, 0755;
- cp "t/docs/test.html", $dir;
- open FH, ">$dir/.htaccess";
- print FH <<EOF;
- $meth_test
-PerlFixupHandler Apache::Constants::OK Apache::Constants::DECLINED MyClass::method
-EOF
- close FH;
-}
-
-cp "t/conf/httpd.conf", "t/httpd.conf";
-
-if($ENV{TEST_PERL_DIRECTIVES}) {
- #push @DIR, 't/TestDirectives';
- if($Is_dougm and $USE_THREADS) {
- delete $ENV{TEST_PERL_DIRECTIVES};
- }
- else {
- system "(cd t/TestDirectives && $^X Makefile.PL)";
- }
-}
-
-$TARGET ||= (is_ssl() ? "httpsd" : "httpd");
-
-WriteMakefile(
- #DIR => \@DIR,
- NAME => "mod_perl",
- VERSION => $VERSION,
- ($] < 5.005 ? () :
- (
- ABSTRACT => 'Embed a Perl interpreter in the Apache HTTP server',
- AUTHOR => 'Doug MacEachern <dougm@pobox.com>',
- )),
- #should override `CCFLAGS', can't with older perls
- #CCDLFLAGS => "$Config{ccdlflags} $EXTRA_CFLAGS",
- DEFINE => $EXTRA_CFLAGS,
- macro => {
- PERL => $Config{'perlpath'},
- OPCODE_FILE => "src/opcodes.txt",
- APACHE_ROOT => $APACHE_ROOT,
- APACHE_SRC => $APACHE_SRC,
- ARCHNAME => $Config{archname},
- HTTPD => $TARGET,
- PORT => $PORT,
- PWD => $PWD,
- PERL5LIB => "PERL5LIB=$ENV{PERL5LIB}",
- SHRPENV => $Config{shrpenv},
- CVSROOT => 'cvs.apache.org:/home/cvs',
- },
- 'dist' => {
- COMPRESS=> 'gzip -9f', SUFFIX=>'gz',
- CI => qq(ci -u -m\\"See Changes file\\"),
- },
- clean => {
- FILES => "@do_clean",
- }
-);
-
-print "*** BSDI users: be sure to read the INSTALL `Notes' section ***\n"
- if $Config{osname} =~ /bsdos/i;
-
-cleanup_for_static();
-
-sub MY::dist_basics {
- my $self = shift;
- my $string = $self->MM::dist_basics;
- if($USE_APXS) {
- $string =~ s/(distclean\s+::\s+)/$1 apxs_distclean /;
- }
- return $string;
-}
-
-sub MY::clean {
- my $self = shift;
- my $string = $self->MM::clean(@_);
- if ($win32_auto) {
- $string .= sprintf
- qq{\tmsdev src\\modules\\win32\\mod_perl.dsp \\\n} .
- qq{\t/MAKE "mod_perl - Win32 %s" /CLEAN\n},
- ($win32_args{DEBUG} == 1) ? 'Debug' : 'Release';
- return $string;
- }
- unless($NO_HTTPD) {
- my $asrc = asrc($APACHE_SRC, "http_main.c");
- return $string unless $APACHE_SRC and -e "$asrc/http_main.c";
- $string .= "\t-cd \$(APACHE_SRC) && \$(MAKE) clean\n";
- }
- if($USE_APXS) {
- $string .= "\t-cd ./apaci && \$(MAKE) clean\n";
- }
- $string;
-}
-
-sub MY::install {
- my $self = shift;
- my $string = $self->MM::install;
- my $add = "";
- if($USE_APXS) {
- $add = "apxs_install";
- }
- elsif ($win32_auto and
- ($win32_args{INSTALL_DLL} or $win32_args{INSTALL_LIB})) {
- $add = 'amp_install';
- }
- elsif($USE_APACI) {
- if($APACI_ARGS =~ /--prefix=/ or $APACHE_PREFIX) {
- $add = "apaci_install";
- }
- }
- if($add and (!$NO_HTTPD and !$PREP_HTTPD) or $USE_APXS or $win32_auto) {
- $string =~ s/(pure_install\s+)(.*)/$1 $add $2/;
- }
- return $string;
-}
-
-sub MY::top_targets {
- my $self = shift;
- my $string = $self->MM::top_targets;
- return $string unless $USE_APXS or $USE_APACI or $APACHE_SRC or $win32_auto;
-
- if ($win32_auto) {
- $string =~ s/(pure_all\s+::.*\s+subdirs\s+)(.*)/$1 amp_dll $2/;
- $string .= sprintf qq{\namp_dll:\n} .
- qq{\tmsdev src\\modules\\win32\\mod_perl.dsp \\\n} .
- qq{\t/MAKE "mod_perl - Win32 %s" /USEENV\n},
- ($win32_args{DEBUG} == 1) ? 'Debug' : 'Release';
- if ($win32_args{INSTALL_DLL}) {
- $string .= sprintf qq{\namp_install:\n\t\$(CP) "%s" "%s"},
- "$win32_path{MODPERL_LIB}/mod_perl.so",
- $win32_args{INSTALL_DLL} .
- ($win32_args{APACHE_VERS} < 1315 ?
- '/ApacheModulePerl.dll' : '/mod_perl.so');
- }
- if ($win32_args{INSTALL_LIB}) {
- $string .= sprintf qq{\n\t\$(CP) "%s" "%s"},
- "$win32_path{MODPERL_LIB}/mod_perl.lib",
- $win32_args{INSTALL_LIB} . '/mod_perl.lib';
- }
- return $string;
- }
-
- if($USE_APXS) {
- $string =~ s/(pure_all\s+::\s+)(.*)/$1 apxs_libperl $2/;
- }
- elsif($USE_APACI and !$PREP_HTTPD) {
- $string =~ s/(pure_all\s+::\s+)(.*)/$1 apaci_httpd $2/;
- }
- elsif($APACHE_SRC) {
- return $string unless -f "$APACHE_SRC/$Configuration";
- my $asrc = asrc($APACHE_SRC, "http_main.c");
- if(-e "$asrc/http_main.c" and !$NO_HTTPD) {
- $string =~ s/(pure_all\s+::\s+)(.*)/$1 apache_httpd $2/;
- }
- }
-
- $string .= <<'EOF';
-
-gen_exports:
- $(PERL) -I./lib -MExtUtils::testlib -MApache::Constants::Exports \
- -e 'Apache::Constants::Exports->gen_ctags' > Exports.c
-
-gen_op_mask:
- $(PERL) -MExtUtils::testlib -MApache::Opcode \
- -e 'Apache::Opcode->gen_op_mask' -- $(OPCODE_FILE) > op_mask.c
-
-update_op_mask: gen_op_mask
- @$(RM_F) $(APACHE_SRC)/modules/perl/mod_perl_opmask.o
- $(CP) op_mask.c $(APACHE_SRC)/modules/perl/op_mask.c
-
-apxs_distclean:
- (cd ./apaci && $(MAKE) distclean)
-
-apxs_libperl:
- (cd ./apaci && $(PERL5LIB) $(MAKE))
-
-apxs_install: apxs_libperl
- (cd ./apaci && $(MAKE) install;)
-
-apache_httpd: $(APACHE_SRC)/Makefile.tmpl
- (cd $(APACHE_SRC) && $(PERL5LIB) $(SHRPENV) $(MAKE) CC="$(CC)";)
-
-apaci_httpd:
- (cd $(APACHE_ROOT) && $(PERL5LIB) $(MAKE))
-
-apaci_install:
- (cd $(APACHE_ROOT) && $(MAKE) install)
-
-tar_Apache:
- (cd $(INSTALLSITELIB)/$(ARCHNAME); \
- $(TAR) -cf $(PWD)/Apache.tar mod_perl.pm Apache.pm Apache auto/Apache; )
-
-offsite-tar:
- $(CP) MANIFEST MANIFEST.orig
- echo src/Makefile.config >> MANIFEST
- $(CP) $(APACHE_SRC)/Makefile.config src/Makefile.config
- mkdir "src/include"
- $(PERL) -e 'for (<$(APACHE_SRC)/include/*.h>) {' \
- -e 'system "$(CP) $$_ src/include/";' \
- -e 's,^$(APACHE_SRC),,;' \
- -e 'system "echo src$$_ >> MANIFEST";' \
- -e '}'
- $(MAKE) dist
- $(RM_RF) src/include/
- $(RM) src/Makefile.config
- $(MV) MANIFEST.orig MANIFEST
-
-EOF
-
- $string;
-}
-
-sub MY::pasthru {
- return unless $APACHE_SRC;
- my $self = shift;
- chomp(my $str = $self->MM::pasthru);
- join $/, "$str\\",
- "\t".'APACHE_SRC="$(APACHE_SRC)"\\',
- "\t".'DEFINE="$(DEFINE)"',
- "";
-}
-
-sub MY::test {
- my $self = shift;
- my $test = $self->MM::test;
- my $mmn = magic_number($APACHE_SRC);
- return <<'EOF' if $USE_APXS and not $Is_dougm;
-test:
- @echo "Can't make test with APXS (yet)"
-EOF
- return <<'EOF' if $USE_DSO and ($mmn <= 19980527) and not $Is_dougm;
-test:
- @echo "Can't make test with DSO (yet)"
-EOF
-
- my $script = "t/TEST";
- $script .= ".win32" if $Is_Win32;
- my $my_test = $Is_Win32 ? q(
-
-test: run_tests
-
-) :
-
-q(
-
-test: pure_all start_httpd run_tests kill_httpd
-
-);
- my $have_so = $USE_DSO || ($APACI_ARGS =~ /--enable-shared=/);
- push @test_pre_init, "\t",
- './apaci/load_modules.pl $(APACHE_SRC)', "\n" if $have_so;
-
- join '', @test_pre_init,
- qq(
-MP_TEST_SCRIPT=$script
-),
- q(
-TEST_VERBOSE=0
-
-kill_httpd:
- kill `cat t/logs/httpd.pid`
- @$(RM_F) t/conf/srm.conf
- @$(RM_F) t/logs/mod_perl.lock*
- $(RM_F) t/logs/httpd.pid
- $(RM_F) t/logs/error_log
-
-start_httpd: test_pre_init
- @(cd t/conf; test -f httpd.conf || cp httpd.conf-dist httpd.conf)
- @(cd t/net; test -f config.pl || cp config.pl.dist config.pl)
- @$(TOUCH) t/conf/srm.conf
- $(APACHE_SRC)/$(HTTPD) -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t &
- @echo httpd listening on port $(PORT)
- @echo will write error_log to: t/logs/error_log
- @echo "letting apache warm up...\c"
- @sleep 2
- @echo done
-
-start_httpd_fork:
- $(APACHE_SRC)/$(HTTPD) -f `pwd`/t/conf/httpd.conf -d `pwd`/t
-
-rehttpd: kill_httpd start_httpd
-
-run_tests:
- $(FULLPERL) $(MP_TEST_SCRIPT) $(TEST_VERBOSE)
-
-),
-
-$my_test,
-
-q(
-
-test_report:
- $(MAKE) test | t/report
-);
-}
-
-use File::Find;
-
-sub MY::subdirs {
- my $self = shift;
- if($ENV{TEST_PERL_DIRECTIVES}) {
- push @{$self->{DIR}}, "t/TestDirectives";
- }
- $self->MM::subdirs(@_);
-}
-
-sub wanted {
- return unless /\.h$/ or /os-inline\.c$/;
- (my $d = $File::Find::dir) =~ s:^\Q$APACHE_SRC::;
- $d =~ s:^/::;
-
- my $from = "$File::Find::dir/$_";
- my $to = '$(INST_ARCHLIB)/' . "auto/Apache/include/";
- $to .= "$d/" if $d;
- $to .= $_;
-
- $My::self->{PM}->{$from} = $to;
-}
-
-sub win32_mph {
- return unless /\.h$/ or /os-inline\.c$/;
- (my $d = $File::Find::dir) =~ s:^\Q$MODPERL_SRC::;
- $d =~ s:^/::;
- my $from = "$File::Find::dir/$_";
- my $to = '$(INST_ARCHLIB)/' . "auto/Apache/include/modules/perl/";
- $to .= "$d/" if $d;
- $to .= $_;
-
- $My::self->{PM}->{$from} = $to;
-}
-
-sub MY::post_initialize {
- my($self) = shift;
-
- return unless $APACHE_HEADER_INSTALL;
- my($ap_src, $ap_inc);
- if ($APACHE_SRC) {
- $ap_src = $APACHE_SRC;
- $ap_inc = "$ap_src/include";
- }
- elsif ($USE_APXS) {
- #$base = `$WITH_APXS -q INCLUDEDIR`;
- $ap_inc = $ap_src = 'src'; #just install mod_perl headers
- }
-
- return unless $ap_src and -d $ap_src;
-
- $My::self = $self;
- {
- local $APACHE_SRC = $ap_src;
- finddepth(\&wanted, $ap_src);
- }
- if ($Is_Win32) {
- local $MODPERL_SRC = win32_fix_path($PWD) . '/src/modules/perl';
- finddepth(\&win32_mph, $MODPERL_SRC);
- }
- $self->{PM}{"Apache/typemap"} = '$(INST_ARCHLIB)/' . "auto/Apache/typemap";
- $self->{PM}{"apaci/mod_perl.exp"} = '$(INST_ARCHLIB)/' . "auto/Apache/mod_perl.exp";
- for (qw(ap_config_auto.h)) {
- my $from = "$ap_inc/$_";
- my $to = '$(INST_ARCHLIB)/' . "auto/Apache/include/$_";
- unless ($self->{PM}->{$from}) {
- $self->{PM}->{$from} = $to;
- my @args = ($Config{perlpath}, '-MExtUtils::Command',
- '-e', 'touch', $from);
- system(@args) == 0
- or die "system @args failed: $?";
- }
- }
-
- '';
-}
-
-sub MY::postamble {
-
- return <<'EOF';
-cvs_export :
- cvs -d $(CVSROOT) export -rv$(VERSION_SYM) -d$(DISTVNAME) .
-
-cvs_tag :
- cvs -d $(CVSROOT) tag v$(VERSION_SYM) modperl
- @echo update mod_perl.pm VERSION now
-
-EOF
-}
-
-#'
-
-sub MY::manifypods {
- my $self = shift;
- my $ver = $self->{VERSION} || "";
- local($_) = $self->MM::manifypods(@_);
- s/pod2man\s*$/pod2man --release mod_perl-$ver/m;
- $_;
-}
-
-sub fold_dots {
- my $v = shift;
- $v =~ s/\.//g;
- $v .= "0" if length $v < 3;
- $v;
-}
-
-sub vcache {
- my($v,$dir) = @_;
- $vcache{$dir} = fold_dots($v);
-}
-
-sub httpd_version {
- my($dir, $vnumber) = @_;
- local $^W=0;
- $dir = asrc($dir) || "";
- if($vnumber) {
- return $vcache{$dir} if $vcache{$dir};
- }
- my $fh = FileHandle->new("$dir/httpd.h") or return;
- my($server, $version, $rest);
- my($fserver, $fversion, $frest);
- my($string, $extra, @vers);
- while(<$fh>) {
- next unless /^#define/;
- s/SERVER_PRODUCT \"/\"Apache/; #1.3.13
- next unless s/^#define\s+SERVER_(BASE|)(VERSION|REVISION)\s+"(.*)\s*".*/$3/;
- unless (m:/:) {
- $_ = "Apache/$_"; #1.3.14, argh
- }
- chomp($string = $_);
-
- #print STDERR "Examining SERVER_VERSION '$string'...";
- #could be something like:
- #Stronghold-1.4b1-dev Ben-SSL/1.3 Apache/1.1.1
- @vers = split /\s+/, $string;
- foreach (@vers) {
- next unless ($fserver,$fversion,$frest) =
- m,^([^/]+)/(\d\.\d+\.?\d*)([^ ]*),i;
- #print STDERR "match ($fserver,$fversion,$frest)\n";
- if($fserver =~ /Xcert-Sentry/i or $fserver eq "Ben-SSL") {
- $extra ||= $fserver;
- #print STDERR "I see $fserver/$fversion, ok\n";
- next;
- }
-
- if($fserver eq "Apache") {
- ($server, $version) = ($fserver, $fversion);
- if($version eq '1.2' and $frest =~ s/^b(\d+).*/$1/) {
- if($frest >= 8 and is_ssl($dir)) {
- $do_link_swap++;
- $can_dash_make{$dir}++;
-
- return $vnumber ? vcache($version,$dir) : "NONE";
- }
- warn "Apache/1.2b$frest is not supported, upgrade to 1.2.0.\n";
- return undef;
- }
- elsif($version >= 1.2) {
- $do_link_swap++ if is_ssl($dir);
- $can_dash_make{$dir}++;
- return $vnumber ? vcache($version,$dir) : "NONE";
- }
- }
- else {
- #print STDERR "'$fserver/$fversion' unrecognized.\n";
- next;
- }
- print STDERR "Found $fserver '$fversion' in $dir/httpd.h\n";
- }
- }
- $fh->close;
- #print STDERR "return $version$extra\n";
- return($version.$extra);
-}
-
-use lib "./lib";
-use Apache::src ();
-
-sub magic_number {
- my $d = asrc shift;
- my $src = Apache::src->new;
- $src->dir($d);
- return($mcache{$d} = $src->module_magic_number);
-}
-
-sub cleanup_for_static {
- return unless $STATIC;
- for (@xs_mod_snames) {
- rename "${_}/${_}.xs.disabled", "${_}/${_}.xs";
- }
-}
-
-sub setup_for_static {
- my $d = "$APACHE_SRC/modules/perl";
- my $mf = "$APACHE_SRC/modules/perl/Makefile";
- my @static_src = ();
-
- unless ($USE_APACI) {
- iedit $mf, "s/(PERL_STATIC_EXTS) =.*/\$1 = $PERL_STATIC_EXTS/"
- if $PERL_STATIC_EXTS;
- }
- return unless $STATIC;
-
- cp "Apache/typemap", $d;
-
- for (@xs_mod_snames) {
- rename "${_}/${_}.xs", "${_}/${_}.xs.disabled" if -e "${_}/${_}.xs";
- push @static_src, "$_.c";
- }
-
-=pod
- my @xs_names = ();
- my @xs_files = ();
- my $dir = "src/modules/perl";
- my $dh = DirHandle->new($dir) or die;
-
- for my $file ($dh->read) {
- next unless $file =~ /\.xs$/;
- push @xs_names, module_name_from_xs("$dir/$file");
- push @xs_files, $file;
- unless ($mani_src{"$dir/$file"}) {
- cp "$dir/$file", $d;
- print "Adding module `$xs_names[-1]' to httpd\n";
- }
- }
- #print "XS_NAMES=@xs_names\n";
- #print "XS_FILES=@xs_files\n";
-
- #XXX think about this some more
- iedit $mf, "s/^#STATIC_SRC.*/STATIC_SRC = @xs_files/";
- iedit $mf, "s/^#STATIC_EXTS.*/STATIC_EXTS = @xs_names/";
-
-=cut
-
- unless ($USE_APACI) {
- #XXX: ho,hum, need to generate the whole damn thing
- #instead of all these frigging iedits.
- if ($DYNAMIC) {
- }
- else {
- iedit $mf, "s/^#STATIC_SRC.*/STATIC_SRC = @static_src/";
- iedit $mf, "s/^#STATIC_EXTS.*/STATIC_EXTS = @xs_modules/";
- iedit $mf, "s/^#STATIC_/STATIC_/";
- }
- #bloody hell, make sucks and so does this.
- #this has only cause a few people pain, enough.
- iedit $mf, "s/ \Q\$(STATIC_SRC)\E/ @static_src/";
- }
-}
-
-sub module_name_from_xs {
- my $file = shift;
- my $fh = FileHandle->new($file) or
- die "can't open file $file $!";
- my($module, $package, $prefix, %seen);
- while(<$fh>) {
- if( ($module, $package, $prefix) =
- /^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/)
- {
- $seen{$module}++;
- }
- }
- if(keys %seen > 1) {
- warn "$module name guess might be incorrect";
- }
- return (keys %seen)[0];
-}
-
-sub asrc {
- my $d = shift;
- my $file = shift || "httpd.h";
- return $d if -e "$d/$file";
- return "$d/include" if -e "$d/include/$file";
- return "$d/main" if -e "$d/main/$file";
- return undef;
-}
-
-sub conf_append {
- local *CFG;
- open CFG, ">>t/conf/httpd.conf" or die "open httpd.conf $!";
- print CFG join "\n", @_, "";
- close CFG;
-}
-
-sub edit_extra_cflags {
- my($cfg) = @_;
- my $fh = IO::File->new($cfg) or die "open $cfg $!";
- my $repl = "";
- my @file = ();
- my $ccopts = ccopts();
- my $dssv = "-DSERVER_SUBVERSION";
- my $ssv = qq($dssv=\\"mod_perl/$VERSION\\" );
-
- my $inc = " $ccopts -I. -I../.. -DUSE_PERL_SSI" if $PERL_SSI;
- $inc .= " -DAPACHE_SSL" if is_ssl() and $PERL_SSI;
- $inc .= $SSL_INCLUDE if $SSL_INCLUDE;
- $inc .= " -DSTRONGHOLD" if is_ssl() =~ /stronghold/i;
- $inc .= " $PERL_EXTRA_CFLAGS" if $PERL_EXTRA_CFLAGS;
- $inc .= " -DMOD_PERL";
-
- while (<$fh>) {
- push @file, $_;
- next unless /EXTRA_CFLAGS\s*=/;
- next if /mod_perl/;
- next if /^#/;
- chomp;
-
- $repl = $_;
-
- my $backwhack = "";
- if($repl =~ s/(\\)\s*$//) {
- $backwhack = $1;
- }
- my $mmn = magic_number($APACHE_SRC);
- if($mmn >= 19980507) {
- $ADD_VERSION = 0;
- }
- if($ADD_VERSION) {
- if(/$dssv=/) {
- $repl =~
- s{
- $dssv\s*=\s*(.?)['"](.*?)(.?)["']
- }[
- qq($dssv="$1"$2 mod_perl/$VERSION$3"")
- ]ex;
- }
- else {
- $repl .= " $ssv";
- }
- }
-
- $file[-1] = "$repl $inc $backwhack\n";
-
- }
- close $fh;
-
- if($repl) {
- $fh = IO::File->new(">$cfg") or die "open $cfg $!";
- print $fh @file;
- close $fh;
- }
-}
-
-sub conf_fixup {
- my($mf, $cfg) = @_;
- return if $USE_APACI;
-
- my $mmn = magic_number($APACHE_SRC);
- #source re-org
- my $sro = 1 if $mmn >= 19970825;
-
- edit_extra_cflags($cfg);
- $PERL_STATIC_EXTS ||= "";
- $libperl ||= "";
- my $ldopts = "`$^X $PWD/src/modules/perl/ldopts $PERL_STATIC_EXTS $libperl`";
- iedit $cfg,
- q{next unless /EXTRA_LIBS\s*=/;}.
- q{next if /perl/; chomp;}.
- qq{\$_ .= q| $ldopts\n|;};
-
- for (split ",", $ADD_MODULE) {
- add_module($cfg,$_);
- }
-
- if(is_ssl() =~ /stronghold/i) {
- if($do_link_swap) {
- warn "swapping link order in $mf for Stronghold\n";
- my $repl = quotemeta('$(REGLIB) $(LIBS)');
- iedit $mf, "s:\Q\$(LIBS) \$(REGLIB)\E:$repl:;";
-
- #XXX hack
- $repl = quotemeta('CFLAGS=$(CFLAGS)');
- iedit $mf, qq(s:\Q\"CFLAGS=\$(CFLAGS)"\E:'$repl':;); #"
- }
- my $repl = q{AUX_CFLAGS='\$(CFLAGS)'};
- iedit $mf, qq{s/AUX_CFLAGS="..CFLAGS."/$repl/};
- }
- {
- my $repl = q{CC='\$(CC)'};
- iedit $mf, qq{s/CC=..CC. /$repl /};
- }
- open(CONF, $cfg) || die "Can't open $cfg: $!";
- while (<CONF>) {
- $seen_modperl++ if
- /^Module\s+perl_module/i ||
- /^AddModule\s+.*libperl/;
- }
- close(CONF);
- unless ($seen_modperl) {
- print "Appending mod_perl to $conf\n";
- open(CONF, ">>$cfg") || die "Can't open $cfg: $!";
- my $line;
- $line = $sro ? "AddModule modules/perl/libperl.a" :
- "Module perl_module modules/perl/libperl.a";
- print CONF <<EOT;
-
-# Embed a perl interpreter
-$line
-
-
-EOT
- close(CONF);
- } else {
- print "mod_perl already present in $conf\n";
- }
-}
-
-
-sub has_module {
- my($cfg, $name) = @_;
- local(*IN);
- open IN, $cfg or die "Can't open $cfg $!\n";
- while(<IN>) {
- if(/^\\w{0,3}Module\\s+.*$name\.[oa]/i) {
- close IN;
-# print STDERR "has module $name\n";
- return 1;
- }
- }
- return 0;
-}
-
-sub add_module {
- my($cfg, $name) = @_;
- iedit $cfg, "s/^#\\s+(\\w{0,3}Module\\s+.*$name\.[oa])/\$1/";
-}
-
-sub gen_script {
- my $file = shift;
- my(@lib) = @_;
- local(*IN,*OUT);
- open IN, "$file.PL" or die "Couldn't open $file.PL: $!";
- open OUT, ">$file" or die "Couldn't open $file: $!";
- print OUT "#!$Config{perlpath}\n";
- if (@lib) {
- print OUT "use lib qw(@lib);\n";
- }
- print OUT join '', <IN>;
- close OUT;
- close IN;
- chmod 0755, "$file";
-}
-
-sub iedit {
- my $file = shift;
- return if $Is_Win32;
-
- #print STDERR "-e @_\n";
- system $^X, "-pi~", "-e", "@_", $file;
-}
-
-sub win32_setup {
- my $d = "src/modules/perl";
- dirent_kludge($d);
- cp "Apache/typemap", $d;
- chdir $d;
- system "$^X -MExtUtils::Embed -e xsinit -- -std @xs_modules $PERL_STATIC_EXTS";
- my $lib = $Config{privlibexp};
- for (@xs_mod_snames) {
- system "$^X $lib/ExtUtils/xsubpp -typemap $lib/ExtUtils/typemap $_.xs > $_.c";
-
- }
- chdir "../../../";
-
- open(F, '>t/docs/init.pl')
- or die "Cannot open t/docs/init.pl: $!";
- print F <<"END";
-#!perl
-\$Apache::Server::CWD = '$PWD';
-
-END
- close F;
-}
-
-sub dirent_kludge {
- my $d = shift;
- local *FH;
- open FH, ">$d/dirent.h" or die "can't write $d/dirent.h $!";
- print FH <<EOF;
-/* major kludge to workaround confilct(s) between perl's dirent.h apache's readdir.h */
-
-#ifdef WIN32
-
-#define _INC_DIRENT
-#define DIR void
-
-#endif
-
-EOF
- close FH;
-}
-
-sub write_version_h {
- my $d = shift;
- unlink "$d/mod_perl_version.h";
- my $pv = perl_version();
- local *FH;
- open FH, ">$d/mod_perl_version.h" or die "can't write $d/mod_perl_version.h $!";
- print FH <<EOF;
-#define MOD_PERL_STRING_VERSION "mod_perl/$VERSION"
-#define PERLV $pv
-EOF
- close FH;
-}
-
-sub write_my_config {
- my $src = shift;
-
-# preparing and writing Configuration to Apache::MyConfig
- my %my_config = %callback_hooks;
- my @other_hooks = qw(APACHE_SRC SSL_BASE APXS PERL_USELARGEFILES
- PERL_TRACE PERL_DEBUG APACI_ARGS
- APACHE_PREFIX DO_HTTPD NO_HTTPD PREP_HTTPD
- USE_APACI APACHE_HEADER_INSTALL
- PERL_STATIC_EXTS PERL_SSI PERL_SECTIONS USE_APXS WITH_APXS);
- {
- no strict 'refs';
- for (@other_hooks) {
- $my_config{$_} = ${$_};
- }
- }
- if ($win32_auto) {
- for (qw(APACHE_INC APACHE_LIB MODPERL_INC MODPERL_LIB)) {
- $my_config{$_} = $win32_path{$_};
- }
- $my_config{APACHE_SRC} = $APACHE_SRC;
- }
-
- #need this alias for Apache::src backwards compat
- $my_config{'Apache_Src'} = $my_config{'APACHE_SRC'};
- $my_config{'APXS'} = delete $my_config{'WITH_APXS'};
-
- my $my_config_dump = join ",\n",
- map { qq{'$_' => } .
- ($my_config{$_} =~ /^\d+$/ ? $my_config{$_} : qq{'$my_config{$_}'})
- } sort keys %my_config;
-
- local *FH;
- open FH, '>lib/Apache/MyConfig.pm' ||
- die "Can't open lib/Apache/MyConfig.pm: $!";
- print FH <<EOT;
-#
-# Configuration for mod_perl and Apache::...
-#
-package Apache::MyConfig;
-
-%Setup = (
-$my_config_dump
-);
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::MyConfig - build options access
-
-=head1 SYNOPSIS
-
- use Apache::MyConfig;
- die unless \$Apache::MyConfig::Setup{PERL_FILE_API};
-
-=head1 DESCRIPTION
-
-B<Apache::MyConfig> module provides access to the various hooks
-and features set when mod_perl is built. This circumvents the
-need to set up a live server just to find out if a certain callback
-hook is available.
-
-Itterate through \%Apache::MyConfig::Setup to get obtain build
-information then see Appendix B of the Eagle book for more detail
-on each key.
-
-EOT
- close FH;
-
-}
-
-# obtain the Apache and mod_perl lib and include directories for Win32
-sub win32_inc_and_lib {
-
- my $modperl_src = win32_fix_path(cwd) . '/src';
- $win32_path{MODPERL_INC} = $modperl_src . '/modules/perl';
- $win32_path{MODPERL_LIB} = ($win32_args{DEBUG} == 1) ?
- $modperl_src . '/modules/win32/Debug' :
- $modperl_src . '/modules/win32/Release';
-
- unless ( -d $win32_args{APACHE_SRC}) {
- opendir(DIR, '../') or die "Cannot read parent directory: $!\n";
- my @dirs = map {"../$_"}
- grep {/apache/ and -d "../$_"} readdir DIR;
- closedir DIR or die "Cannot close parent directory: $!\n";
- die "Cannot find the apache sources\n"
- unless ($win32_args{APACHE_SRC} = find_dir(\@dirs, 'apache source'));
- }
- $win32_args{APACHE_SRC} = win32_fix_path($win32_args{APACHE_SRC});
- if (-d "$win32_args{APACHE_SRC}/libexec") {
- $win32_path{APACHE_LIB} = $win32_args{APACHE_SRC} . '/libexec';
- $win32_path{APACHE_INC} = $win32_args{APACHE_SRC} . '/include';
- $win32_args{APACHE_VERS} = httpd_version($win32_path{APACHE_INC}, 1);
- }
- else {
- $win32_args{APACHE_SRC} .= '/src' unless $win32_args{APACHE_SRC} =~ /src$/;
- $win32_path{APACHE_INC} = $win32_args{APACHE_SRC} . '/include';
- $win32_args{APACHE_VERS} = httpd_version($win32_path{APACHE_INC}, 1);
- $win32_path{APACHE_LIB} = ($win32_args{DEBUG} == 1) ?
- $win32_args{APACHE_SRC} .
- ($win32_args{APACHE_VERS} < 1315 ? '/CoreD' : '/Debug') :
- $win32_args{APACHE_SRC} .
- ($win32_args{APACHE_VERS} < 1315 ? '/CoreR' : '/Release');
- }
- die "Cannot find ApacheCore.lib under $win32_path{APACHE_LIB}\n"
- unless -f "$win32_path{APACHE_LIB}/ApacheCore.lib";
- die "Cannot find httpd.h under $win32_path{APACHE_INC}\n"
- unless -f "$win32_path{APACHE_INC}/httpd.h";
-
- if ($win32_args{INSTALL_DLL} ) {
- $win32_args{INSTALL_DLL} =
- win32_fix_path($win32_args{INSTALL_DLL});
- unless ( -d $win32_args{INSTALL_DLL}) {
- my @dirs = grep {-d}
- ('\Program Files\Apache Group\Apache\modules',
- '\Apache\modules', '\Program Files\Apache\modules');
- $win32_args{INSTALL_DLL} = find_dir(\@dirs, 'Apache/modules');
- if ($win32_args{INSTALL_DLL} and -d $win32_args{INSTALL_DLL}) {
- $win32_args{INSTALL_DLL} =
- win32_fix_path($win32_args{INSTALL_DLL});
- }
- else {
- print <<'END';
-
-**** The Apache/modules directory was not found. *******
-**** Please install mod_perl.so manually. *******
-
-END
- }
- }
- }
- if ($win32_args{INSTALL_LIB} ) {
- $win32_args{INSTALL_LIB} =
- win32_fix_path($win32_args{INSTALL_LIB});
- unless ( -d $win32_args{INSTALL_LIB}) {
- my @dirs = grep {-d}
- ('\Program Files\Apache Group\Apache\libexec',
- '\Apache\libexec', '\Program Files\Apache\libexec');
- $win32_args{INSTALL_LIB} = find_dir(\@dirs, 'Apache/libexec');
- if ($win32_args{INSTALL_LIB} and -d $win32_args{INSTALL_LIB}) {
- $win32_args{INSTALL_LIB} =
- win32_fix_path($win32_args{INSTALL_LIB});
- }
- else {
- print <<'END';
-
-**** The Apache/libexec directory was not found. *******
-**** Please install mod_perl.lib manually. *******
-
-END
- }
- }
- }
-}
-
-# fix mod_perl.dsp with the perl and apache inc and lib directories
-sub win32_fix_dsp {
-
- my $amp = 'src/modules/win32';
- my $dsp = 'mod_perl.dsp';
- unless ( -f "$amp/$dsp.orig") {
- rename("$amp/$dsp", "$amp/$dsp.orig")
- or die "Couldn't rename $amp/$dsp: $!\n";
- }
- my $perl_inc = win32_fix_path_dsp("$Config{archlibexp}/CORE");
-
- open(OLDDSP, "$amp/$dsp.orig")
- or die "Couldn't read $amp/$dsp.orig: $!\n";
- open(NEWDSP, ">$amp/$dsp")
- or die "Couldn't create $amp/$dsp: $!\n";
- while (<OLDDSP>) {
- if (/^SOURCE=.*ApacheCore\.lib/) {
- printf NEWDSP "SOURCE=%s\n",
- win32_fix_path_dsp("$win32_path{APACHE_LIB}/ApacheCore.lib");
- }
- elsif (/^SOURCE=.*perl(56)?\.lib/) {
- print NEWDSP qq{SOURCE=$perl_inc\\$Config{libperl}\n};
- }
- elsif (/ADD CPP/) {
- my $apache_inc = win32_fix_path_dsp($win32_path{APACHE_INC});
- s!(/D "WIN32")!/I "$apache_inc" /I "$apache_inc/../os/win32" /I "$perl_inc" $1!;
- s!(/D "WIN32")!$1 /D "EAPI" ! if $win32_args{EAPI};
- print NEWDSP $_;
- }
- else {
- print NEWDSP $_;
- }
- }
- close OLDDSP;
- close NEWDSP;
- return;
-}
-
-# find a directory of type $type, given some possible $dirs
-sub find_dir {
- my ($dirs, $type) = @_;
- my $j = 0;
- my $src;
- while (1) {
- $src = @$dirs > 0 ? $dirs->[$j] : '';
- $src = prompt("\nWhere is your $type directory? (q to quit)", $src);
- return undef if $src eq 'q';
- return $src if -d $src;
- print qq{'$src': no such directory\n};
- $j = ($j == @$dirs-1) ? 0 : $j + 1;
- }
-}
-
-# fix a path for Win32 Makefile
-sub win32_fix_path {
- my $path = shift;
- $path = File::Spec->rel2abs($path) if not File::Spec->file_name_is_absolute($path);
- $path = Win32::GetShortPathName($path) if $path =~ / /;
- $path =~ tr!\\!/!;
- $path =~ s!/$!!;
- return $path;
-}
-
-# fix a path for mod_perl.dsp
-sub win32_fix_path_dsp {
- local $_ = shift;
- tr!/!\\!;
- return $_;
-}
-
-#in version 1.2505 of Embed.pm we could just import these instead of using ``,
-#but it might require lots of people to upgrade
-
-sub ccopts {
- unless ($Embed::ccopts) {
- $Embed::ccopts = "$Config{ccflags} -I$Config{archlibexp}/CORE";
- if($USE_THREADS) {
- $Embed::ccopts .= " -DPERL_THREADS";
- }
- }
- $Embed::ccopts;
-}
-
-sub ldopts {
- $Embed::ldopts ||= `$^X -MExtUtils::Embed -e ldopts`;
- if($^O eq "aix") {
- $Embed::ldopts =~ s,(-bE:)(perl\.exp),$1$Config{archlibexp}/$2,;
- }
- $Embed::ldopts;
-}
-
-sub perl_version {
- my $v = "$]";
- $v =~ s/\.//g;
- $v .= "0" while length($v) < 6;
- $v;
-}
-
-#for linking third-party xs modules static built w/ MakeMaker's: 'make static'
-#must have when the xs module is compiled with profiling `-pg -a' flags
-sub add_static_ar {
- $PERL_STATIC_AR ||= "";
- my $cur = $APACHE_SRC =~ /^../ ? "$PWD/" : "";
- for (qw(blib/arch/auto arch/auto)) {
- last if -d ($ar_dir = "$APACHE_SRC/modules/perl/$_");
- $ar_dir = "";
- }
- return unless -d $ar_dir;
-
- finddepth(sub {
- return unless /^[A-Z]\w+\.a$/;
- (my $rel = $File::Find::dir) =~ s:$APACHE_SRC/?::;
- (my $mod = $rel) =~ s:.*auto/::;
- $mod =~ s,/,::,;
- print "linking static $mod => $rel/$_\n";
- $PERL_STATIC_AR .= $cur . "$File::Find::dir/$_ ";
- $PERL_STATIC_EXTS .= "$mod ";
- }, $ar_dir);
-}
-
-sub APACI::init {
- return undef if $Is_Win32;
- my $lib_cfg;
- if($USE_APXS) {
- $lib_cfg = "apaci/mod_perl.config";
- chmod 0644, $lib_cfg;
- }
- elsif($USE_APACI) {
- $lib_cfg = "$APACHE_SRC/modules/perl/mod_perl.config";
- }
- else {
- return undef;
- }
- unless (File::Compare::compare($lib_cfg,"apaci/mod_perl.config") == 0) {
- #warn "mod_perl.config already edited\n";
- #return undef;
- }
-
- my $apaci_cfg = FileHandle->new(">$lib_cfg") or
- die "can't open $lib_cfg $!";
-
- my @static_src = ();
-
- for (@xs_mod_snames) {
- push @static_src, "$_.c";
- }
-
- add_static_ar();
-
- my $static_targets = "";
- $static_targets = <<EOF unless $DYNAMIC;
-PERL_STATIC_EXTS = @xs_modules $PERL_STATIC_EXTS
-PERL_STATIC_SRCS = @static_src
-EOF
-
- $static_targets .= "PERL_STATIC_AR = $PERL_STATIC_AR\n" if $PERL_STATIC_AR;
-
- print $apaci_cfg <<EOF;
-##
-## mod_perl.config -- mod_perl shared configuration file
-##
-
-# mod_perl version
-MOD_PERL_VERSION = $VERSION
-
-# Perl interpreter to use
-PERL = $^X
-LIBPERL = $LIBPERL
-
-$static_targets
-
-EOF
-
-print $apaci_cfg <<EOF if defined $MOD_PERL_PREFIX;
-
-# mod_perl installation prefix
-MOD_PERL_PREFIX = $MOD_PERL_PREFIX
-
-EOF
-
- for (qw(PERL_SECTIONS PERL_SSI PERL_TRACE)) {
- my $yes_no = $$_ ? "yes" : "no";
- print $apaci_cfg "$_ = $yes_no\n";
- }
-
- $yes_no = 'no';
- $yes_no = 'yes' if $USE_THREADS;
- print $apaci_cfg "PERL_THREADS = $yes_no\n";
-
- return $apaci_cfg;
-}
-
-sub phat_warn {
- my($msg, $abort) = @_;
- my $level = $abort ? "ERROR" : "WARNING";
- warn <<EOF;
-************* $level *************
-
- $msg
-
-************* $level *************
-EOF
- if ($abort) {
- exit 1;
- }
- else {
- sleep 5;
- }
-}
-
-sub system_sanity_check {
- return if $Is_Win32;
-
- my $ccflags = $Config{'ccflags'};
- for (split /\s+/, $ccflags) {
- next unless s/^-I//;
- my $header = "$_/ap_mmn.h";
- if (-e $header) {
- phat_warn(<<EOF);
-Apache headers found in unexpected location: ``$_'', suggestions:
- *) Remove via ``rpm -e apache''
- *) Remove by hand
- *) Complain to your os vendor about their poor layout choice
- *) Complain to your sysadmin about their poor layout choice
-EOF
- }
- }
-
- my $ld = basename $Config{ld};
-
- if ($^O eq 'hpux' and ($USE_DSO or $USE_APXS) and $ld eq 'ld') {
- unless ($ccflags =~ /\+z/i) {
- my $switch = $] >= 5.006 ? 'A' : 'D';
- phat_warn(<<EOF);
-mod_perl is unlikely to link with your libperl, suggestions:
- *) Rebuild Perl with Configure -${switch}ccflags=+Z ...
- *) Build mod_perl static rather than DSO
-EOF
- }
- }
-
- gdbm_check();
- malloc_check();
- uselargefiles_check();
- dynaloader_check();
- shrplib_check();
-
- if ($USE_APXS and $Config{libs} =~ /($thrlib)/) {
- my $lib = $1;
- phat_warn(<<EOF);
-Your Perl is linked with $lib, make sure that your httpd is built with LIBS=$lib
-EOF
- }
-}
-
-sub gdbm_check {
- if ($Config{libs} =~ /gdbm/) {
- require DynaLoader;
- require AutoLoader; #eek
- my $found = 0;
- my @path = split /\s+/, $Config{libpth};
-
- for (@path) {
- last if $found = DynaLoader::dl_findfile($_, "-lgdbm");
- }
-
- unless ($found) {
- my @maybe = ();
- for (@path) {
- push @maybe, grep { ! -l $_ } <$_/libgdbm.*>;
- }
- my $suggest = @maybe ?
- "You could just symlink it to $maybe[0]" :
- "You might need to install Perl from source";
- phat_warn(<<EOF);
-Your Perl is configured to link against libgdbm,
- but libgdbm.so was not found.
- $suggest
-EOF
- }
- }
-}
-
-sub uselargefiles_check {
- return unless $] >= 5.006 and $Config{uselargefiles}
- and $PERL_USELARGEFILES and $USE_APXS;
- local $Apache::src::APXS = $WITH_APXS;
- my $cflags = Apache::src->new->apxs('-q' => 'CFLAGS') || '';
- return if $cflags =~ /LARGEFILE/;
-
- $PERL_USELARGEFILES=0; #just do it since
- return; #nobody seems to listen to the warning below
-
- phat_warn(<<EOF);
-Your Perl is uselargefiles enabled, but Apache is not, suggestions:
- *) Rebuild mod_perl with Makefile.PL PERL_USELARGEFILES=0
- *) Rebuild Apache with CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- *) Rebuild Perl with Configure -Uuselargefiles
- *) Let mod_perl build Apache (USE_DSO=1 instead of USE_APXS=1)
-EOF
-}
-
-sub malloc_check {
- return unless $USE_DSO or $USE_APXS;
- return unless $Config{'usemymalloc'} eq 'y';
-
- my $abort = $^O eq 'solaris';
-
- my $bincompat = $Config{bincompat5005} and
- $Config{bincompat5005} eq 'define';
-
- if ($] < 5.006) {
- phat_warn(<<EOF, $abort);
-Your current configuration will most likely trigger core dumps, suggestions:
- *) Do not configure mod_perl as a DSO
- *) Upgrade your Perl version to 5.6.0 or higher (w/ -Ubincompat5005)
- *) Configure Perl with -Uusemymalloc (not recommended for performance)
-EOF
- }
- elsif ($bincompat) {
- phat_warn(<<EOF, $abort);
-Your current configuration will most likely trigger core dumps, suggestions:
- *) Do not configure mod_perl as a DSO
- *) Rebuild Perl without malloc pollution (Configure -Ubincompat5005)
-EOF
- }
-}
-
-sub dynaloader_check {
- return unless $^O eq 'aix' and $] <= 5.00503 and ($USE_DSO or $USE_APXS);
- phat_warn(<<EOF);
-Please make sure that you apply the following patch to the perl
-distribution before you install mod_perl, without this patch you will
-not be able load any xs modules.
-EOF
-
- warn <<EOF;
---- perl5.005_03/ext/DynaLoader/dl_aix.xs.orig Fri Mar 3 17:00:58 2000
-+++ perl5.005_03/ext/DynaLoader/dl_aix.xs Sun Apr 2 13:37:05 2000
-@@ -74,8 +74,8 @@
- } Module, *ModulePtr;
-
- /*
-- * We keep a list of all loaded modules to be able to call the fini
-- * handlers at atexit() time.
-+ * We keep a list of all loaded modules to be able to reference count
-+ * duplicate dlopen's.
- */
- static ModulePtr modList;
-
-@@ -88,7 +88,6 @@
-
- static void caterr(char *);
- static int readExports(ModulePtr);
--static void terminate(void);
- static void *findMain(void);
-
- static char *strerror_failed = "(strerror failed)";
-@@ -165,7 +164,6 @@
- if (!mainModule) {
- if ((mainModule = findMain()) == NULL)
- return NULL;
-- atexit(terminate);
- }
- /*
- * Scan the list of modules if have the module already loaded.
-@@ -222,7 +220,16 @@
- mp->refCnt = 1;
- mp->next = modList;
- modList = mp;
-- if (loadbind(0, mainModule, mp->entry) == -1) {
-+ /*
-+ * Assume anonymous exports come from the module this dlopen
-+ * is linked into, that holds true as long as dlopen and all
-+ * of the perl core are in the same shared object. Also bind
-+ * against the main part, in the case a perl is not the main
-+ * part, e.g mod_perl as DSO in Apache so perl modules can
-+ * also reference Apache symbols.
-+ */
-+ if (loadbind(0, (void *)dlopen, mp->entry) == -1 ||
-+ loadbind(0, mainModule, mp->entry) == -1) {
- dlclose(mp);
- errvalid++;
- strcpy(errbuf, "loadbind: ");
-@@ -336,12 +343,6 @@
- safefree(mp->name);
- safefree(mp);
- return result;
--}
--
--static void terminate(void)
--{
-- while (modList)
-- dlclose(modList);
- }
-
- /* Added by Wayne Scott
-
-EOF
-}
-
-sub shrplib_check {
- return unless $Config{'useshrplib'} and
- $Config{'useshrplib'} eq 'define';
-
- my $libperl = $Config{'libperl'} || 'libperl.so';
-
- for my $dir (qw(/lib /usr/lib /usr/local/lib)) {
- next unless -e "$dir/$libperl";
-
- my $coredir = "$Config{'archlibexp'}/CORE";
- my $corelib = "$coredir/$libperl";
-
- phat_warn(<<EOF);
-$dir/$libperl might override
-$corelib
-
-This may cause build or runtime errors with mod_perl.
-Consider removing $dir/$libperl, it should not be there.
-
-If your vendor has installed $libperl there, complain to them and install
-Perl from source if needed.
-
-$libperl should only exist in Perl version/arch directories, for example:
-$coredir
-EOF
- }
-}
diff --git a/tags/v1_29/ModuleConfig/.cvsignore b/tags/v1_29/ModuleConfig/.cvsignore
deleted file mode 100644
index cb5eff1..0000000
--- a/tags/v1_29/ModuleConfig/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-pm_to_blib
-ModuleConfig.xs
-
diff --git a/tags/v1_29/ModuleConfig/Makefile.PL b/tags/v1_29/ModuleConfig/Makefile.PL
deleted file mode 100644
index 2dc8eca..0000000
--- a/tags/v1_29/ModuleConfig/Makefile.PL
+++ /dev/null
@@ -1,13 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- NAME => "Apache::ModuleConfig",
- VERSION_FROM => "ModuleConfig.pm",
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
-
diff --git a/tags/v1_29/ModuleConfig/ModuleConfig.pm b/tags/v1_29/ModuleConfig/ModuleConfig.pm
deleted file mode 100644
index 610e507..0000000
--- a/tags/v1_29/ModuleConfig/ModuleConfig.pm
+++ /dev/null
@@ -1,31 +0,0 @@
-package Apache::ModuleConfig;
-
-use strict;
-use mod_perl ();
-
-{
- no strict;
- $VERSION = "0.01";
- __PACKAGE__->mod_perl::boot($VERSION);
-}
-
-sub has_srv_config {
- my $file = (caller)[1];
- if($Apache::ServerStarting == 1) {
- delete $INC{$file};
- }
-}
-
-sub dir_merge {
- my($base, $add) = @_;
- my %new = ();
- @new{ keys %$base, keys %$add} =
- (values %$base, values %$add);
-
- return bless \%new, ref($base);
-}
-
-1;
-
-__END__
-
diff --git a/tags/v1_29/PerlRunXS/.cvsignore b/tags/v1_29/PerlRunXS/.cvsignore
deleted file mode 100644
index c58b391..0000000
--- a/tags/v1_29/PerlRunXS/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-pm_to_blib
diff --git a/tags/v1_29/PerlRunXS/Makefile.PL b/tags/v1_29/PerlRunXS/Makefile.PL
deleted file mode 100755
index e68e8f5..0000000
--- a/tags/v1_29/PerlRunXS/Makefile.PL
+++ /dev/null
@@ -1,12 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- 'NAME' => 'Apache::PerlRunXS',
- 'VERSION_FROM' => 'PerlRunXS.pm',
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
diff --git a/tags/v1_29/PerlRunXS/PerlRunXS.pm b/tags/v1_29/PerlRunXS/PerlRunXS.pm
deleted file mode 100755
index b4aa425..0000000
--- a/tags/v1_29/PerlRunXS/PerlRunXS.pm
+++ /dev/null
@@ -1,74 +0,0 @@
-package Apache::PerlRunXS;
-
-use strict;
-use vars qw($Debug $VERSION);
-use Apache::Constants qw(:common);
-
-unless (defined $Apache::Registry::NameWithVirtualHost) {
- $Apache::Registry::NameWithVirtualHost = 1;
-}
-
-$Debug ||= 0;
-my $Is_Win32 = $^O eq "MSWin32";
-
-$VERSION = '0.03';
-
-__PACKAGE__->mod_perl::boot($VERSION);
-
-sub new {
- my($class, $r) = @_;
- return $r unless ref($r) eq "Apache";
- if(ref $r) {
- $r->request($r);
- }
- else {
- $r = Apache->request;
- }
- my $filename = $r->filename;
- $r->log_error("Apache::PerlRunXS->new for $filename in process $$")
- if $Debug && $Debug & 4;
-
- bless $r, $class;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::PerlRunXS - XS implementation of Apache::PerlRun/Apache::Registry
-
-=head1 SYNOPSIS
-
- #in httpd.conf
-
- Alias /perl/ /perl/apache/scripts/
- PerlModule Apache::PerlRunXS
-
- <Location /perl>
- SetHandler perl-script
- PerlHandler Apache::RegistryXS
- Options +ExecCGI
- #optional
- PerlSendHeader On
- ...
- </Location>
-
-=head1 DESCRIPTION
-
-This XS implementation of Apache::PerlRun and Apache::Registry will some day
-replace the Perl versions.
-
-=head1 SEE ALSO
-
-perl(1), mod_perl(3), Apache::Registry(3)
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-
-
-
-
diff --git a/tags/v1_29/README b/tags/v1_29/README
deleted file mode 100644
index 5341a2d..0000000
--- a/tags/v1_29/README
+++ /dev/null
@@ -1,106 +0,0 @@
-The Apache/Perl integration project brings together the full power of
-the Perl programming language and the Apache HTTP server. This is
-achieved by linking the Perl runtime library into the server and
-providing an object oriented Perl interface to the server's C language
-API.
-These pieces are seamlessly glued together by the `mod_perl' server
-plugin, making it is possible to write Apache modules entirely in
-Perl. In addition, the persistent interpreter embedded in the server
-avoids the overhead of starting an external interpreter program and
-the additional Perl start-up (compile) time.
-
-Without question, the most popular Apache/Perl module is
-Apache::Registry module. This module emulates the CGI environment,
-allowing programmers to write scripts that run under CGI or
-mod_perl without change. Existing CGI scripts may require some
-changes, simply because a CGI script has a very short lifetime of one
-HTTP request, allowing you to get away with "quick and dirty"
-scripting. Using mod_perl and Apache::Registry requires you to be
-more careful, but it also gives new meaning to the work "quick"!
-Apache::Registry maintains a cache of compiled scripts, which happens
-the first time a script is accessed by a child server or once again if
-the file is updated on disk.
-
-Although it may be all you need, a speedy CGI replacement is only a
-small part of this project. Callback hooks are in place for each stage
-of a request. Apache-Perl modules may step in during the handler,
-header parser, uri translate, authentication, authorization, access,
-type check, fixup, logger and cleanup stages of a request.
-
-Apache/Perl modules include:
- Apache::Registry - Run unaltered CGI scripts
- Apache::Status - Embedded interpreter runtime status
- Apache::Embperl - Embed Perl code in HTML documents
- Apache::SSI - Implement server-side includes in Perl
- Apache::DBI - Maintain persistent DBI connections
- Apache::Gateway - Implement an HTTP/1.1 gateway
- Apache::GzipChain - Compress output on the fly
- Apache::Filter - Filter document and script output
- Apache::Sandwich - Generate page headers and footers
- Apache::TransLDAP - Translate URIs via LDAP lookups
- Apache::ASP - Implement "Active Server Pages"
- Apache::AuthenDBI - Authenticate against a database via DBI
- Apache::PHLogin - Authenticate against a PH database
- Apache::DBILogger - Log requests to a database via DBI
- Apache::Session - Persistent session management
- Apache::Throttle - Content negotiation based on connection speed
-
-There's plenty more Apache/Perl software you might be interested in.
-The Apache/Perl module list keeps track of modules inside and outside
-the distribution, along with idea placeholders.
-
-It is also possible to use Perl to configure your server (in
-*.conf files) with <Perl> sections. This eases often complicated and
-cumbersome configuration of vitrual host and various resources. Since
-any Perl code can be used in these sections, configuration info could
-be pulled in from an RDBMS with DBI or your favorite database package.
-
-While the output of mod_perl scripts can be included with Server Side
-Includes just as CGI scripts can, mod_perl's integration with
-mod_include gives an extra speed boost and allows Perl code to be
-directly inside SSI files.
-
-For comments, questions, bug-reports, etc., join the Apache/Perl
-mailing list by sending mail to modperl-subscribe@perl.apache.org.
-sending mail to announce-subscribe@perl.apache.org
-will subscribe you to the very low-traffic announcements list.
-
-Here is an important list of links to follow:
-
-The Apache/Perl homepage:
-http://perl.apache.org/
- or
-http://apache.perl.org/
-
-Mailing list archives:
-http://perl.apache.org/maillist/modperl.html#Searchable_Archives
-
-Documentation:
-http://perl.apache.org/docs/index.html
-
-Books:
-
- "Practical mod_perl"
- By Stas Bekman and Eric Cholet
- http://www.modperlbook.org/
-
- "The mod_perl Developer's Cookbook"
- By Geoffrey Young; Paul Lindner; Randy Kobes
- http://www.modperlcookbook.org/
-
- "mod_perl quick reference card"
- By Andrew Ford
- http://www.refcards.com/
-
- "Writing Apache Modules with Perl and C":
- By Lincoln Stein and Doug MacEachern
- http://www.modperl.com/
-
-The Apache/Perl module list:
-http://perl.apache.org/products/apache-modules.html
-
-
-
-Enjoy,
--Doug MacEachern (dougm@perl.apache.org)
-
diff --git a/tags/v1_29/STATUS b/tags/v1_29/STATUS
deleted file mode 100644
index fd82be5..0000000
--- a/tags/v1_29/STATUS
+++ /dev/null
@@ -1,335 +0,0 @@
-mod_perl 1.3 STATUS:
- Last modified at [$Date$]
-
-
-Release:
-
- 1.29-dev: In development.
- 1.28: Released July 2, 2002.
- 1.27: Released June 1, 2002.
- 1.26: Released July 11, 2001.
-
-
-Available Patches:
-
- * if the requested number of bytes was less
- than or equal to the available amount of input then the call
- would be successful, otherwise the buffer would come back
- undefined. In the case that the requested number of bytes was
- larger than the available number of bytes, the returned number
- of bytes would still equal the available number of bytes.
- Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105903751619552&w=2
- Status:
-
- * per_request_cleanup() only cleans up the current request. As one
- consequence, pnotes of parent requests will not get cleaned up.
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=104176956128093&w=2
- Status:
- Patch available at
- http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=104185397922327&w=2
-
- * $r->print() ignores $\
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=102874705105904&w=2
- Status:
- Patch available at
- http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105359253610093&w=2
-
- * Apache->request(bless {r => $r}, 'My::Apache')
- Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98600785703290&w=2
- Status:
- Patch needs to get further testing
- Patch:
- http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105412732722992&w=2
-
- * mp_preload_module and method handlers broken.
- Report:
- http://marc.theaimsgroup.com/?t=105532710700003&r=1&w=2
- Status:
- When using Perl*Handler Foo->bar. mp_preload_module will not correctly
- load the module at all. And if the module is preloaded with PerlModule
- or added to the startup scripts, Foo->bar(undef) will be called on startup
- without a valid $r to speak of. Similar broken behaviour happens with
- Perl*Handler $My::Obj->foo.
- Patch:
- http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105591097807663&w=2
-
-Needs Patch or Further Investigation
-
- * LWP used to be optional for running 'make test', now I get:
-
- /home/stas/perl/5.6.0-ithread/bin/perl t/TEST 0
- Can't locate LWP/UserAgent.pm in @INC ...
- ...
- Must skip important tests without LWP...
-
- but the test suite won't start
-
- * $r->print() ignores $,
- Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=102902480103484&w=2
- Status:
- Patch available with the original report, but needs to be simplified a bit and
- currently will not work with perl 5.8+, see the patch for $\
-
- * make test fails when a wrong combination of URI and LWP are
- installed. (e.g. lwp 5.64 and URI 1.09). LWP's Makefile.PL
- requires the right URI version, but certain binary distributors
- miss this requirement and distribute LWP without making a
- dependency on the right version of the URI package
- Report: many reports in the last year.
- Status: ???
- Suggestion: require libwww-perl 5.64 and URI 1.1
-
- * two identical directives in <Perl> configuration
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97449481013350&w=2
- Status:
- doc patch at http://marc.theaimsgroup.com/?l=apache-modperl&m=97450363501652&w=2
- however: this documented feature should be supported.
-
- * readdir() broken on linux with glibc 2.2
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98824089613574&w=2
- Status:
- does anybody have an example to reproduce the bug?
-
- * warn() going to the wrong log
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98190005604037&w=2
- Status:
- coincidentially, I've noticed that s->error_fname is not populated
- in a vhost when the vhost relies on the ErrorLog from the main
- server --Geoff
-
- s->error_fname == NULL is expected, see ap_open_logs(), only
- s->error_log is inherited.
-
- i would expect stderr to only ever be opened to the main
- server log at startup. otherwise, we'd need to redirect stderr at the
- start of every request and restore it at the end. seems expensive.
- i would be suprised if this every worked as matt expected it
- to. -dougm
-
- * segfaults with DBI->connect (mysql)
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=96392180616185&w=2
- Status:
-
- * revisit send_http_header and r->status
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=99063926111686&w=2
- Status:
-
- * recursion triggered by internal_redirect() called by a pushed handler
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=94792974200198&w=2
- Status:
-
- * IPC::Open3 issues
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98839218229712&w=2
- Status:
-
- * Prototype mismatch in Apache::PerlRun
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97934624332223&w=2
- Status:
-
- * files that have been created after the server's (child?) startup are
- being reported with negative age with -M test under Apache::Registry.
- The workaround is to add $^T = time; at the beginning of the scripts. But
- it would be much better if the Apache::Registry will do that
- Report: ?
- Status:
-
- * Apache::DProf seg-fault via Devel::DProf's prof_mark()
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101923951812332&w=2
- Status:
-
- * collisions between Apache::Status and English.pm
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=102096856215178&w=2
- Status:
-
-
-Open Issues or Core Enhancements:
-
- * we need a script that will generate a bug report, similar to
- mp2bug in mp2 (mp1bug?)
-
- * method handler cached-CVs
- Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=99789775715863&w=2
- Status:
- patch available
- http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=101164617829467&w=2
-
- * "$ENV{FOO} = 'foo'" is cleared from the %ENV array, but left in the
- environ[], making it visible to subprocesses.
- perl_util.c:perl_clear_env() only deletes from %ENV on purpose to
- prevent other problems. need to rethink this.
-
- * option to startup with something other than /dev/null
-
- * PerlChildInitHandler should not be allowed inside <VirtualHost>
-
- * rid Apache->can_stack_handlers, make Apache->can('push_handlers') work
-
- * fileno(STD{IN,OUT}) should be r->connection->client->fd or
- fileno(std{in,out}), rather than hardcoded fileno(stdout)
-
- * close STDERR;
-
- * Apache::FakeRequest improvments [Gary Richardson <gary@atdot.org>]
-
- * xsubpp -nolinenumbers is not supported with 5.004
-
- * 'make test' as root permissions problems
-
- * USE_APXS=1 + DYNAMIC=1 do not work together
-
- * support SSL_BASE=SYSTEM (i.e. test -d $SSL_BASE in Makefile.PL)
-
- * disable PERL_SSI unless mod_include is listed in httpd -l
- and Action unless mod_action, etc.
-
-
-Documentation:
-
- * Consider removing the following files from the distribution,
- they were already removed from the site and not maintained:
- - cgi_to_mod_perl.pod
- - mod_perl.pod
- - mod_perl_tuning.pod
- - mod_perl_method_handlers.pod
- - mod_perl_traps.pod
- - mod_perl_cvs.pod
- - faq/mjtg-news.txt
- - faq/mod_perl_api.pod
- - faq/mod_perl_cgi.pod
- - faq/mod_perl_faq.pod
- - benchmark/lwp-simple.pod
- - benchmark/stopwatch.pod
-
-
- * document Apache::Status Apache::Request preference over CGI.pm
- and make it more clear that Apache::Status should not be used in a
- production environment, as it adds quite a bit of bloat
-
- * docs: update CREDITS, cleanup install docs
-
-Patches unlikely to be applied:
-
- * print() dereferencing issues
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=99905070209305&w=2
- Status:
- patch available
- http://marc.theaimsgroup.com/?l=apache-modperl&m=99999116330145&w=2
-
- the feature of print() dereferencing scalars should be deprecated.
- therefor, i don't think this patch should be applied as it
- would introduce overhead to support a deprecated feature.
- user should simply dereference themselves, print $$foo; -dougm
-
- * Apache::test
- Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98278446807561&w=2
- Status:
- patch available
-
- any further development of testing framework should be put
- into Apache-Test within httpd-test/perl-framework
- http://httpd.apache.org/test/ -dougm
-
- * get/set handlers issues
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=95721313917562&w=2
- Status:
- patch available
- http://perl.apache.org/~dougm/set_handlers.pat
-
- modperl 1.x is in maintainance mode, this change puts the
- core stablity at risk to support functionality that few
- require. -dougm
-
- * $r->args parsing of one=&two=2
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98018719907031&w=2
- Status:
- patch available at
- http://marc.theaimsgroup.com/?l=apache-modperl&m=98048943129379&w=2
-
- $r->args and $r->content methods are cheap hacks that
- probably never should have been written. if they are not
- good enough as-is, user should use Apache::Request or another
- library with more robustness.
-
-Known bugs unlikely to be fixed:
-
- * $r cannot use many api methods during ChildInit/ChildExit -> SEGV
- Report: ?
- Status:
- "don't do that". these hooks were introduced after modperl
- had already been written around all the hooks which took
- only a request_rec argument. the "fake" request_rec passed
- to these new hooks was a quick and dirty hack and will
- probably stay that way. 2.0 does the right thing.
-
- * Apache->server->register_cleanup
- Report: if modperl is linked static, Apache->server->register_cleanup
- is only called on the first pass during server startup.
-
- Status:
- this is a legacy bug related to modperl not doing a complete
- teardown/startup of the interpreter on every restart, so it
- only happens the first time a Perl{Require,Module} is loaded.
- this is done properly with dso however. static users can
- workaround the bug with PerlFreshRestart or delete $INC{__FILE__}
-
- * bytes_sent are not logged if header don't go through send_http_header(),
- e.g CGI->header(-nph => 1, ...) Eric Cholet <cholet@logilune.com>
- Report: ?
-
- Status:
- does anybody actually use nph script anymore?
-
- * perl_config should not av_shift ARRAY refs from %Apache::ReadConfig::
- Report: ?
-
- Status:
- i don't think this is actually a problem for anybody.
-
- * die and AUTOLOADed DESTROY == empty $@ (Perl or mod_perl bug?)
- Report: ?
-
- Status:
- this report is ages old and haven't heard any reports since.
- if it is a bug, it is likely in perl. solution in that any
- case: don't AUTOLOAD DESTROY.
-
- * can't multiple Apache::Include->virtual in a single request
- Report: ?
-
- Status:
- Apache::Include was indented as an example. the subrequest
- api is not complicated, just use it directly for this
- functionality.
-
- * Apache::Include->virtual should return run() value, not status()
- Report: ?
-
- Status: see above.
-
- * SERVER_MERGE and DIR_MERGE
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97351976714878&w=2
- Status:
- The require() part may be legitimate. personally, I never
- understood the DIR_CREATE happening before SERVER_CREATE
- either, but it doesn't seem to affect anything. the double
- DIR_MERGE is just a misunderstanding on Andy's part and is
- a result of how Apache handles <Location> before and
- after translation. --Geoff
-
- '.' is part of the default @INC, so this shouldn't be a problem.
-
- as for when the CREATE/MERGE functions are called, that's up
- to apache when that happens. unless somebody can illustrate
- that Perl directive handlers are treated any different than
- C handlers, this is a documentation enhancement, not a bug.
- the extra DIR_{CREATE,MERGE} is likely related to
- s->lookup_defaults. -dougm
-
-Known bugs unlikely to be fixed because they aren't under our (mod_perl) control:
-
- * /perl/perl-status?sig dumps core under hpux 10.20
- [David-Michael.Lincke@unisg.ch] and [Silvio.Wanka@alcatel.de]
- Status:
- SIGRTMAX is not being picked up by ./Configure under certain circumstances.
- Patch:
- http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-04/msg01458.html
diff --git a/tags/v1_29/SUPPORT b/tags/v1_29/SUPPORT
deleted file mode 100644
index da01a88..0000000
--- a/tags/v1_29/SUPPORT
+++ /dev/null
@@ -1,172 +0,0 @@
-=head1 SUPPORT
-
-=over 3
-
-=item MAIL LIST
-
-For comments, questions, bug-reports, announcements, etc., send mail
-to I<modperl@perl.apache.org>.
-
-To subscribe to this list (which you must do to send mail to the
-list), send a mail message to
-
-I<modperl-subscribe@perl.apache.org>
-
-We also have a mailing list just for announcements. Subscribe by
-sending a message to
-
-I<announce-subscribe@perl.apache.org>
-
-Discussions about the perl.apache.org website and general mod_perl
-advocacy should go to the I<advocacy@perl.apache.org>
-mailing list. Subscribe by sending mail to
-I<advocacy-subscribe@perl.apache.org>
-
-The HTML::Embperl mailing list is at I<embperl@perl.apache.org>.
-Subscribe by (you properly got the idea by now) sending mail to
-I<embperl-subscribe@perl.apache.org>.
-
-All CVS commit messages goes to the I<modperl-cvs@perl.apache.org>
-list. Embperl CVS messages goes to I<embperl-cvs@perl.apache.org>.
-
-
-=item MAIL LIST ARCHIVES
-
-There are several modperl list archives, choose your favorite:
-
-http://perl.apache.org/maillist/modperl.html#Searchable_Archives
-
-=back
-
-=head1 REPORTING PROBLEMS
-
-=over 3
-
-=item HOMEWORK
-
-Make sure you've done your homework before reporting a problem.
-Check the mail archive, read cgi_to_mod_perl.pod, the guide, the FAQ
-and other pod documents in the distribution.
-
-=item HOW
-
-When debugging, always start httpd with the C<-X> switch so only one
-process is started.
-
-Always check the error_log.
-
-=item WHERE
-
-Please send mail to modperl@perl.apache.org
-
-=item WHAT
-
-Always include this information:
-
-Output of C<perl -V>
-
-Version of mod_perl
-
-Version of apache
-
-Options given to mod_perl's Makefile.PL
-
-Server configuration details
-
-Relevant sections of your ErrorLog (make test's is: t/logs/error_log)
-
-If 'make test' fails, the output of 'make test TEST_VERBOSE=1'
-
-Depending on the nature of your problem, you may also be asked:
-
--Does 'make test' pass 100%?
-
--Does your script still work under CGI?
-
--Do you have a *small* test script that illustrates the problem?
-
--Can you get a backtrace (if httpd is dumping core)?
-
-=item CORE DUMPS
-
-If you get a core dump, please send a backtrace if possible.
-Before you try, build mod_perl with perl Makefile.PL PERL_DEBUG=1
-which will:
- -add `-g' to EXTRA_CFLAGS
- -turn on PERL_TRACE
- -set PERL_DESTRUCT_LEVEL=2 (additional checks during Perl cleanup)
- -link against libperld if it exists
-
-Here's how to get a backtrace:
-
- % cd mod_perl-x.xx
- % touch t/conf/srm.conf
- % gdb ../apache_x.xx/src/httpd
- (gdb) run -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t
- [now make request that causes core dump]
- (gdb) bt
-
-You can also attach to an already running process like so:
-
- % gdb httpd <process id number>
-
-This attach approach is helpful when debugging a "spinning" process.
-You can also get a Perl stacktrace of a "spinning" process by install a
-C<$SIG{USR1}> handler in your code, like so:
-
- $SIG{USR1} = \&Carp::confess
-
-While the process is spinning, send it a I<USR1> signal:
-
- % kill -USR1 <process id number>
-
-Sometimes gdb can make heads or tails of the core file, try this:
-
- % gdb -core core
-
-or
-
- % gdb httpd core
-
-If the dump is happening in libperl a -DDEBUGGING enabled libperl
-would help show us what's really happening.
-
-Go to your Perl source tree:
-
- % rm *.[oa]
- % make LIBPERL=libperld.a
- % cp libperld.a $Config{archlibexp}/CORE
-
-$Config{archlibexp} is:
-
- % perl -V:archlibexp
-
-Rebuild httpd/mod_perl with PERL_DEBUG=1, let's see a new backtrace.
-
-If you get a segfault but no core file gets dumped and you cannot
-reproduce the segfault on will, you have to make sure that your
-environment is set to allow a core file to be dumped. Change the
-script that starts the server to do (in bash):
-
- ulimit -c unlimited
-
-before the code that starts the server. Alternatively you can execute
-this command from the shell and then start the server from the same
-shell. Now you should be able to get the core dumped.
-
-Of course the directory the server is running in (usually as defined
-by ServerRoot) should be writable as well.
-
-=item SPINNING PROCESSES
-
-If a process is spinning (seemingly stuck in an endless loop, eating
-up all cpu), you can use gdb to find which Perl code is causing the
-spin:
-
-% gdb httpd <pid of spinning process>
-(gdb) where
-(gdb) source mod_perl-x.xx/.gdbinit
-(gdb) curinfo
-
-=back
-
diff --git a/tags/v1_29/Server/.cvsignore b/tags/v1_29/Server/.cvsignore
deleted file mode 100644
index b227718..0000000
--- a/tags/v1_29/Server/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-pm_to_blib
-Server.xs
diff --git a/tags/v1_29/Server/Makefile.PL b/tags/v1_29/Server/Makefile.PL
deleted file mode 100644
index 5c51c70..0000000
--- a/tags/v1_29/Server/Makefile.PL
+++ /dev/null
@@ -1,12 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- 'NAME' => 'Apache::Server',
- 'VERSION_FROM' => 'Server.pm',
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
diff --git a/tags/v1_29/Server/Server.pm b/tags/v1_29/Server/Server.pm
deleted file mode 100644
index 160488f..0000000
--- a/tags/v1_29/Server/Server.pm
+++ /dev/null
@@ -1,9 +0,0 @@
-package Apache::Server;
-
-use mod_perl ();
-
-$VERSION = '1.01';
-__PACKAGE__->mod_perl::boot($VERSION);
-
-1;
-__END__
diff --git a/tags/v1_29/Symbol/.cvsignore b/tags/v1_29/Symbol/.cvsignore
deleted file mode 100644
index c9630f9..0000000
--- a/tags/v1_29/Symbol/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Symbol.c
-Symbol.bs
-pm_to_blib
diff --git a/tags/v1_29/Symbol/Makefile.PL b/tags/v1_29/Symbol/Makefile.PL
deleted file mode 100644
index 651da80..0000000
--- a/tags/v1_29/Symbol/Makefile.PL
+++ /dev/null
@@ -1,9 +0,0 @@
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
- NAME => "Apache::Symbol",
- VERSION_FROM => "Symbol.pm",
- 'dist' => {
- COMPRESS=> 'gzip -9f', SUFFIX=>'gz',
- },
-);
diff --git a/tags/v1_29/Symbol/Symbol.pm b/tags/v1_29/Symbol/Symbol.pm
deleted file mode 100644
index 42ccd80..0000000
--- a/tags/v1_29/Symbol/Symbol.pm
+++ /dev/null
@@ -1,203 +0,0 @@
-package Apache::Symbol;
-
-use strict;
-use DynaLoader ();
-
-@Apache::Symbol::ISA = qw(DynaLoader);
-$Apache::Symbol::VERSION = '1.31';
-$Apache::Symbol::DEBUG ||= 0;
-
-use Devel::Symdump ();
-
-sub file2class {
- my $file = shift;
- return $file unless $file =~ s,\.pm$,,;
- $file =~ s,/,::,g;
- $file;
-}
-
-sub undef_functions {
- my( $package, $skip, $only_undef_exports ) = @_;
-
- my $stab = Devel::Symdump->rnew($package);
- my @functions = $stab->functions;
-
- if( $only_undef_exports ) {
- no strict 'refs';
- my $any_export_var;
- $any_export_var = 1 if @{$package . "::EXPORT"};
- $any_export_var = 1 if @{$package . "::EXPORT_OK"};
- $any_export_var = 1 if %{$package . "::EXPORT_TAGS"};
- $any_export_var = 1 if @{$package . "::EXPORT_EXTRAS"};
-
- if( $any_export_var ) {
- my @names = (@{$package . "::EXPORT"},
- @{$package . "::EXPORT_OK"},
- @{$package . "::EXPORT_EXTRAS"});
- foreach my $tagdata (values %{$package . "::EXPORT_TAGS"}) {
- push @names, @$tagdata;
- }
- my %exported = map { $package . "::" . $_ => 1 } @names;
- @functions = grep( $exported{$_}, @functions );
- }
- }
-
- for my $cv (@functions) {
- no strict 'refs';
- next if substr($cv, 0, 14) eq "Devel::Symdump";
- next if $skip and $cv =~ /$skip/;
- #warn "$cv=", *{$cv}{CODE}, "\n";
- Apache::Symbol::undef(*{$cv}{CODE});
- }
-
-}
-
-sub make_universal {
- *UNIVERSAL::undef_functions = \&undef_functions;
-}
-
-if($ENV{APACHE_SYMBOL_UNIVERSAL}) {
- __PACKAGE__->make_universal;
-}
-
-sub handler {
- my $fh;
- if ($Apache::Symbol::DEBUG) {
- require IO::File;
- $fh = IO::File->new(">/tmp/Apache::Symbol.debug");
- print $fh "Apache::Symbol debug for process $$\n";
- }
- my $skip = join "|", __PACKAGE__, qw(Devel::Symdump);
-
- my $stab = Devel::Symdump->new('main');
- for my $class ($stab->packages) {
- next if $class =~ /($skip)/;
- if($class->can('undef_functions')) {
- print $fh "$class->undef_functions\n" if $fh;
- $class->undef_functions;
- }
- }
- close $fh if $fh;
-
- 1;
-}
-
-bootstrap Apache::Symbol $Apache::Symbol::VERSION;
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Symbol - Things for symbol things
-
-=head1 SYNOPSIS
-
- use Apache::Symbol ();
-
- @ISA = qw(Apache::Symbol);
-
-=head1 DESCRIPTION
-
-B<perlsub/Constant Functions> says:
-
- If you redefine a subroutine which was eligible for inlining you'll get
- a mandatory warning. (You can use this warning to tell whether or not a
- particular subroutine is considered constant.) The warning is
- considered severe enough not to be optional because previously compiled
- invocations of the function will still be using the old value of the
- function.
-
-I<mandatory warning> means there is _no_ way to avoid this warning
-no matter what tricks you pull in Perl. This is bogus for us mod_perl
-users when restarting the server with B<PerlFreshRestart> on or when
-Apache::StatINC pulls in a module that has changed on disk.
-
-You can, however, pull some tricks with XS to avoid this warning,
-B<Apache::Symbol::undef> does just that.
-
-=head1 ARGUMENTS
-
-C<undef_functions> takes two arguments: C<skip> and C<only_undef_exports>.
-
-C<skip> is a regular expression indicating the function names to skip.
-
-Use the C<only_undef_exports> flag to undef only those functions
-which are listed in C<@EXPORT>, C<@EXPORT_OK>, C<%EXPORT_TAGS>, or
-C<@EXPORT_EXTRAS>. C<@EXPORT_EXTRAS> is not used by the Exporter, it
-is only exists to communicate with C<undef_functions>.
-
-As a special case, if none of the EXPORT variables are defined ignore
-C<only_undef_exports>. This takes care of trivial modules that don't
-use the Exporter.
-
-=head1 ARGUMENTS
-
-C<undef_functions> takes two arguments: C<skip> and C<only_undef_exports>.
-
-C<skip> is a regular expression indicating the function names to skip.
-
-Use the C<only_undef_exports> flag to undef only those functions
-which are listed in C<@EXPORT>, C<@EXPORT_OK>, C<%EXPORT_TAGS>, or
-C<@EXPORT_EXTRAS>. C<@EXPORT_EXTRAS> is not used by the Exporter, it
-is only exists to communicate with C<undef_functions>.
-
-As a special case, if none of the EXPORT variables are defined ignore
-C<only_undef_exports>. This takes care of trivial modules that don't
-use the Exporter.
-
-=head1 PLAYERS
-
-This module and the undefining of functions is optional, if you wish
-to have this functionality enabled, there are one or more switches you
-need to know about.
-
-=over 4
-
-=item PerlRestartHandler
-
-Apache::Symbol defines a PerlRestartHandler which can be useful in
-conjuction with C<PerlFreshRestart On> as it will avoid subroutine
-redefinition messages. Configure like so:
-
- PerlRestartHandler Apache::Symbol
-
-=item Apache::Registry
-
-By placing the SYNOPSIS bit in you script, Apache::Registry will
-undefine subroutines in your script before it is re-compiled to
-avoid "subroutine re-defined" warnings.
-
-=item Apache::StatINC
-
-See Apache::StatINC's docs.
-
-=item APACHE_SYMBOL_UNIVERSAL
-
-If this environment variable is true when Symbol.pm is compiled,
-it will define UNIVERSAL::undef_functions, which means all classes
-will inherit B<Apache::Symbol::undef_functions>.
-
-=item Others
-
-Module such as B<HTML::Embperl> and B<Apache::ePerl> who compile
-and script cache scripts ala Apache::Registry style can use
-C<undef_functions> with this bit of code:
-
- if($package->can('undef_functions')) {
- $package->undef_functions;
- }
-
-Where C<$package> is the name of the package in which the script is
-being re-compiled.
-
-=back
-
-=head1 SEE ALSO
-
-perlsub(1), Devel::Symdump(3)
-
-=head1 AUTHOR
-
-Doug MacEachern
diff --git a/tags/v1_29/Symbol/Symbol.xs b/tags/v1_29/Symbol/Symbol.xs
deleted file mode 100644
index a5b5624..0000000
--- a/tags/v1_29/Symbol/Symbol.xs
+++ /dev/null
@@ -1,130 +0,0 @@
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-
-#ifdef PERL_OBJECT
-#define sv_name(svp) svp
-#define undef(ref)
-#else
-static void undef(SV *ref)
-{
- GV *gv;
- SV *sv;
- CV *cv;
- I32 has_proto=FALSE;
-
- if(SvROK(ref))
- sv = SvRV(ref);
- else
- croak("Apache::Symbol::undef called without a reference!");
-
- switch (SvTYPE(sv)) {
- case SVt_PVCV:
- cv = (CV*)sv;
- if (!CvXSUB(cv) && CvROOT(cv) && CvDEPTH(cv)) {
- return; /* subroutine is active */
- }
-
- gv = (GV*)SvREFCNT_inc(CvGV(cv));
- if(SvPOK(cv))
- has_proto = TRUE;
-
- cv_undef(cv);
- CvGV(cv) = gv; /* let user-undef'd sub keep its identity */
- if(has_proto)
- SvPOK_on(cv); /* otherwise we get `Prototype mismatch:' */
-
- break;
-
- default:
- warn("Apache::Symbol::undef called without a CODE reference!\n");
- }
-}
-
-static SV *sv_name(SV *svp)
-{
- SV *sv = Nullsv;
- SV *RETVAL = Nullsv;
-
- if(svp && SvROK(svp) && (sv = SvRV(svp))) {
- switch(SvTYPE(sv)) {
- case SVt_PVCV:
- RETVAL = newSV(0);
- gv_fullname(RETVAL, CvGV(sv));
- break;
-
- default:
- break;
- }
- }
- else if(svp && SvPOK(svp)) {
- RETVAL = newSVsv(svp);
- }
-
- return RETVAL;
-}
-#endif
-
-MODULE = Apache::Symbol PACKAGE = Apache::Symbol
-
-PROTOTYPES: DISABLE
-
-void
-undef(sv)
- SV *sv
-
-SV *
-sv_name(sv)
- SV *sv
-
-SV *
-cv_const_sv(sv)
- SV* sv
-
- PREINIT:
- CV *cv;
- GV *gv;
- HV *stash;
-
- CODE:
-
- switch (SvTYPE(sv)) {
- default:
- if (!SvROK(sv)) {
- char *sym;
-
- if (SvGMAGICAL(sv)) {
- mg_get(sv);
- sym = SvPOKp(sv) ? SvPVX(sv) : Nullch;
- }
- else {
- STRLEN n_a;
- sym = SvPV(sv, n_a);
- }
- if(sym)
- cv = perl_get_cv(sym, TRUE);
- break;
- }
- cv = (CV*)SvRV(sv);
- if (SvTYPE(cv) == SVt_PVCV)
- break;
-
- case SVt_PVHV:
- case SVt_PVAV:
- croak("Not a CODE reference");
- case SVt_PVCV:
- cv = (CV*)sv;
- break;
- case SVt_PVGV:
- if (!(cv = GvCVu((GV*)sv)))
- cv = sv_2cv(sv, &stash, &gv, TRUE);
- break;
- }
-
- if(!(RETVAL = cv_const_sv(cv)))
- XSRETURN_UNDEF;
-
- SvREADONLY_off(RETVAL);
-
- OUTPUT:
- RETVAL
diff --git a/tags/v1_29/Symbol/test.pl b/tags/v1_29/Symbol/test.pl
deleted file mode 100644
index b9a83e8..0000000
--- a/tags/v1_29/Symbol/test.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-BEGIN {
- $^W=1;
- print "1..3\n";
-}
-
-use ExtUtils::testlib;
-use Apache::Symbol ();
-
-use strict;
-
-package Foo;
-
-@Foo::ISA = qw(Apache::Symbol);
-sub one {1}
-
-sub constant_one () {1}
-
-#comment out the line below and you'll see something like:
-#Subroutine one redefined at (eval 1) line 1.
-#Constant subroutine constant_one redefined at (eval 2) line 1.
-
-Foo->undef_functions;
-
-eval "sub one {1}";
-eval "sub constant_one () {1}";
-
-print "ok 1\n";
-
-my $name = Apache::Symbol::sv_name(\&Foo::one);
-print "not " unless $name eq "Foo::one";
-
-print "ok 2\n";
-
-package main;
-
-sub THREE () {3}
-my $sv = Apache::Symbol::cv_const_sv(\&THREE) or print "not ";
-
-$sv ||= "3 (failed!)";
-print "ok $sv\n";
-
-
-
-
diff --git a/tags/v1_29/Table/.cvsignore b/tags/v1_29/Table/.cvsignore
deleted file mode 100644
index e2064c3..0000000
--- a/tags/v1_29/Table/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-pm_to_blib
-Table.xs
diff --git a/tags/v1_29/Table/Makefile.PL b/tags/v1_29/Table/Makefile.PL
deleted file mode 100644
index a45b809..0000000
--- a/tags/v1_29/Table/Makefile.PL
+++ /dev/null
@@ -1,12 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- 'NAME' => 'Apache::Table',
- 'VERSION_FROM' => 'Table.pm',
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
diff --git a/tags/v1_29/Table/Table.pm b/tags/v1_29/Table/Table.pm
deleted file mode 100644
index f46790f..0000000
--- a/tags/v1_29/Table/Table.pm
+++ /dev/null
@@ -1,118 +0,0 @@
-package Apache::Table;
-
-use mod_perl ();
-
-$VERSION = '0.01';
-__PACKAGE__->mod_perl::boot($VERSION);
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Table - Perl interface to the Apache table structure
-
-=head1 SYNOPSIS
-
- use Apache::Table ();
-
- my $headers_out = $r->headers_out;
- while(my($key,$val) = each %$headers_out) {
- ...
- }
-
- my $table = $r->headers_out;
- $table->set(From => 'dougm@perl.apache.org');
-
-mod_perl needs to be compiled with at least one of the following options:
-
- DYNAMIC=1
- PERL_TABLE_API=1
- EVERYTHING=1
-
-=head1 DESCRIPTION
-
-This module provides tied interfaces to Apache data structures.
-
-=head2 CLASSES
-
-=over 4
-
-=item Apache::Table
-
-The I<Apache::Table> class provides methods for interfacing
-with the Apache C<table> structure.
-The following I<Apache> class methods, when called in a scalar context
-with no "key" argument, will return a I<HASH> reference blessed into the
-I<Apache::Table> class and where I<HASH> is tied to
-I<Apache::Table>:
-
- headers_in
- headers_out
- err_headers_out
- notes
- dir_config
- subprocess_env
-
-=head2 METHODS
-
-=over 4
-
-=item get
-
-Corresponds to the C<ap_table_get> function.
-
- my $value = $table->get($key);
-
- my $value = $headers_out->{$key};
-
-=item set
-
-Corresponds to the C<ap_table_set> function.
-
- $table->set($key, $value);
-
- $headers_out->{$key} = $value;
-
-=item unset
-
-Corresponds to the C<ap_table_unset> function.
-
- $table->unset($key);
-
- delete $headers_out->{$key};
-
-=item clear
-
-Corresponds to the C<ap_table_clear> function.
-
- $table->clear;
-
- %$headers_out = ();
-
-=item add
-
-Corresponds to the C<ap_table_add> function.
-
- $table->add($key, $value);
-
-=item merge
-
-Corresponds to the C<ap_table_merge> function.
-
- $table->merge($key, $value);
-
-=back
-
-=back
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-=head1 SEE ALSO
-
-Apache(3), mod_perl(3)
-
-=cut
diff --git a/tags/v1_29/URI/.cvsignore b/tags/v1_29/URI/.cvsignore
deleted file mode 100644
index ee98ac2..0000000
--- a/tags/v1_29/URI/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-pm_to_blib
-URI.xs
diff --git a/tags/v1_29/URI/Makefile.PL b/tags/v1_29/URI/Makefile.PL
deleted file mode 100644
index 0c4b21b..0000000
--- a/tags/v1_29/URI/Makefile.PL
+++ /dev/null
@@ -1,14 +0,0 @@
-use ExtUtils::MakeMaker;
-use Config;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- NAME => "Apache::URI",
- VERSION_FROM => "URI.pm",
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
-
diff --git a/tags/v1_29/URI/URI.pm b/tags/v1_29/URI/URI.pm
deleted file mode 100644
index 9d538ca..0000000
--- a/tags/v1_29/URI/URI.pm
+++ /dev/null
@@ -1,123 +0,0 @@
-package Apache::URI;
-
-use mod_perl ();
-
-$VERSION = '1.00';
-__PACKAGE__->mod_perl::boot($VERSION);
-
-1;
-__END__
-
-=head1 NAME
-
-Apache::URI - URI component parsing and unparsing
-
-=head1 SYNOPSIS
-
- use Apache::URI ();
- my $uri = $r->parsed_uri;
-
- my $uri = Apache::URI->parse($r, "http://perl.apache.org/");
-
-=head1 DESCRIPTION
-
-This module provides an interface to the Apache I<util_uri> module and
-the I<uri_components> structure.
-
-=head1 METHODS
-
-=over 4
-
-=item Apache::parsed_uri
-
-Apache will have already parsed the requested uri components, which can
-be obtained via the I<parsed_uri> method defined in the I<Apache> class.
-This method returns an object blessed into the I<Apache::URI> class.
-
- my $uri = $r->parsed_uri;
-
-=item parse
-
-This method will parse a URI string into uri components which are stashed
-in the I<Apache::URI> object it returns.
-
- my $uri = Apache::URI->parse($r, "http://www.foo.com/path/file.html?query+string");
-
-This method is considerably faster than using I<URI::URL>:
-
- timethese(5000, {
- C => sub { Apache::URI->parse($r, $test_uri) },
- Perl => sub { URI::URL->new($test_uri) },
- });
-
- Benchmark: timing 5000 iterations of C, Perl...
- C: 1 secs ( 0.62 usr 0.04 sys = 0.66 cpu)
- Perl: 6 secs ( 6.21 usr 0.08 sys = 6.29 cpu)
-
-=item unparse
-
-This method will join the uri components back into a string version.
-
- my $string = $uri->unparse;
-
-
-=item scheme
-
- my $scheme = $uri->scheme;
-
-
-=item hostinfo
-
- my $hostinfo = $uri->hostinfo;
-
-
-=item user
-
- my $user = $uri->user;
-
-
-=item password
-
- my $password = $uri->password;
-
-
-=item hostname
-
- my $hostname = $uri->hostname;
-
-=item port
-
- my $port = $uri->port;
-
-=item path
-
- my $path = $uri->path;
-
-=item rpath
-
-Returns the I<path> minus I<path_info>.
-
- my $path = $uri->rpath;
-
-
-=item query
-
- my $query = $uri->query;
-
-
-=item fragment
-
- my $fragment = $uri->fragment;
-
-
-=back
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-=head1 SEE ALSO
-
-perl(1).
-
-=cut
diff --git a/tags/v1_29/Util/.cvsignore b/tags/v1_29/Util/.cvsignore
deleted file mode 100644
index a5b59f0..0000000
--- a/tags/v1_29/Util/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-pm_to_blib
-Util.xs
diff --git a/tags/v1_29/Util/Makefile.PL b/tags/v1_29/Util/Makefile.PL
deleted file mode 100644
index eb1d066..0000000
--- a/tags/v1_29/Util/Makefile.PL
+++ /dev/null
@@ -1,12 +0,0 @@
-use ExtUtils::MakeMaker;
-
-use lib qw(../lib);
-use Apache::src ();
-my $src = Apache::src->new;
-
-WriteMakefile(
- 'NAME' => 'Apache::Util',
- 'VERSION_FROM' => 'Util.pm', # finds $VERSION
- 'INC' => $src->inc,
- 'TYPEMAPS' => $src->typemaps,
-);
diff --git a/tags/v1_29/Util/Util.pm b/tags/v1_29/Util/Util.pm
deleted file mode 100644
index befeb81..0000000
--- a/tags/v1_29/Util/Util.pm
+++ /dev/null
@@ -1,166 +0,0 @@
-package Apache::Util;
-
-use strict;
-use mod_perl ();
-use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS);
-
-use Exporter ();
-use DynaLoader ();
-
-*unescape_uri = \&Apache::unescape_url;
-*unescape_uri_info = \&Apache::unescape_url_info;
-
-*import = \&Exporter::import;
-
-@EXPORT_OK = qw(escape_html escape_uri unescape_uri unescape_uri_info
- parsedate ht_time size_string validate_password);
-%EXPORT_TAGS = (all => \@EXPORT_OK);
-$VERSION = '1.02';
-
-__PACKAGE__->mod_perl::boot($VERSION);
-
-1;
-__END__
-
-
-=head1 NAME
-
-Apache::Util - Interface to Apache C util functions
-
-=head1 SYNOPSIS
-
- use Apache::Util qw(:all);
-
-=head1 DESCRIPTION
-
-This module provides a Perl interface to some of the C utility functions
-available in Perl. The same functionality is avaliable in libwww-perl, but
-the C versions are faster:
-
- use Benchmark;
- timethese(1000, {
- C => sub { my $esc = Apache::Util::escape_html($html) },
- Perl => sub { my $esc = HTML::Entities::encode($html) },
- });
-
- Benchmark: timing 1000 iterations of C, Perl...
- C: 0 secs ( 0.17 usr 0.00 sys = 0.17 cpu)
- Perl: 15 secs (15.06 usr 0.04 sys = 15.10 cpu)
-
- use Benchmark;
- timethese(10000, {
- C => sub { my $esc = Apache::Util::escape_uri($uri) },
- Perl => sub { my $esc = URI::Escape::uri_escape($uri) },
- });
-
- Benchmark: timing 10000 iterations of C, Perl...
- C: 0 secs ( 0.55 usr 0.01 sys = 0.56 cpu)
- Perl: 2 secs ( 1.78 usr 0.01 sys = 1.79 cpu)
-
-=head1 FUNCTIONS
-
-=over 4
-
-=item escape_html
-
-This routine replaces unsafe characters in $string with their entity
-representation.
-
- my $esc = Apache::Util::escape_html($html);
-
-This function will correctly escape US-ASCII output. If you are using
-a different character set such as UTF8, or need more control on
-the escaping process, use HTML::Entities.
-
-=item escape_uri
-
-This function replaces all unsafe characters in the $string with their
-escape sequence and returns the result.
-
- my $esc = Apache::Util::escape_uri($uri);
-
-=item unescape_uri
-
-This function decodes all %XX hex escape sequences in the given URI.
-
- my $unescaped = Apache::Util::unescape_uri($safe_uri);
-
-=item unescape_uri_info
-
-This function is similar to unescape_uri() but is specialized to remove
-escape sequences from the query string portion of the URI. The main
-difference is that it translates the ``+'' character into spaces as well
-as recognizing and translating the hex escapes.
-
-Example:
-
- $string = $r->uri->query;
- my %data = map { Apache::Util::unescape_uri_info($_) }
- split /[=&]/, $string, -1;
-
- This would correctly translate the query string
- ``name=Fred+Flintstone&town=Bedrock'' into the hash:
-
- name => 'Fred Flintstone',
- town => 'Bedrock'
-
-=item parsedate
-
-Parses an HTTP date in one of three standard forms:
-
- Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
-
- Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
-
- Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
-
-Example:
-
- my $secs = Apache::Util::parsedate($date_str);
-
-=item ht_time
-
-Format a time string.
-
-Examples:
-
- my $str = Apache::Util::ht_time(time);
-
- my $str = Apache::Util::ht_time(time, "%d %b %Y %T %Z");
-
- my $str = Apache::Util::ht_time(time, "%d %b %Y %T %Z", 0);
-
-=item size_string
-
-Converts the given file size into a formatted string. The size
-given in the string will be in units of bytes, kilobytes, or
-megabytes, depending on the size.
-
- my $size = Apache::Util::size_string -s $r->finfo;
-
-=item validate_password
-
-Validate a plaintext password against a smashed one. Use either
-crypt() (if available), ap_MD5Encode() or ap_SHA1Encode depending
-upon the format of the smashed input password.
-
-Returns true if they match, false otherwise.
-
- if (Apache::Util::validate_password("slipknot", "aXYx4GnaCrDQc")) {
- print "password match\n";
- }
- else {
- print "password mismatch\n";
- }
-
-=back
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-=head1 SEE ALSO
-
-perl(1).
-
-=cut
diff --git a/tags/v1_29/apache-modlist.html b/tags/v1_29/apache-modlist.html
deleted file mode 100644
index 0cf7803..0000000
--- a/tags/v1_29/apache-modlist.html
+++ /dev/null
@@ -1,378 +0,0 @@
-<html>
-<head>
-<title>The Apache/Perl Module List</title>
-</head>
-<body>
-<h1>The Apache/Perl Module List</h1>
-
-Maintained by <a href="mailto:dougm@pobox.com">Doug MacEachern</a>,
-<br><i> $Revision$ $Date$</i>
-
-<h3>Contents</h3>
-<a href="#intro">Introduction</a><br>
-<a href="#part">Playing Your Part</a><br>
-<a href="#modules">The Apache/Perl Modules</a><br>
-<a href="#where">Where Are The Modules Kept?</a><br>
-<a href="#contacts">Contacts</a><br>
-<a href="#info">More Info</a><br>
-<p>
-<h3><a name="intro">Introduction</a></h3>
-The Apache/Perl module list is here for the same reason as the
-main <a href="http://www.perl.com/CPAN/modules/00modlist.long.html">
-Perl module list</a>, to change duplication of effort into cooperation
-and help to save the world! Apache/Perl modules are somewhat different
-from the many others found on CPAN. Most Perl modules are
-"building blocks", developers use them
-to build applications or even more building blocks.
-It just so happens
-that Apache/Perl modules are encapsulted inside a namespace and .pm file.
-However, this does not make them all building blocks, many are just like
-apache modules written in C, you install, edit the server configuration
-files and you're done. Before you start a new module, consider this:
-Apache/Perl modules are useless outside of mod_perl and Apache. Do your best
-to design such that your <b>Apache::*</b> module will make good use of the
-building blocks found on CPAN, putting together new building blocks where
-appropriate and simply glue them together with the Apache
-API, keeping the <b>Apache::*</b> modules very small.
-<p>
-These modules will also serve as good examples, showing you where modules
-can step in during a stage of a request with <b>Perl*Handler</b> callbacks.
-You'll also see how and when to use the Apache API methods.
-
-<h3><a name="part">Playing Your Part</a></h3>
-Apache and Perl are world-wide collaborative efforts, naturally, the
-Apache/Perl integration project is the same.<br>
-You've started on the right foot simply by reading this document, thanks!<br>
-Please be sure you've read the
-main <a href="http://www.perl.com/CPAN/modules/00modlist.long.html">
-Perl module list</a>, all that is said there is relevant here!
-<p>
-If you have any additions or changes for the list, please send them to
-the Apache/Perl <a href="mailto:modperl@perl.apache.org"> mailing list </a>
-or to <a href="mailto:dougm@pobox.com">me</a>.
-<p>
-If you wish to share you module(s) the Perl way, by putting them on CPAN,
-send a request to <a href="mailto:dougm@pobox.com">me</a> or
-<a href="mailto:modules@perl.org">modules@perl.org</a> to get set up with a
-PAUSE user id and directory.
-<p>
-<b>HINT</b>: For a nice set of template files try this:
-<pre>
-% h2xs -AX -n Apache::YourPackageName
-</pre>
-
-<h3><a name="modules">The Apache/Perl modules</a></h3>
-<pre>
-Apache::
-
-* PerlHandler's
-AddrMunge bdpf Munge email addresses in webpages MJD
-AutoIndex Rdcf Lists directory content GOZER
-Archive bdpf Make linked contents pages of .tar(.gz) JPETERSON
-<a href="http://www.nodeworks.com/asp/">ASP</a> bdpO Implement Active Server Pages CHAMAS
-BBS cdpO BBS like System for Apache MKOSS
-CallHandler cdpf Map filenames to subroutine calls GKNOPS
-Cachet i OutputChain with caching MERLYN
-Compress bdpO Compress content on the fly KWILLIAM
-Dir i OO (subclassable) mod_dir replacement DOUGM
-Dispatch bmpf Call PerlHandlers as CGI scripts GEOFF
-<a href="http://perl.apache.org/embperl/">Embperl</a> Rmcf Embed Perl in HTML GRICHTER
-EmbperlChain bdpO Feed handler output to Embperl CHOLET
-ePerl Rdpr Fast emulated Embedded Perl (ePerl) RSE
-Filter RdpO OutputChain like functionality KWILLIAM
-Forward bdpO OutputChain like functionality MPB
-FTP i Full-fledged FTP proxy PMKANE
-Gateway bdpf A multiplexing gateway CCWF
-GzipChain bmpf Compress files on the fly ANDK
-iNcom bdpf An e-commerce framework FRAJULAC
-Layer bdpf Layer content tree over one or more SAM
-Magick bdpf Image conversion on-the-fly MPB
-<a href="http://www.masonhq.com">Mason</a> bdpO Build sites w/ modular Perl/HTML blocks JSWARTZ
-ModuleDoc bdpf Self documentation for Apache C modules DOUGM
-NavBar bdpO Navigation bar generator MPB
-NNTPGateway adpf A Web based NNTP (usenet) interface BOUBAKER
-OutputChain bmpO Chain output of stacked handlers JANPAZ
-OWA bdpf Runs Oracle PL/SQL Web Toolkit apps SVINTO
-PageKit ampO Application framework w/ HTML::Template TJMATHER
-PassFile bdpf Send file via OutputChain ANDK
-PerlRun Smpf Run unaltered CGI scripts APML
-PrettyPerl Rdpf Syntax highlighting for Perl files RA
-PrettyText bdpf Re-format .txt files for client display CHTHORMAN
-RandomLocation bdpf Random image display RKOBES
-Registry Smpf Run unaltered CGI scripts APML
-RobotRules cdpf Enforce robot rules (robots.txt) PARKER
-Sandwich bmpf Layered document (sandwich) maker VKHERA
-ShowRequest bdpf Show phases and module participation DOUGM
-SimpleReplace ampf Simple replacement template tool GEOFF
-SSI RmpO Implement server-side includes in Perl KWILLIAM
-SSIChain bmpO SSI on other modules output JANPAZ
-Stage Rdpf Manage a document staging directory ANDK
-TarGzip c ZENIN
-TimedRedirect bdpf Redirect urls for a given time period PETERM
-UploadSvr bdpO A lightweight publishing system ANDK
-VhostSandwich cdpf Virtual host layered document maker MARKC
-WDB bdpf Database query/edit tool using DBI JROWE
-WebSQL cdpO Adaptation of Sybase's WebSQL GUNTHER
-
-* PerlInitHandler's
-RequestNotes ampf Pass cookie & form data around pnotes GEOFF
-
-* PerlHeaderParserHandler's
-AgentDeny cdpf Deny abusive User-Agents ROBH
-
-* PerlAuthenHandler's
-AuthAny bdpf Authenticate with any username/password MPB
-AuthenCache bmpf Cache authentication credentials JBODNAR
-AuthCookie RdpO Authen + Authz via cookies KWILLIAM
-AuthenDBI bmpO Authenticate via Perl's DBI MERGL
-AuthenGSS cdpf Generic Security Service (RFC 2078) DOUGM
-AuthenIMAP bdpf Authentication via an IMAP server MICB
-AuthenPasswdSrv bdpf External authentication server JEFFH
-AuthenPasswd bdpf Authenticate against /etc/passwd DEP
-AuthLDAP bdpf LDAP authentication module CDONLEY
-AuthPerLDAP bdpf LDAP authentication module (PerLDAP) HENRIK
-AuthenNIS bdpf NIS authentication DEP
-AuthNISPlus bdpF NIS Plus authentication/authorization VALERIE
-AuthenRaduis bdpf Authentication via a Radius server DANIEL
-AuthenSmb bdpf Authenticate against NT server PARKER
-AuthenURL bdpf Authenticate via another URL JGROENVEL
-DBILogin bdpf Authenticate to backend database JGROENVEL
-DCELogin bdpf Obtain a DCE login context DOUGM
-PHLogin bdpf Authenticate via a PH database JGROENVEL
-TicketAccess bdpO Ticket based access/authentication MPB
-
-* PerlAuthzHandler's
-AuthCookie bdpf Authen + Authz via cookies EBARTLEY
-AuthzAge bmpf Authorize based on age APML
-AuthzDCE cdpf DFS/DCE ACL based access control DOUGM
-AuthzDBI bmpO Group authorization via Perl's DBI MERGL
-AuthzGender bdpf Authorize based on gender MPB
-AuthzNIS bdpf NIS authorization DEP
-AuthzPasswd bdpf Authorize against /etc/passwd DEP
-AuthzSSL bdpf Authorize based on client cert MPB
-RoleAuthz i Role-based authorization DOUGM
-
-* PerlAccessHandler's
-AccessLimitNum bmpf Limit user access by number of requests APML
-BlockAgent bdpf Block access from certain agents MPB
-DayLimit bmpf Limit access based on day of week MPB
-IPThrottle cdpf Limit bandwith consumption by IP MERLYN
-RobotLimit cdpf Limit access of robots PARKER
-SpeedLimit bdpf Control client request rate MPB
-
-* PerlTypeHandler's
-AcceptLanguage cdpf Send file type based on language pref ROBH
-MIME bdcf Perl implementation of mod_mime MPB
-MimeDBI bdpf Type mapping from a DBI database MPB
-MimeXML bdpf mime encoding sniffer for XML files MSERGEANT
-
-* PerlTransHandler's (May also include a PerlHandler)
-AdBlocker bdpf Block advertisement images MPB
-AddHostPath adpf Prepends parts of hostname to URI RJENKS
-AnonProxy bdpf Anonymizing proxy MPB
-Checksum bdpf Manage document checksum trees MPB
-DynaRPC i Dynamically translate URIs into RPCs DOUGM
-LowerCaseGETs bdpf Lowercase URI's when needed PLISTER
-MsqlProxy bmpf Translate URI's into mSQL queries APML
-ProxyPass bdpf Perl implementation of ProxyPass MJS
-ProxyPassThru bdpO Skeleton for vanilla proxy RMANGI
-ProxyCache i Caching proxy DOUGM
-StripSession bdpf Strip session info from URI MPB
-Throttle bdpf Speed-based content negotiation DONS
-TransLDAP bdpf Translate URIs to LDAP queries CDONLEY
-
-* PerlFixupHandler's
-HttpEquiv bdpf HTML HTTP-EQUIV tags to HTTP headers ROBH
-RefererBlock bdpf Block based on MIME type + Referer CHOLET
-Timeit bmpf Benchmark PerlHandlers APML
-Usertrack bdpf Perl version of mod_usertrack ABH
-
-* PerlLogHandler's
-DBILogConfig bdpf Custom format logging via DBI JBODNAR
-DBILogger bdpf Logging via DBI ABH
-DumpHeaders bdpf Watch HTTP transaction via headers DOUGM
-LogMail bdpf Log certain requests via email MPB
-Traffic bdpf Logs bytes transferred, per-user basis MAURICE
-WatchDog c Look for problematic URIs DOUGM
-
-* PerlChildInitHandler's
-Resource Smpf Limit resources used by httpd children APML
-
-* Server Configuration
-ConfigLDAP i Config via LDAP and <Perl> MARKK
-ConfigDBI i Config via DBI and <Perl> MARKIM
-ModuleConfig SmcO Interface to configuration API APML
-PerlSections SmpO Utilities for <Perl> sections APML
-httpd_conf bmpO Methods to configure and run an httpd APML
-src SmpO Finding and reading bits of source APML
-
-* Database
-DBI bmpO Persistent DBI connection mgmt. MERGL
-Sybase::DBlib bmpO Persistent DBlib connection mgmt. BMILLET
-Sybase::CTlib bapO Persistent CTlib connection mgmt. MDOWNING
-Mysql bdpO Persistent connection mgmt. for Mysql NJENSEN
-
-* Interfaces and integration with Apache C structures and modules
-Apache SmcO Interface to request_rec struct + API APML
-Backhand bdcr Bridge between mod_backhand + mod_perl DLOWE
-CmdParms SmcO Interface to Apache cmd_parms struct APML
-Command bmcO Interface to Apache command_rec struct APML
-Connection SmcO Inteface to Apache conn_rec struct APML
-Constants Smcf Constants defined in httpd.h APML
-ExtUtils SmpO Utils for Apache:C/Perl glue APML
-File SmcO Methods for working with files APML
-Handler bmcO Interface to Apache handler_rec struct APML
-Log SmcO ap_log_error interface APML
-LogFile bmcO Interface to Apache's piped logs, etc. APML
-Module bmcO Interface to Apache module struct APML
-Scoreboard RdcO Perl interface to Apache's scoreboard.h DOUGM
-Server SmcO Interface to Apache server_rec struct APML
-SubProcess cmcO Interface to Apache subprocess API APML
-Table SmcO Interface to Apache table struct + API APML
-URI SmcO URI component parsing and unparsing APML
-Util Smcf Interface to Apache's util*.c functions APML
-
-* HTTP Method handlers
-PATCH bdpf HTTP PATCH method handler MPB
-PUT cdpf HTTP PUT method handler SORTIZ
-Roaming bdpO PUT/GET/MOVE/DELETE (Netscape Roaming) JWEID
-
-* Watchdog and Monitoring tools
-SizeLimit Smpf Graceful exit for large children APML
-GTopLimit Rdpn Child exit on small shared or large mem STAS
-Status Smpf Embedded interpreter runtime status APML
-VMonitor Rdpn Visual System and Processes Monitor STAS
-Watchdog::RunAway Rdpn RunAway processes watchdog/terminator STAS
-
-* Development and Debug tools
-DB amcO Hook Perl interactive DB into mod_perl DOUGM
-Debug Rmpf mod_perl debugging utilities APML
-DebugInfo ampO Per-request data logging GEOFF
-DProf bmcf Hook Devel::DProf into mod_perl DOUGM
-FakeRequest ampO Implement Apache methods off-line APML
-Leak bmcf Memory leak tracking routines APML
-Peek amcf Devel::Peek for mod_perl APML
-SawAmpersand bmpf Make sure noone is using $&, $' or $` APML
-SmallProf bmpf Hook Devel::SmallProf into mod_perl DOUGM
-StatINC Smpf Reload require'd files when updated APML
-Symbol bmcO Things for symbol things APML
-Symdump bmpf Symbol table snapshots to disk APML
-test Smpf Handy routines for 'make test' scripts APML
-
-* Misc
-Byterun i Run Perl bytecode modules DOUGM
-Cookie amcO C version of CGI::Cookie APML
-Icon bdcO Access to AddIcon* configuration DOUGM
-Include Smpf mod_include + Apache::Registry handler APML
-Mmap bdcf Share data via Mmap module FLETCH
-Motd bmpf Add Message of the Day functionality CRAMIREZ
-ParseLog bdpO OO interface to Apache log files AKIRA
-RegistryLoader SmpO Apache::Registry startup script loader APML
-Request amcO CGI.pm functionality using API methods APML
-Safe ampO Adaptation of "safecgiperl" APML
-Session bmpO Maintain client <-> httpd session/state JBAKER
-Servlet ampO Interface to the Java Servlet engine IKLUFT
-SIG SmpO Signal handlers for mod_perl APML
-State i Powerful state engine RSE
-TempFile bdpf Manage temporary files TOMHUGHES
-Upload amcO File upload class APML
-
-</pre>
-<h3><a name="where">Where Are The Modules Kept?</a></h3>
-Modules listed with the <b>APML</b> as is contact are part of the
-mod_perl distribution package. Other modules can be found on CPAN
-the <a href="http://www.perl.com/CPAN/modules/by-module/Apache/">
-modules/by-module/Apache/</A> directory. If they have not made it
-to CPAN yet, they might be found in the mod_perl
-<a href="http://perl.apache.org/src/contrib/">contrib</a>
-directory, which is also tar'd and distributed via CPAN in the
-<a href="http://www.perl.com/CPAN/modules/by-module/Apache/">
-modules/by-module/Apache/</A> directory.
-Otherwise, feel free to ask the contact author or the list
-how you can go about getting your hands on a copy.
-
-<h3><a name="contacts">Contacts</a></h3>
-<pre>
-ABH Ask Bjørn Hansen <ask@netcetera.dk>
-AKIRA Akira Hangai <akira@discover-net.net>
-ANDK Andreas König <a.koenig@franz.ww.TU-Berlin.DE>
-APML The Apache/Perl Mailing List <modperl@perl.apache.org>
-BMILLETT Brian Millett <bpm@techapp.com>
-BOUBAKER Heddy Boubaker <boubaker@cena.fr>
-CCWF Charles C. Fu &lt;ccwf@bacchus.com&gt;
-CDONLEY Clayton Donley <donley@wwa.com>
-CHAMAS Joshua Chamas <chamas@alumni.stanford.org>
-CHOLET Eric Cholet <cholet@logilune.com>
-CHTHORMAN Chris Thorman <chris@thorman.com>
-CRAMIREZ Carlos Ramirez <carlos@quantumfx.com>
-DANIEL Daniel <daniel-authenradius@electricrain.com>
-DEP Demetrios E. Paneras <dep@media.mit.edu>
-DLOWE David Lowe <dlowe@pootpoot.com>
-DONS Don Schwarz <don@dons.xnet.com>
-DOUGB Doug Bagley <doug@dejanews.com>
-DOUGM Doug MacEachern <dougm@pobox.com>
-EBARTLEY Eric Bartley <bartley@osd.cc.purdue.edu>
-FLETCH Mike Fletcher <lemur1@mindspring.com>
-FRAJULAC Francis J. Lacoste <frajulac@insu.com>
-GEOFF Geoffrey Young <geoff@cpan.org>
-GKNOPS Gerd Knops <gerti@BITart.com>
-GOZER Philippe M. Chiasson <gozer@ectoplasm.dyndns.com>
-GRICHTER Gerald Richter <richter@ecos.de>
-GUNTHER Gunther Birznieks <gunther@nhgri.nih.gov>
-HENRIK Henrik Strom <henrik@computer.org>
-HMUELLER Hanno Mueller <hmueller@mail.kabel.de>
-IKLUFT Ian Kluft <ikluft@cisco.com>
-JANPAZ Honza Pazdziora <adelton@informatics.muni.cz>
-JBAKER Jeffrey Baker <jeff@godzilla.tamu.edu>
-JBODNAR Jason Bodnar <jbodnar@tivoli.com>
-JGROV John D Groenveld <jdg117@elvis.arl.psu.edu>
-JEFFH Jeffrey Hulten <jeffh@premier1.net>
-JROWE Jeff Rowe <beowulf@lava.net>
-JSWARTZ Jonathan Swartz <swartz@transbay.net>
-JWEID Jochen Wiedmann <joe@ispsoft.de>
-KWILLIAM Ken Williams <ken@forum.swarthmore.edu>
-LDS Lincoln D. Stein <lstein@genome.wi.mit.edu>
-MARKC Mark Constable <markc@goldcoast.org>
-MARKIM Mark A. Imbriaco <mark@itribe.net>
-MARKK Mark Kennedy <mtk@ny.ubs.com>
-MAURICE Maurice Aubrey <maurice@hevanet.com>
-MDARWIN Matthew Darwin <matthew@davin.ottawa.on.ca>
-MDORMAN Michael Alan Dorman <mdorman@calder.med.miami.edu>
-MDOWNING Mark Downing <mdowning@rdatasys.com>
-MERGL Edmund Mergl <E.Mergl@bawue.de>
-MERLYN Randal L. Schwartz <merlyn@stonehenge.com>
-MJD Mark-Jason Dominus <mjd-perl-pause2@plover.com>
-MJS Michael Smith <mjs@iii.co.uk>
-MKOSS Max Kossatzmax <kossatz@thing.at>
-MICB Malcolm Beattie <mbeattie@sable.ox.ac.uk>
-MPB mod_perl book (Doug and Lincoln) <book@modperl.com>
-MSERGEANT Matt Sergeant <matt@sergeant.org>
-RA Roman Kosenko <ra@amk.lg.ua>
-NJENSEN Neil Jensen <njensen@habaneros.com>
-PARKER Michael Parker <parker@austx.tandem.com>
-PETERM Peter Marshall <peterm@pageactive.com>
-JPETERSON Jonathan Peterson <jon@amxstudios.com>
-PLISTER Peter Lister <p.lister@cranfield.ac.uk>
-PMKANE Patrick Michael Kane <modus@pr.es.to>
-PTI Peter Tillemans <pti@pandora.be>
-RJENKS Robert Jenks <rjenks@cvsroot.org>
-RKOBES Randy Kobes <randy@theory.uwinnipeg.ca>
-RMANGI Rick Mangi <rmangi@tgix.com>
-ROBH Rob Hartill <robh@imdb.com>
-RSE Ralf S. Engelschall <rse@engelschall.com>
-SAM Simon Matthews <sam@peritas.com>
-SKANE Stephen E Kane <sek112@elvis.arl.psu.edu>
-SORTIZ Salvador Ortiz <sortiz@msg.com.mx>
-STAS Stas Bekman <stas@stason.org>
-SVINTO Svante Sörmark <svinto@ita.chalmers.se>
-TJMATHER T.J. Mather <tjmather@thoughtstore.com>
-TOMHUGHES Tom Hughes <tom@compton.demon.co.uk>
-VALERIE Valerie Delane <valerie@savina.com>
-VKHERA Vivek Khera <vivek@khera.org>
-ZENIN Byron Brummer <zenin@archive.rhps.org>
-</pre>
-
-<h3><a name="info">More Info</a></h3>
-See the Apache/Perl <a href="http://perl.apache.org/">homepage</a>.
-</body>
-</html>
diff --git a/tags/v1_29/apaci/.cvsignore b/tags/v1_29/apaci/.cvsignore
deleted file mode 100644
index 0018a82..0000000
--- a/tags/v1_29/apaci/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-*.pl
-*.c
-*.xs
-*.h
-.tmp.*
-*.lo
-typemap
-Makefile
-mod_perl.config
-find_source
-apxs_cflags
-perl_config
diff --git a/tags/v1_29/apaci/Makefile.libdir b/tags/v1_29/apaci/Makefile.libdir
deleted file mode 100644
index 5091da4..0000000
--- a/tags/v1_29/apaci/Makefile.libdir
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a place-holder which indicates to Apache's src/Configure script that
-it shouldn't provide the default targets when building the Makefile from
-Makefile.tmpl in this directory. Instead it'll just prepend all the important
-variable definitions, and copy the Makefile.tmpl onto the end.
diff --git a/tags/v1_29/apaci/Makefile.tmpl b/tags/v1_29/apaci/Makefile.tmpl
deleted file mode 100644
index 4287bec..0000000
--- a/tags/v1_29/apaci/Makefile.tmpl
+++ /dev/null
@@ -1,111 +0,0 @@
-##
-## Makefile.tmpl -- Makefile template for mod_perl (Apache-side)
-## Written by Ralf S. Engelschall <rse@apache.org>
-##
-## This is a hybrid Makefile template: It can is used both
-## inside the Apache source tree as the skeleton for the
-## src/modules/perl/Makefile which is created by Apache's
-## src/Configure script and out-side of the Apache source tree
-## for building via APXS. Here it is the skeketon for the
-## Makefile created by the local configure script.
-##
-
-# Reassemble mod_perl parameters
-# from Perl and Apache parameters
-MP_CC=$(PERL_CC)
-MP_CFLAGS=$(PERL_OPTIMIZE) -I$(PERL_INC) $(PERL_CCFLAGS) \
- $(PERL_DEFS) $(INCLUDES) $(AP_CFLAGS) $(CFLAGS)
-MP_CFLAGS_SHLIB=$(PERL_CCCDLFLAGS) $(MP_CFLAGS)
-MP_LD=$(PERL_LD)
-MP_LDFLAGS_SHLIB=$(PERL_LDDLFLAGS)
-MP_LIBS=$(PERL_LIBS)
-MP_XSUBPP=$(PERL_XSUBPP)
-MP_XSINIT=$(PERL_XSINIT)
-MP_RM=rm -f
-MP_AR=$(PERL_AR)
-MP_RANLIB=$(PERL_RANLIB)
-MP_STATIC_EXTS=$(PERL_STATIC_EXTS)
-MP_STATIC_AR=$(PERL_STATIC_AR)
-MP_STATIC_SRCS=$(PERL_STATIC_SRCS)
-MP_STATIC_OBJS=$(PERL_STATIC_OBJS)
-MP_STATIC_OBJS_PIC=$(PERL_STATIC_OBJS_PIC)
-MP_LIBS=$(PERL_LIBS)
-MP_DISTCLEAN_FILES=Makefile $(ADD_DISTCLEAN_FILES)
-
-##
-## ____ DO NOT CHANGE ANYTHING BELOW THIS LINE ______________________
-##
-
-# the library to build
-MP_LIB=libperl.$(LIBEXT)
-
-# the objects to use
-MP_OBJS=\
- mod_perl.o perlxsi.o perl_config.o perl_util.o perlio.o mod_perl_opmask.o \
- $(MP_STATIC_OBJS)
-MP_OBJS_PIC=\
- mod_perl.lo perlxsi.lo perl_config.lo perl_util.lo perlio.lo mod_perl_opmask.lo \
- $(MP_STATIC_OBJS_PIC)
-
-all: lib
-
-lib: $(MP_LIB)
-
-libperl.a: $(MP_OBJS)
- $(MP_RM) $@
- $(MP_AR) crv $@ $(MP_OBJS)
- $(MP_RANLIB) $@
-
-libperl.so: $(MP_OBJS_PIC)
- $(MP_RM) $@
- $(MP_LD) $(MP_LDFLAGS_SHLIB) -o $@ $(MP_OBJS_PIC) $(MP_LIBS)
-
-.SUFFIXES: .xs .c .o .lo
-
-.c.lo:
- $(MP_CC) $(MP_CFLAGS_SHLIB) -c $< && mv $*.o $*.lo
-
-.c.o:
- $(MP_CC) $(MP_CFLAGS) -c $<
-
-.xs.c:
- $(MP_XSUBPP) $*.xs >$@
-
-.xs.o:
- $(MP_XSUBPP) $*.xs >$*.c
- $(MP_CC) $(MP_CFLAGS) -c $*.c
-
-.xs.lo:
- $(MP_XSUBPP) $*.xs >$*.c
- $(MP_CC) $(MP_CFLAGS_SHLIB) -c $*.c && mv $*.o $*.lo
-
-perlxsi.c:
- $(MP_XSINIT) -- -o perlxsi.c -std $(MP_STATIC_EXTS)
-
-clean:
- $(MP_RM) $(MP_LIB)
- $(MP_RM) $(MP_OBJS)
- $(MP_RM) $(MP_OBJS_PIC)
- $(MP_RM) $(MP_STATIC_SRCS)
- $(MP_RM) perlxsi.c
-
-distclean: clean
- $(MP_RM) $(MP_DISTCLEAN_FILES)
-
-# FOR STAND-ALONE BUILDING ONLY
-install:
- $(APXS) -i -a -n perl libperl.so
-
-depend:
- cp Makefile.tmpl Makefile.tmpl.bak \
- && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
- && gcc -MM $(INCLUDES) $(AP_CFLAGS) $(CFLAGS) *.c >> Makefile.new \
- && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
- -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
- > Makefile.tmpl \
- && rm Makefile.new
-
-# Dependencies
-$(MP_OBJS) $(MP_OBJS_PIC): Makefile
-
-# DO NOT REMOVE
diff --git a/tags/v1_29/apaci/README b/tags/v1_29/apaci/README
deleted file mode 100644
index 4264cbf..0000000
--- a/tags/v1_29/apaci/README
+++ /dev/null
@@ -1,111 +0,0 @@
-
- Description
- -----------
-
- This is the Apache-side of mod_perl. It is a hybrid build environment which
- can be both used to build mod_perl inside the Apache source tree via APACI
- or plain Configure script and outside the Apache source tree via the DSO
- tool APXS.
-
- Files
- -----
-
- README .............. this file
- Makefile.tmpl ....... Makefile template for Apache 1.3
- Makefile.libdir ..... indicator file for Apache 1.3 to use Makefile.tmpl
- configure ........... stand-alone configure script for APXS situation
- libperl.module ...... sourced Configure inline-script for standard situation
- mod_perl.config ..... the new mod_perl configuration file
- mod_perl.config.sh .. the workhorse which parses the config files and
- generates Makefile parameters out of it by
- extending the given parameters with Perl information
-
- Usage
- -----
-
- [See file ../INSTALL.apaci for detailed description]
-
- o Build mod_perl statically with httpd
- _inside_ the Apache source tree via APACI:
-
- 1. run perl Makefile.PL USE_APACI=1
- (this will:
- - copy apaci/* and src/modules/perl/* to $APACHE_SRC/modules/perl
- - generate $APACHE_SRC/modules/perl/mod_perl.config
- )
- 2. Configure Apache while activating mod_perl
- $ cd $APACHE_SRC
- $ ./configure --activate-module=src/modules/perl/libperl.a
- 3. Build and Install Apache with mod_perl
- $ make
- $ make install
-
- o Build mod_perl as a dynamic shared object (DSO)
- _inside_ the Apache source tree via APACI:
-
- 1. Move these mod_perl sources to $APACHE_SRC/src/modules/perl/
- 2. Configure Apache while activating mod_perl
- $ cd $APACHE_SRC
- $ ./configure --activate-module=src/modules/perl/libperl.a \
- --enable-shared=perl
- 3. Build and Install Apache with mod_perl
- $ make
- $ make install
-
- o Build mod_perl as a dynamic shared object (DSO)
- _outside_ the Apache source tree via APXS:
-
- 1. Configure mod_perl via APXS
- $ ./configure [--with-apxs=/path/to/installed/apache/sbin/apxs]
- 2. Build mod_perl DSO and install it into Apache installation
- $ make install
-
- Configuration
- -------------
-
- The configuration of mod_perl takes place via the file mod_perl.config.
- Either edit this file, accept the defaults or override it via either
-
- $ MODPERL_CONFIG='PERL=/path/to/my/preferred/bin/perl, PERL_SSI=yes'
- $ export MODPERL_CONFIG
- $ ./configure ...
-
- at the APACI configuration step or via
-
- $ ./configure ... 'PERL=/path/to/my/preferred/bin/perl, PERL_SSI=yes'
-
- at the local configuration step when using the APXS variant.
-
- Implemenation
- -------------
-
- Here is a flow control of the configuration:
-
- APACI variant: APXS variant:
-
- $ MODPERL_CONFIG=... $ ./configure ...
- $ cd $APACHE_SRC |
- ./configure ... |
- | mod_perl.config |
- |exec | |exec
- | |read |
- V exec V |
- libperl.module ------> mod_perl.config.sh <------------+
- |
- |
- V
- (Makefile parameters)
- |
- +
- Makefile.tmpl
- |
- |
- V
- Makefile
-
- Actually the merging of the Makefile parameters and the Makefile.tmpl is a
- little bit more complex: When using APACI the parameters are first stored in
- Apache's Makefile.config and then get merged with Makefile.tmpl by Apache's
- Configure in a later step while when using the APXS variants they are
- immediately stored in Makefile by our configure script together with
- Makefile.tmpl.
diff --git a/tags/v1_29/apaci/apxs_cflags.PL b/tags/v1_29/apaci/apxs_cflags.PL
deleted file mode 100644
index e6f888d..0000000
--- a/tags/v1_29/apaci/apxs_cflags.PL
+++ /dev/null
@@ -1,6 +0,0 @@
-use lib qw(./lib ../lib);
-use Apache::src ();
-
-local $Apache::src::APXS = shift;
-
-print Apache::src::apxs_cflags();
diff --git a/tags/v1_29/apaci/configure b/tags/v1_29/apaci/configure
deleted file mode 100755
index a353841..0000000
--- a/tags/v1_29/apaci/configure
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/sh
-##
-## configure -- mod_perl stand-alone configuration script
-## Written by Ralf S. Engelschall <rse@apache.org>
-##
-## This script is executed manually (usually by the end user
-## or mod_perl's Makefile.PL) while building mod_perl
-## off-source via APXS.
-##
-
-DIFS='
-'
-
-# configuration
-my_prefix=" +"
-my_buildtype="DSO"
-my_config="./mod_perl.config"
-my_config_sh="./mod_perl.config.sh"
-my_config_override="$*"
-my_makefileconf="Makefile"
-my_makefiletmpl="Makefile.tmpl"
-my_sourcedir="../src/modules/perl"
-my_sourcefiles="`./find_source`"
-my_typemapdir="../Apache"
-
-# find APXS
-my_apxs=""
-OIFS=$IFS IFS=':'
-for my_dir in $PATH; do
- if test -f "$my_dir/apxs"; then
- if test -x "$my_dir/apxs"; then
- my_apxs="$my_dir/apxs"
- break 2
- fi
- fi
-done
-IFS="$OIFS"
-my_apxs="`echo $my_apxs | sed -e 's://:/:'`"
-
-#
-# parse argument line
-#
-prev=''
-OIFS="$IFS" IFS="$DIFS"
-for option
-do
- if [ ".$prev" != . ]; then
- eval "$prev=\$option"
- prev=""
- continue
- fi
- case "$option" in
- -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg='' ;;
- esac
- case "$option" in
- --with-apxs=*) my_apxs="$optarg" ;;
- --with-perl=*) my_config_override="$my_config_override, PERL=$optarg" ;;
- * ) echo "$0:Error: invalid option '$option'" 1>&2; exit 1 ;;
- esac
-done
-IFS="$OIFS"
-if [ ".$prev" != . ]; then
- echo "$0:Error: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2
- exit 1
-fi
-
-# APXS information
-if [ ".$my_apxs" = . ]; then
- echo "$0:Error: no 'apxs' program found, please provide it's path via --with-apxs" 1>&2
- exit 1
-fi
-my_apxs_sourcedir="`$my_apxs -q PREFIX`"
-my_apxs_cflags="`./apxs_cflags $my_apxs`"
-my_apxs_includes="-I`$my_apxs -q INCLUDEDIR`"
-my_apxs_libexec="`$my_apxs -q LIBEXECDIR`"
-
-# friendly header
-echo "Configuring mod_perl for building via APXS" 2>&1
-
-# fetch the source files
-echo "$my_prefix Creating a local mod_perl source tree"
-for my_file in $my_sourcefiles; do
- cp -f $my_sourcedir/$my_file .
-done
-cp -f $my_typemapdir/typemap .
-
-# begin generation of Makefile
-echo "##" >$my_makefileconf
-echo "## Makefile -- mod_perl stand-alone build environment Makefile" >>$my_makefileconf
-echo "##" >>$my_makefileconf
-echo "" >>$my_makefileconf
-echo "# provide some stuff Apache usually provides" >>$my_makefileconf
-echo "AP_CFLAGS=-DMOD_PERL $my_apxs_cflags" >>$my_makefileconf
-echo "INCLUDES=$my_apxs_includes" >>$my_makefileconf
-echo "RANLIB=ranlib" >>$my_makefileconf
-echo "LIBEXT=so" >>$my_makefileconf
-echo "APACHEEXT=$my_apxs_sourcedir/src" >>$my_makefileconf
-echo "APACHELIBEXEC=$my_apxs_libexec" >>$my_makefileconf
-echo "BASEEXT=mod_perl" >>$my_makefileconf
-echo "APXS=$my_apxs" >>$my_makefileconf
-echo "# own special stuff" >>$my_makefileconf
-echo "ADD_DISTCLEAN_FILES=$my_sourcefiles typemap" >>$my_makefileconf
-
-# transform mod_perl config into Makefile parameters
-echo "$my_prefix Setting up mod_perl build environment (Makefile)"
-$my_config_sh --config-file=$my_config \
- --config-override="$my_config_override" \
- --build-type=$my_buildtype \
- --display-prefix="$my_prefix" >>$my_makefileconf
-
-# finish generation of Makefile
-cat $my_makefiletmpl >>$my_makefileconf
-
-# friendly footer
-echo "Now please type 'make' to build libperl.so" 2>&1
-
diff --git a/tags/v1_29/apaci/find_source.PL b/tags/v1_29/apaci/find_source.PL
deleted file mode 100644
index 44cf427..0000000
--- a/tags/v1_29/apaci/find_source.PL
+++ /dev/null
@@ -1,11 +0,0 @@
-chdir ".." unless -e 'MANIFEST';
-local(*MANI);
-open MANI, "MANIFEST" or die "open MANIFEST $!";
-
-while(<MANI>) {
- next unless s,^src/modules/perl/,,; chomp;
- next unless m,.+\.(xs|c|h)$,;
- print "$_ ";
-}
-close MANI;
-
diff --git a/tags/v1_29/apaci/libperl.module b/tags/v1_29/apaci/libperl.module
deleted file mode 100755
index 1e65d29..0000000
--- a/tags/v1_29/apaci/libperl.module
+++ /dev/null
@@ -1,76 +0,0 @@
-##
-## libperl.module -- mod_perl Apache source tree stub
-## Written by Ralf S. Engelschall <rse@apache.org>
-##
-## This script is _sourced_ by Apache's src/Configure script
-## while configuring the module subdirectories. We can use
-## two variables here to find ourself: $modfile, $modbase.
-## Additionally because we run inside src/Configure's namespace
-## we can directly adjust CFLAGS, LIBS, etc.
-##
-
-Name: perl_module
-ConfigStart
-
- # paths
- my_dir="`echo ${modfile} | sed -e 's:/[^/]*$::'`"
- my_config="${my_dir}/mod_perl.config"
- my_config_sh="${my_dir}/mod_perl.config.sh"
- my_outfile="Makefile.config"
- my_prefix=" +"
-
- # determine requested build-type
- case $modfile in
- *.so )
- my_buildtype="DSO"
- ;;
- *.a )
- my_buildtype="OBJ"
- ;;
- esac
- echo "$my_prefix mod_perl build type: $my_buildtype"
-
- # import MODPERL_CONFIG environment variable
- my_config_override=''
- if [ ".$MODPERL_CONFIG" != . ]; then
- my_config_override="$MODPERL_CONFIG"
- fi
-
- # transform mod_perl config into Makefile config
- echo "$my_prefix setting up mod_perl build environment"
- $my_config_sh --config-file=$my_config \
- --config-override="$my_config_override" \
- --build-type=$my_buildtype \
- --display-prefix="$my_prefix" >>$my_outfile
-
- # additionally adjust the Apache build environment
- echo "$my_prefix adjusting Apache build environment"
- CFLAGS="$CFLAGS -DMOD_PERL"
- if [ ".$my_buildtype" = .OBJ ]; then
- my_perl_libs="`egrep '^PERL_LIBS=' $my_outfile | tail -1 | cut -d= -f2-`"
- LIBS="$LIBS $my_perl_libs"
- fi
-
- # Perl support for SSI (mod_include)
- if [ ".`egrep '^PERL_SSI[ ]*=[ ]*yes' $my_outfile`" != . ]; then
- if [ ".$my_buildtype" = .DSO ]; then
- echo ""
- echo "** Error: Cannot build mod_include with Perl support (USE_PERL_SSI) **"
- echo "** when mod_perl is compiled as DSO because of cross-module calls. **"
- echo "** Ignoring PERL_SSI flag now. **"
- echo ""
- else
- echo "$my_prefix enabling Perl support for SSI (mod_include)"
- my_perl_ccflags="`egrep '^PERL_CCFLAGS=' $my_outfile | tail -1 | cut -d= -f2-`"
- CFLAGS="$CFLAGS -DUSE_PERL_SSI $my_perl_ccflags"
- my_perl_inc="`egrep '^PERL_INC=' $my_outfile | tail -1 | cut -d= -f2-`"
- INCLUDES="$INCLUDES -I\$(SRCDIR) -I$my_perl_inc"
- if [ ".`egrep '^PERL_THREADS[ ]*=[ ]*yes' $my_config`" != . ]; then
- echo "$my_prefix enabling Perl Thread support"
- CFLAGS="$CFLAGS -DPERL_THREADS"
- fi
- fi
- fi
-
-ConfigEnd
-
diff --git a/tags/v1_29/apaci/load_modules.pl.PL b/tags/v1_29/apaci/load_modules.pl.PL
deleted file mode 100644
index 30cf14f..0000000
--- a/tags/v1_29/apaci/load_modules.pl.PL
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /usr/local/bin/perl
-use File::Find;
-use strict;
-my $APACHE_SRC = shift;
-
-my $LoadModule_conf = "t/conf/LoadModule.conf";
-my $tmp = "t/conf/httpd.conf.new";
-my $orig = "t/conf/httpd.conf";
-
-local *ORIG;
-open ORIG, $orig or die "can't open $orig $!";
-while(<ORIG>) {
- if(/^LoadModule/) {
- exit 0; #already cat-ed
- }
-}
-unless (-d "t") {
- chdir "..";
-}
-#phooey, this mess should have been cleaned up before 1.3.0
-my $name_map = {
- log_config => "config_log",
- include => "includes",
- actions => "action",
- auth_anon => "anon_auth",
- auth_dbm => "dbm_auth",
- log_agent => "agent_log",
- log_referer => "referer_log"
-};
-
-my @sh_mods = ();
-finddepth(sub {
- return unless /(mod_|lib)(.*)\.s[ol]$/;
- my $name = $name_map->{$2} || $2;
- my $full = "$File::Find::dir/$_";
- if($full !~ m,^/,) {
- if($full =~ m,^\.\./,) {
- $full = "../$full";
- }
- }
- return if $name =~ /(auth|autoindex|digest)/; #a few that screw make test
- push @sh_mods, "LoadModule ${name}_module $full";
-}, $APACHE_SRC) if $APACHE_SRC and -d $APACHE_SRC;
-
-my($perl_mod) = grep /perl/, @sh_mods;
-unshift @sh_mods, $perl_mod; #must come before mod_include/USE_PERL_SSI
-
-my %seen;
-
-local *FH;
-open FH, ">$LoadModule_conf" or
- die "can't open $LoadModule_conf $!";
-print FH join "\n", (grep { !$seen{$_}++ } @sh_mods), "";
-close FH;
-
-system "cat $LoadModule_conf $orig > $tmp && mv $tmp $orig";
-
diff --git a/tags/v1_29/apaci/mod_perl.config.sh b/tags/v1_29/apaci/mod_perl.config.sh
deleted file mode 100755
index cd13d17..0000000
--- a/tags/v1_29/apaci/mod_perl.config.sh
+++ /dev/null
@@ -1,246 +0,0 @@
-#!/bin/sh
-##
-## mod_perl.config.sh -- mod_perl configuration transformation script
-## Written by Ralf S. Engelschall <rse@apache.org>
-##
-
-DIFS='
-'
-
-# defaults
-config_file='mod_perl.config'
-build_type='OBJ'
-display_prefix=''
-tmpfile1=".tmp.$$.1"
-tmpfile2=".tmp.$$.2"
-
-#
-# parse argument line
-#
-prev=''
-OIFS="$IFS" IFS="$DIFS"
-for option
-do
- if [ ".$prev" != . ]; then
- eval "$prev=\$option"
- prev=""
- continue
- fi
- case "$option" in
- -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg='' ;;
- esac
- case "$option" in
- --config-file=*) config_file="$optarg" ;;
- --config-override=*) config_override="$optarg" ;;
- --build-type=*) build_type="$optarg" ;;
- --display-prefix=*) display_prefix="$optarg" ;;
- * ) echo "$0:Error: invalid option '$option'" 1>&2; exit 1 ;;
- esac
-done
-IFS="$OIFS"
-if [ ".$prev" != . ]; then
- echo "$0:Error: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2
- exit 1
-fi
-
-
-#
-# import parameters from config file into
-# own namespace to avoid conflicts with src/Configure
-#
-(cat $config_file; echo "$config_override" | sed -e 's:,[ ]*:,:' | tr "," "\n") >$tmpfile1
-vars="`egrep '^[A-Z0-9_]*[ ]*=' $tmpfile1 | sed -e 's:^\([A-Z0-9_]*\).*:\1:'`"
-OIFS="$IFS" IFS="$DIFS"
-for var in $vars; do
- egrep "^${var}[ ]*=" $tmpfile1 | tail -1 >$tmpfile2
- val="`sed -e 's:^[A-Z0-9_]*[ ]*=[ ]*::' <$tmpfile2`"
- eval "param_${var}=\"${val}\""
-done
-IFS="$OIFS"
-
-#
-# verbose message
-#
-echo "$display_prefix id: mod_perl/$param_MOD_PERL_VERSION" 1>&2
-
-#
-# determine Perl interpreter and version
-#
-libperl="$param_LIBPERL"
-if [ ".$libperl" = .DEFAULT ]; then
- perl_libperl=""
-else
- perl_libperl=" -- $libperl"
-fi
-perl_interp="$param_PERL"
-if [ ".$perl_interp" = .DEFAULT ]; then
- if [ ".$PERL" != . ]; then
- perl_interp="$PERL"
- else
- perl_interp=""
- fi
-fi
-if [ ".$perl_interp" = . ]; then
- OIFS=$IFS IFS=':'
- for my_dir in $PATH; do
- for my_exe in perl5 perl; do
- if test -f "$my_dir/$my_exe"; then
- if test -x "$my_dir/$my_exe"; then
- perl_interp="$my_dir/$my_exe"
- break 2
- fi
- fi
- done
- done
- IFS="$OIFS"
- perl_interp="`echo $perl_interp | sed -e 's://:/:'`"
-fi
-perl_version="`$perl_interp -e '$^V ? printf("v%vd", $^V) : print($]);'`"
-os_version="`$perl_interp -e 'print $^O;'`"
-
-#
-# verbose message
-#
-echo "$display_prefix id: Perl/$perl_version ($os_version) [$perl_interp]" 1>&2
-
-#
-# determine build tools and flags
-#
-
-if test -f './modules/perl/perl_config'; then
- perl_config='./modules/perl/perl_config'
-else
- perl_config='./perl_config'
-fi
-
-perl_cc="`$perl_config 'cc'`"
-perl_ccflags="`$perl_config 'ccflags'`"
-perl_optimize="`$perl_config 'optimize'`"
-perl_cccdlflags="`$perl_config 'cccdlflags'`"
-perl_ld="`$perl_config 'ld'`"
-perl_ldflags="`$perl_config 'ldflags'`"
-perl_lddlflags="`$perl_config 'lddlflags'`"
-
-case "$os_version" in
- aix*)
- case "$perl_cc" in
- *gcc*)
- XLINKER="-Xlinker "
- ;;
- esac
- perl_lddlflags="$perl_lddlflags $XLINKER-bI:\$(APACHELIBEXEC)/httpd.exp"
- ;;
- * ) ;;
-esac
-
-cat >$tmpfile2 <<'EOT'
-use Config;
-#my $embed_pm = '-MApache::ExtUtils=ldopts';
-my $embed_pm = '-MExtUtils::Embed';
-my $ldopts = `$^X $embed_pm -e ldopts -- -std @ARGV`;
-# can't pass ccdlflags to ld, which is what happens in this context. however
-# we still need the libraries themselves. I think this should be correct for
-# other systems, but it bites us on BSD/OS 4.x
-$ldopts =~ s@$Config{ccdlflags}@@ if ($^O eq 'bsdos');
-$ldopts =~ s,(-bE:)(perl\.exp),$1$Config{archlibexp}/CORE/$2, if($^O eq "aix");
-
-#replace -Wl args meant for cc with args for ld
-if ($ARGV[0] eq "DSO" and $^O eq "hpux" and $Config{ld} =~ /ld$/) {
- while ($ldopts =~ s/-Wl,(\S+)/$1/) {
- my $cp = $1;
- (my $repl = $cp) =~ s/,/ /g;
- $ldopts =~ s/\Q$cp/$repl/;
- }
-}
-
-print $ldopts;
-EOT
-perl_libs="`$perl_interp $tmpfile2 $build_type`"
-if test $build_type = OBJ
-then
- case "$os_version" in
- aix*) perl_libs="$perl_libs $XLINKER-bE:\$(SRCDIR)/modules/perl/mod_perl.exp" ;;
- * ) ;;
- esac
-fi
-perl_inc="`$perl_interp -MConfig -e 'print "$Config{archlibexp}/CORE"'`"
-perl_privlibexp="`$perl_interp -MConfig -e 'print $Config{privlibexp}'`"
-perl_archlibexp="`$perl_interp -MConfig -e 'print $Config{archlibexp}'`"
-perl_xsinit="$perl_interp -MExtUtils::Embed -e xsinit"
-perl_xsubpp="$perl_interp ${perl_privlibexp}/ExtUtils/xsubpp -nolinenumbers -typemap ${perl_privlibexp}/ExtUtils/typemap"
-perl_ar="`$perl_interp -MConfig -e 'print $Config{ar}'`"
-perl_ranlib=`$perl_interp -MConfig -e 'print $Config{ranlib}'`
-
-#
-# determine static objects
-#
-perl_static_exts="$param_PERL_STATIC_EXTS"
-perl_static_ar="$param_PERL_STATIC_AR"
-perl_static_srcs="$param_PERL_STATIC_SRCS"
-perl_static_objs="`echo $param_PERL_STATIC_SRCS | sed -e 's:\.c:.o:g'`"
-perl_static_objs_pic="`echo $param_PERL_STATIC_SRCS | sed -e 's:\.c:.lo:g'`"
-
-#
-# determine defines
-#
-perl_defs=''
-perl_defs="$perl_defs -DMOD_PERL_VERSION=\\\"$param_MOD_PERL_VERSION\\\""
-perl_defs="$perl_defs -DMOD_PERL_STRING_VERSION=\\\"mod_perl/$param_MOD_PERL_VERSION\\\""
-
-if [ ".$param_MOD_PERL_PREFIX" != . ]; then
- perl_defs="$perl_defs -DMOD_PERL_PREFIX=\\\"$param_MOD_PERL_PREFIX\\\""
-fi
-
-perl_defs="$perl_defs"
-OIFS="$IFS" IFS="$DIFS"
-for hook in \
- DISPATCH CHILD_INIT CHILD_EXIT POST_READ_REQUEST TRANS HEADER_PARSER \
- ACCESS AUTHEN AUTHZ TYPE FIXUP HANDLER LOG INIT CLEANUP STACKED_HANDLERS \
- METHOD_HANDLERS DIRECTIVE_HANDLERS SECTIONS RESTART SSI TRACE THREADS; do
- eval "val=\$param_PERL_${hook}"
- case $hook in
- TRACE|THREADS )
- if [ ".$val" = .yes ]; then
- perl_defs="$perl_defs -DPERL_${hook}=1"
- fi
- ;;
- * )
- if [ ".$val" = .no ]; then
- perl_defs="$perl_defs -DNO_PERL_${hook}=1"
- fi
- ;;
- esac
-done
-IFS="$OIFS"
-
-#
-# output information as Makefile parameters
-#
-echo "PERL=$perl_interp"
-echo "PERL_CC=$perl_cc"
-echo "PERL_OPTIMIZE=$perl_optimize"
-echo "PERL_CCFLAGS=$perl_ccflags"
-echo "PERL_CCCDLFLAGS=$perl_cccdlflags"
-echo "PERL_DEFS=$perl_defs"
-echo "PERL_INC=$perl_inc"
-echo "PERL_LD=$perl_ld"
-echo "PERL_LDFLAGS=$perl_ldflags"
-echo "PERL_LDDLFLAGS=$perl_lddlflags"
-echo "PERL_LIBS=$perl_libs $perl_static_ar"
-echo "PERL_XSINIT=$perl_xsinit"
-echo "PERL_XSUBPP=$perl_xsubpp"
-echo "PERL_AR=$perl_ar"
-echo "PERL_RANLIB=$perl_ranlib"
-echo "PERL_STATIC_EXTS=$perl_static_exts"
-echo "PERL_STATIC_AR=$perl_static_ar"
-echo "PERL_STATIC_SRCS=$perl_static_srcs"
-echo "PERL_STATIC_OBJS=$perl_static_objs"
-echo "PERL_STATIC_OBJS_PIC=$perl_static_objs_pic"
-echo "PERL_SSI=$param_PERL_SSI"
-
-#
-# cleanup
-#
-rm -f $tmpfile1 $tmpfile2
-
diff --git a/tags/v1_29/apaci/mod_perl.exp b/tags/v1_29/apaci/mod_perl.exp
deleted file mode 100644
index 80c6863..0000000
--- a/tags/v1_29/apaci/mod_perl.exp
+++ /dev/null
@@ -1,17 +0,0 @@
-#!
-perl_module
-mod_perl_sent_header
-sv2request_rec
-perl_request_rec
-mod_perl_tie_table
-perl_cmd_perl_FLAG
-perl_cmd_perl_TAKE2
-perl_cmd_perl_TAKE1
-perl_cmd_perl_TAKE123
-perl_perl_cmd_cleanup
-hvrv2table
-perl_call_handler
-perl_clear_symtab
-perl_get_startup_pool
-perl_perl_merge_dir_config
-array_header2avrv
diff --git a/tags/v1_29/apaci/perl_config.PL b/tags/v1_29/apaci/perl_config.PL
deleted file mode 100644
index 5a18d60..0000000
--- a/tags/v1_29/apaci/perl_config.PL
+++ /dev/null
@@ -1,9 +0,0 @@
-#we generate this script simply to set @INC
-#so Apache::ExtUtils can be found
-
-use Apache::ExtUtils qw(%Config);
-use strict;
-
-my $key = shift;
-
-print $Config{$key};
diff --git a/tags/v1_29/benchmark/lwp-simple.pod b/tags/v1_29/benchmark/lwp-simple.pod
deleted file mode 100644
index 335f09a..0000000
--- a/tags/v1_29/benchmark/lwp-simple.pod
+++ /dev/null
@@ -1,46 +0,0 @@
-=head1 NAME
-
-lwp-simple - using LWP::Simple and Benchmark.pm to benchmark mod_perl
-
-=head1 DESCRIPTION
-
-Here's what I generally use to benchmark, a Benchmark.pm/LWP::Simple
-combo. With the script below, you should be able to
-'make start_httpd' in the mod_perl-x.xx/ build directory
-you might need to change the #! line in t/net/perl/cgi.pl
-the configuration is already set up for /perl/ and /cgi-bin/
-
-cgi.pl is very small, just load CGI.pm and prints a little bit, here's
-the difference I see (on hpux-10.10):
-
-Benchmark: timing 50 iterations of cgi, perl...
- cgi: 18 secs ( 0.96 usr 0.10 sys = 1.06 cpu)
- perl: 3 secs ( 0.76 usr 0.07 sys = 0.83 cpu)
-
-=head1 THE SCRIPT
-
-=cut
-
- #!/opt/perl/bin/perl
-
- use Benchmark;
- use LWP::Simple;
-
- $base = "http://localhost:8529";
- $script = "cgi.pl?PARAM=2";
-
- for (qw(cgi-bin perl)) {
- $$_ = join "/", $base, $_, $script;
- }
-
- timethese(50, {
- "cgi" => "(\$s = get('${'cgi-bin'}')) or die \$s",
- "perl" => "(\$s = get('$perl')) or die \$s",
- });
-
-=pod
-
-=head1 AUTHOR
-
-Doug MacEachern
-
diff --git a/tags/v1_29/benchmark/stopwatch.pod b/tags/v1_29/benchmark/stopwatch.pod
deleted file mode 100644
index f83c3bc..0000000
--- a/tags/v1_29/benchmark/stopwatch.pod
+++ /dev/null
@@ -1,66 +0,0 @@
-=head1 NAME
-
-stopwatch - benchmark mod_perl vs. CGI with File::CounterFile
-
-=head1 DESCRIPTION
-
-I have a stopwatch here. It consists of a CGI program that must be
-installed so that it can be accessed both as Apache::Registry routine
-and as CGI program. The program assumes that the environment variable
-SCRIPT_FILENAME is set and writes different counterfiles for the two
-access methods. On the client side I use LWP. Here's the CGI program:
-
- #!/usr/bin/perl
-
- use CGI::Switch;
- use File::CounterFile; # part of LWP
- my $q = new CGI::Switch;
- $q->print(
- $q->header,
- $q->start_html(),
- $q->start_form(),
- $q->textfield(-name => "textfield"),
- $q->submit(),
- $q->end_form,
- "<p>textfield = ", $q->param("textfield"),
- );
-
- my $cfile =
- $ENV{SCRIPT_FILENAME} =~ m{/perl/} ? "C-apache" : "C-cgi";
-
- my $c = File::CounterFile->new($cfile,"00000000");
- my $id = $c->inc;
-
- $q->print(
- "<H4>", scalar(localtime()),"</H4>\n",
- sprintf("Accessed %d times (%d)\n",$id,$$),
- $q->end_html,
- );
-
-
-And here is how I access it:
-
- perl -MLWP::UserAgent -MURI::URL -e '
- $ua = new LWP::UserAgent;
- $curl = url("http:");
- $curl->query_form(textfield => 12345);
- $req = new HTTP::Request "POST", "http://localhost/perl/forbench";
- # ^^^^^^^^^^^^^
- # change that
- $req->content_type("application/x-www-form-urlencoded");
- $req->content($curl->equery);
- printf "%s\n", $1
- while $ua->request($req)->as_string =~ /(Ac.*)/m;
- '
-
-I have this program run in one window for /perl/forbench and in
-another window for /cgi-bin/forbench. While I'm typing this, the two
-counters have reached the numbers 5215 and 141. A speed advantage of
-37:1 on my Linux box. When I try this on my Indy I get a relation of
-20:1. The advantage seems to be system dependent.
-
-=head1 AUTHOR
-
-Andreas J. Koenig <k@anna.in-berlin.de>
-
-
diff --git a/tags/v1_29/cgi_to_mod_perl.pod b/tags/v1_29/cgi_to_mod_perl.pod
deleted file mode 100644
index 31bc4b1..0000000
--- a/tags/v1_29/cgi_to_mod_perl.pod
+++ /dev/null
@@ -1,120 +0,0 @@
-=head1 NAME
-
-cgi_to_mod_perl - First steps needed to use mod_perl as a CGI replacement
-
-=head1 DESCRIPTION
-
-As the README and other mod_perl documents explain, mod_perl as
-a CGI replacement is only a small piece of what the package offers.
-However, it is the most popular use of mod_perl, this document is here
-so you can cut to the chase.
-
-=head1 INSTALLATION
-
-Read the INSTALL document, in most cases, nothing more is required
-than:
-
- perl Makefile.PL && make && make install
-
-=head1 CONFIGURATION
-
-For using mod_perl as a CGI replacement, the recommended configuration
-is as follows:
-
- Alias /perl/ /real/path/to/perl-scripts/
-
- <Location /perl>
- SetHandler perl-script
- PerlHandler Apache::Registry
- Options +ExecCGI
- </Location>
-
-`Location' refers to the uri, not a directory, think of the above as
-
- <Location http://www.yourname.com/perl>
-
-Any files under that location (which live on your filesystem under
-/real/path/to/perl-scripts/), will be handled by the Apache::Registry
-module, which emulates the CGI environment. The file must exist and
-be executable, in addition, 'Options ExecCGI' must be turned on.
-
-If you wish to have mod_perl execute scripts in any location based on
-file extension, use a configuration like so:
-
- <Files ~ "\.pl$">
- SetHandler perl-script
- PerlHandler Apache::Registry
- Options ExecCGI
- </Files>
-
-Note that `ScriptAlias' does _not_ work for mod_perl.
-
-=head1 PORTING CGI SCRIPTS
-
-=over 4
-
-=item I/O
-
-If you are using Perl 5.004 most CGI scripts can run under mod_perl
-untouched. If you're using 5.003, Perl's built-in C<read()> and
-C<print()> functions do not work as they do under CGI. If you're
-using CGI.pm, use C<$query-E<gt>print> instead of plain 'ol C<print()>.
-
-=item HEADERS
-
-By default, mod_perl does not send any headers by itself, however, you
-may wish to change this:
-
- PerlSendHeader On
-
-Now the response line and common headers will be sent as they are by
-mod_cgi. And, just as with mod_cgi, PerlSendHeader will not send a
-terminating newline, your script must send that itself, e.g.:
-
- print "Content-type: text/html\n\n";
-
-If you're using CGI.pm and 'print $q-E<gt>header' you do
-_not_ need C<PerlSendHeader On>.
-
-=item NPH SCRIPTS
-
-To run a CGI `nph' script under mod_perl, simply add to your code:
-
- local $| = 1;
-
-If you normally set B<PerlSendHeader On>, add this to your httpd.conf:
-
- <Files */nph-*>
- PerlSendHeader Off
- </Files>
-
-=item PROGRAMMING PRACTICE
-
-CGI lets you get away with sloppy programming, mod_perl does not.
-Why? CGI scripts have the lifetime of a single HTTP request as a
-separate process. When the request is over, the process goes away and
-everything is cleaned up for you, e.g. globals variables, open files,
-etc. Scripts running under mod_perl have a longer lifetime, over
-several request, different scripts may be in the same process. This
-means you must clean up after yourself. You've heard:
-
- always 'use strict' and C<-w>!!!
-
-It's more important under mod_perl Perl than anywhere else, while it's
-not required, it B<strongly> recommended, it will save you more time
-in the long run. And, of course, clean scripts will still run under
-CGI!
-
-=item TRAPS
-
-See L<mod_perl_traps>.
-
-=back
-
-=head1 REPORTING PROBLEMS
-
-Read the L<SUPPORT> file.
-
-=head1 SEE ALSO
-
-Apache::PerlRun(3)
diff --git a/tags/v1_29/eg/README b/tags/v1_29/eg/README
deleted file mode 100644
index 23988af..0000000
--- a/tags/v1_29/eg/README
+++ /dev/null
@@ -1,21 +0,0 @@
-
-To get started please check out:
-
-The mod_perl guide,
- http://perl.apache.org/
-
-Writing Apache Modules with Perl and C
- http://www.modperl.com/
-
-the mod_perl developer's cookbook:
- http://www.modperlcookbook.org/
-
-The Apache:: modules on CPAN:
- http://search.cpan.org/search?mode=module&query=Apache
-
-... and of course the mod_perl mailinglist:
- mail modperl-subscribe@perl.apache.org < /dev/null
-
-
-
-
diff --git a/tags/v1_29/eg/makepl_args.mod_perl b/tags/v1_29/eg/makepl_args.mod_perl
deleted file mode 100644
index 7c0a972..0000000
--- a/tags/v1_29/eg/makepl_args.mod_perl
+++ /dev/null
@@ -1,67 +0,0 @@
-#example makepl_args.mod_perl files
-#copy this file to $ENV{HOME}/.makepl_args.mod_perl and edit to taste
-
-#mod_perl's Makefile.PL will also look for this file in ./ ../ relative
-#to the mod_perl-x.xx source tree
-
-#EVERYTHING=1 will enable:
-#ALL_HOOKS=1 PERL_SSI=1 PERL_SECTIONS=1 PERL_STACKED_HANDLERS=1
-#PERL_METHOD_HANDLERS=1 PERL_TABLE_API=1 PERL_DIRECTIVE_HANDLERS=1
-#PERL_LOG_API=1 PERL_URI_API=1 PERL_UTIL_API=1 PERL_FILE_API=1
-
-EVERYTHING=1
-
-#build against the first apache_x.xx source tree found, without prompts
-# DO_HTTPD=1
-
-#tell Makefile.PL exactly where the Apache source tree is
-# APACHE_SRC=/tmp/apache_x.xx/src
-
-#this would configure in mod_proxy, mod_unique_id, mod_info and mod_status
-# ADD_MODULE=proxy,usertrack,unique_id,info,status
-
-#if you wish to use a Configuration file other than what's in the
-#apache_x.xx/src directory
-# CONFIG=Configuration.custom
-
-#depending on your os and site_perl modules, see mod_perl's INSTALL
-# PERL_STATIC_EXTS=...
-
-#apache header files are installed by default, stop that if you wish
-# APACHE_HEADER_INSTALL=0
-
-#Apache and Apache::Constants modules will be built as shared libraries
-# DYNAMIC=1
-
-#turn on mod_perl tracing
-# PERL_TRACE=1
-
-#for perl.c's perl_destruct() which in run by mod_perl during child_exit
-#comment from perl.c: /* 0=none, 1=full, 2=full with checks */
-#default level is 0
-# PERL_DESTRUCT_LEVEL=2
-
-
-#-add `-g' to EXTRA_CFLAGS
-#-turn on PERL_TRACE
-#-set PERL_DESTRUCT_LEVEL=2
-#-link against libperld if -e $Config{archlibexp}/CORE/libperld$Config{lib_ext}
-# PERL_DEBUG=1
-
-#########################################################################
-#experimental features, use at own risk
-#but please report success or failure if you try
-
-#try to stop "Use of uninitialized value." with no line/filename info
-# PERL_MARK_WHERE=1
-
-#have mod_perl handle internal redirects (doesn't seem to work w/ sfio)
-#can also enable via $Apache::DoInternalRedirect = 1;
-# DO_INTERNAL_REDIRECT=1
-
-#enable the PerlRestartHandler which will be called during restart
-#this happens just before PerlFreshRestart does it's thang
-#PERL_RESTART_HANDLER=1
-
-__END__
-
diff --git a/tags/v1_29/faq/Makefile b/tags/v1_29/faq/Makefile
deleted file mode 100644
index 014fb62..0000000
--- a/tags/v1_29/faq/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-HTMLROOT = .
-POD2HTML = pod2html --htmlroot=$(HTMLROOT) --podpath=. \
- --libpods=mod_perl_cgi:mod_perl_api
-
-POD = mod_perl_faq.pod mod_perl_cgi.pod mod_perl_api.pod
-HTML = mod_perl_faq.html mod_perl_cgi.html mod_perl_api.html
-
-.SUFFIXES: .pod .html
-
-.pod.html:
- rm -f $*.html
- $(POD2HTML) --infile=$*.pod --outfile=$*.tmp
- sed 's/ manpage<\/A>/ FAQ<\/A>/' $*.tmp >$*.html
- rm $*.tmp
-
-html: $(HTML)
-
-tar: $(POD)
- tar cf - $(POD) mjtg-news.txt Makefile | gzip -9 >mod_perl_faq.tar.gz
-
-clean:
- rm -f $(HTML) pod2html-*cache
diff --git a/tags/v1_29/faq/mjtg-news.txt b/tags/v1_29/faq/mjtg-news.txt
deleted file mode 100644
index 53b6cf5..0000000
--- a/tags/v1_29/faq/mjtg-news.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
-Newsgroups: comp.lang.perl.misc
-Subject: Re: Lexical scope and embedded subroutines.
-Date: 6 Jan 1998 18:22:39 GMT
-Organization: University of Cambridge, England
-Lines: 95
-Message-ID: <68tspf$9f0$1@lyra.csx.cam.ac.uk>
-References: <34B11E43.167E@gcg.com> <Pine.GSO.3.96.980105145051.3896K-100000@user1.teleport.com> <68sc4k$3p2$1@brokaw.wa.com>
-NNTP-Posting-Host: taurus.cus.cam.ac.uk
-
-In article <68sc4k$3p2$1@brokaw.wa.com>, Aaron Harsh <ajh@rtk.com> wrote:
->
->Before I read this thread (and perlsub to get the details) I would have
->assumed the original code was fine.
->
->This behavior brings up the following questions:
-> o Is Perl's behavior some sort of speed optimization?
-
-No, but see below.
-
-> o Did the Perl gods just decide that scheme-like behavior was less
->important than the pseduo-static variables described in perlsub?
-
-This subject has been kicked about at some length on perl5-porters.
-The current behaviour was chosen as the best of a bad job.
-In the context of Perl, it's not obvious what "scheme-like behavior"
-means. So it isn't an option. See below for details.
-
-> o Does anyone else find Perl's behavior counter-intuitive?
-
-*Everyone* finds it counterintuitive. The fact that it only generates
-a warning rather than a hard error is part of the Perl Gods policy
-of hurling thunderbolts at those so irreverent as not to use -w.
-
-> o Did programming in scheme destroy my ability to judge a decent language
->feature?
-
-You're still interested in Perl, so it can't have rotted your brain
-completely.
-
-> o Have I misremembered how scheme handles these situations?
-
-Probably not.
-
-> o Do Perl programmers really care how much Perl acts like scheme?
-
-Some do.
-
-> o Should I have stopped this message two or three questions ago?
-
-Yes.
-
-
-
-The problem to be solved can be stated as
-
-"When a subroutine refers to a variable which is instantiated more than
- once (i.e. the variable is declared in a for loop, or in a subroutine),
- which instance of that variable should be used?"
-
-The basic problem is that Perl isn't Scheme (or Pascal or any of the
-other comparators that have been used).
-
-In almost all lexically scoped languages (i.e. those in the Algol60
-tradition), named subroutines are also lexically scoped. So the scope
-of the subroutine is necessarily contained in the scope of any external
-variable referred to inside the subroutine. So there's an obvious
-answer to the "which instance?" problem.
-
-But in Perl, named subroutines are globally scoped. (But in some
-future Perl, you'll be able to write
-
- my sub lex { ... }
-
-to get lexical scoping.) So the solution adopted by other languages
-can't be used.
-
-The next suggestion most people come up with is "Why not use the most
-recently instantiated variable?". This Does The Right Thing in many
-cases, but fails when recursion or other complications are involved.
-
-Consider
-
-sub outer {
-
- inner();
- outer();
- my $trouble;
- inner();
- sub inner { $trouble };
- outer();
- inner();
-}
-
-Which instance of $trouble is to be used for each call of inner()?
-And why?
-
-The consensus was that an incomplete solution was unacceptable, so
-the simple rule "Use the first instance" was adopted instead.
-
-And it is more efficient than possible alternative rules. But that's not
-why it was done.
-
-
-Mike Guy
-
diff --git a/tags/v1_29/faq/mod_perl_api.pod b/tags/v1_29/faq/mod_perl_api.pod
deleted file mode 100644
index a62fc6b..0000000
--- a/tags/v1_29/faq/mod_perl_api.pod
+++ /dev/null
@@ -1,171 +0,0 @@
-=head1 NAME
-
-Mod_perl_api - accessing the Apache API via mod_perl ($Date$)
-
-=head1 DESCRIPTION
-
-This part of the mod_perl FAQ deals with the Apache Application
-Programmer's Interface and how to access it from perl via mod_perl.
-
-=head1 Why can't the server find the handler I wrote?
-
-=head2 Did you enable the required hook?
-
-As described in the mod_perl/INSTALL document, the only callback hook
-enabled by default is PerlHandler. If you want to intervene at a
-different stage of request processing you must enable the relevant
-hook. So to add a special authentication handler, for instance, you
-would start the installation process with:
-
- perl Makefile.PL PERL_AUTHEN=1
-
-=head2 Is the handler correctly referenced in the configuration?
-
-Apache must be told to load your handler, either as a module with the
-C<PerlModule> directive or as a script with C<PerlRequire>. The
-handler subroutine will then be available, but you must also specify
-which requests it should process. This is done by naming it in one of
-the Perl*Handler directives (PerlInitHandler, PerlTransHandler, etc.).
-If this directive is put in access.conf outside of any restrictive
-context, your handler will be called during the given phase of each
-request processed by the server. You can make it more selective by
-restricting it to a directory (-hierarchy) in a <Directory ...>
-section of access.conf or by putting it in a .htaccess file.
-
-Here is an example of the directives needed to call a handler during
-Apache's URI to filename translation phase:
-
- PerlRequire /full/path/to/script/Trans.pl
- PerlTransHandler Trans::handler
-
-Trans.pl would start with the statement C<Package Trans;> and define a
-subroutine called C<handler>.
-
-=head1 Where can I find examples to get me started?
-
-Check out the Apache-Perl-contrib tarfile at
-http://perl.apache.org/src/
-
-Here is an example from Vivek Khera. It allows you to filter files
-through a perl script based on their location. Rather than having to
-invoke a CGI script, the user just references the file with a normal
-URL and it is automagically processed by this code...
-
- #! /usr/local/bin/perl
- use strict;
-
- # filter a file before returning it to the web client
- # tell Apache to use the PerlHandler FileFilter on file which need
- # filtering in the htaccess file:
- #
- # <Files *.baz>
- # SetHandler perl-script
- # PerlHandler FileFilter
- # </Files>
-
- package FileFilter;
-
- use Apache::Constants ':common';
-
- # find out the file name, then write it out with our header attached
- sub handler {
- my $r = shift;
-
- my $fileName = $r->filename;
-
- open(F,$fileName) or return NOT_FOUND; # file not found
-
- $r->content_type('text/html');
- $r->no_cache(1); # don't be caching my dynamic documents!
-
- $r->send_http_header;
-
- $r->print("<HEAD><TITLE>This is my personal header!</TITLE></HEAD><BODY>");
-
- # Now copy the file to the client. If you do not need to make any
- # changes you can copy it verbatim with the single statement
- # $r->send_fd(\*F);
- # Otherwise, loop over each line...
- while(<F>) {
- # mangle the contents here if you want
- $r->print ($_);
- }
- close(F);
-
- $r->print("<HR>Document created: ", scalar localtime time);
- $r->print("</BODY>");
-
- OK;
- }
-
- 1;
-
-=head1 How can I check if mod_perl is available during configuration?
-
-Ralf Engelschall writes:
-
-When you compiled one httpd with and the other without mod_perl, then
-you can simply use <IfModule mod_perl.c>...</IfModule> to surround the
-stuff for the httpd compiled with mod_perl. The other then ignores
-these lines. Example:
-
- <IfModule mod_perl.c>
- ...stuff for httpd w/ mod_perl...
- </IfModule>
- <IfModule !mod_perl.c>
- ...stuff for httpd w/o mod_perl...
- </IfModule>
-
-=head1 How can I terminate a chain of handlers?
-
-During each phase of request processing, apache calls handlers which
-have registered an interest in looking at and possibly handling the
-request. In some phases it makes sense to let all of the handlers
-have a chance to look at the request. In other phases the first
-handler to return "OK" terminates that phase (see the Apache
-documentation, /manual/misc/API.html).
-
-If you define more than one PerlHandler for a phase, they are placed
-on a stack and all of the handlers on the stack are called
-sequentially by mod_perl, as long as they return "DECLINED" or "OK".
-Apache sees the return code from the final handler and reacts to it.
-If a handler wants to terminate the chain and ensure that no other
-handler is called after it, it should set the corresponding stack to
-undef. For instance, when a TransHandler has set $r->filename, it
-should terminate with
-
- $r->set_handlers(PerlTransHandler => undef);
- return OK;
-
-=head1 Why can't my handler see an environment variable that I set in httpd.conf?
-
-The configuration directives SetEnv and PassEnv are handled by
-apache's mod_env during the fixup stage, so mod_perl handlers that run
-prior to the fixup-stage don't see variables set with them. You can
-use PerlSetEnv/PerlPassEnv instead - they are processed as soon as
-possible during a request.
-
-=head1 Why does the server hang when I try to read a FORM?
-
-The C<$r-E<gt>content> method reads C<application/x-www-form-urlencoded>
-data directly from the client and it does not keep a copy, so if you
-(or another handler) call it again, the server will hang. One way of
-avoiding this, if you do not have full control of all the handlers
-involved, is to convert the request from POST to GET in the first
-handler that reads the content:
-
- use Apache::Constants qw(M_GET);
-
- sub My::Test::handler {
- my $r = shift;
-
- if ($r->method eq 'POST') {
- my $content = $r->content;
- # ...
- #make sure nobody else tries to read POST data now that we have
- $r->method('GET');
- $r->method_number(M_GET);
- $r->headers_in->unset('Content-length');
- }
- # ...
- }
diff --git a/tags/v1_29/faq/mod_perl_cgi.pod b/tags/v1_29/faq/mod_perl_cgi.pod
deleted file mode 100644
index 0e94bfe..0000000
--- a/tags/v1_29/faq/mod_perl_cgi.pod
+++ /dev/null
@@ -1,246 +0,0 @@
-=head1 NAME
-
-Mod_perl_cgi - running CGI scripts under mod_perl ($Date$)
-
-=head1 DESCRIPTION
-
-This part of the mod_perl FAQ deals with questions surrounding CGI
-scripts.
-
-=head1 Why doesn't my CGI script work at all under mod_perl?
-
-What are the symptoms? Here are some possibilities.
-
-=head2 File not found
-
-Have you made the correct entries in Apache's configuration files? You
-need to add the C<Alias /perl/ ...> and C<E<lt>Location /perlE<gt>...>
-directives to access.conf as described in mod_perl.pod. And of course the
-script must be in the directory specified by the Alias directive and it
-must be readable and executable by the user that the web server runs as.
-
-=head2 Forbidden
-
-You don't have permission to access /perl/foo on this server.
-
- chmod 755 /path/to/my/mod_perl/scripts
- chmod 755 /path/to/my/mod_perl/scripts/foo
-
-=head2 Internal Server Error
-
-The script died with an execution error. There should be an error message
-in the server's error.log saying why. Provided you are using CGI.pm, you
-can also see what happens by running the script at a shell prompt.
-
-If the error.log claims there are syntax errors in your script,
-but
-
- perl -c /path/to/my/mod_perl/scripts/foo
-
-says it is OK, you have probably used __END__ or __DATA__. Sorry.
-Mod_perl's Apache::Registry can't deal with that.
-
-=head1 The script runs but the headers are mangled
-
-You have a script that works fine under mod_cgi but the browser
-displays "Content-Type: text/html" or similar headers at the top of
-the page when it is run under mod_perl. There are two possible
-causes.
-
-Something, either your script or mod_perl or CGI.pm (if you are using
-it) has to trigger Apache to send the response header. This happens
-when you call the CGI.pm $q->header method or mod_perl's
-$r->send_http_header. But if your script just prints out one or more
-header lines followed by a blank line and the page content, you need
-to set "PerlSendHeader On" in the configuration for the location of
-the script. This tells mod_perl to parse the stuff that the script
-prints and call $r->send_http_header for you when it sees the blank
-line.
-
-This parsing only happens if PerlSendHeader is on and the header has
-not been sent yet. Even so, it is costly and mod_perl makes the
-assumption that individual headers are not split across print
-statements, to simplify the parser and avoid having to retain
-fragments of headers between calls to print(). So the following does
-not work:
-
- print "Content-type: text/html\n";
- print "Set-Cookie: iscookietext\; ";
- print "expires=Wednesday, 09-Nov-1999 00:00:00 GMT\; ";
- print "path=\/\; domain=\.mmyserver.com\; \n\n";
- print "hello";
-
-because the Set-Cookie header is split across multiple print's.
-
-You need to print each header (or group of headers) in one go,
-possibly after building it up in a temporary variable.
-
- print "Content-type: text/html\n";
- my $cookie = "Set-Cookie: iscookietext; ";
- $cookie .= "expires=Wednesday, 09-Nov-1999 00:00:00 GMT; ";
- $cookie .= "path=/; domain=.mmyserver.com; \n\n";
- print $cookie;
- print "hello";
-
-=head1 My CGI script behaves strangely under mod_perl. Why?
-
-Remember that a conventional CGI script always starts up a fresh perl
-interpreter, whereas a mod_perl script is reused in the same process
-context many times. This means that certain categories of variables can
-survive from one invocation of the script to the next. You can make that
-work to your advantage, but you can also be caught out by it.
-
-When diagnosing a problem that might be caused by variable lifetimes,
-always start the web server in single process mode. Apache normally
-spawns a number of child processes to handle queries, and they get used in
-round-robin fashion, which makes test results unpredictable.
-
-The command
-
- # ./httpd -X
-
-will start a single-process server with its default configuration.
-You can specify a different configuration with the C<-f> flag (and
-thus use a different port number for testing, for instance).
-
-Now try executing your script from a browser. A non-graphical browser
-is often much better for diagnosing low-level problems. Install lynx
-(http://lynx.browser.org/) if you haven't already got it and use
-
- lynx -mime_header http://localhost/perl/myscript
-
-to see the response that the web server produces when it GETs your
-script, and
-
- lynx -head -dump http://localhost/perl/myscript
-
-to see the response to a HEAD request. The GET and HEAD commands that
-come with libwww-perl are similar but slower.
-
-Here are some of the effects that you might see.
-
-=head2 The server terminates after processing the first request
-
-Your script is calling the CORE perl C<exit()> function. That is not
-a problem in a conventional CGI script, provided that query processing
-is complete. But you almost certainly don't want to exit in a
-mod_perl script. It kills the server process that handled the
-request, meaning that the advantage of using mod_perl to avoid startup
-overhead is lost.
-
-The best way to avoid calling C<exit()> is to restructure the script so
-that all execution paths return to a common point at the end of the
-script. If this seems impractical you can force the same effect by
-placing a label after the last executable statement and replacing calls to
-C<exit()> with C<goto label;>
-
-See also what mod_perl_traps says about C<Apache::exit()> and the way
-that Apache::Registry causes it to terminate the script but not the
-httpd child.
-
-There may be exceptional circumstances in which you explicitly want to
-terminate the httpd child at the end of the current request. In this
-case C<Apache-E<gt>exit(-2)> should be used.
-
-=head2 Variables retain their value from one request to the next
-
-The so-called sticky query effect happens when the CGI query object, or
-another request-specific variable, has a lifetime longer than a single
-execution of your script and does not get reinitialised each time the
-script is invoked.
-
-This does not matter in a conventional CGI script, because the script
-starts with a clean slate for each new request. But a mod_perl script
-gets compiled into a subroutine by the Apache::Registry handler and then
-processes an arbitrary number of requests. To make sure that both you and
-the perl interpreter have the same idea about the meaning of your script,
-make sure it starts like this:
-
- #!/usr/bin/perl -w
- use strict;
-
-It is good for you! It will make perl point out all variables that you
-have not explicitly declared. You can then think about whether they need
-to be global or if they can be lexical. Try to declare things lexically,
-with my(). These variables disappear when the block they are declared in
-ends, so they don't occupy memory when they are not in use and they also
-do not need a run-time symbol table entry.
-
-Beware, though, of referring to a lexical variable indirectly from within a
-subroutine. To quote L<perlsub/"Private Variables via my()">, the
-variable "... now becomes unreachable by the outside world, but retains
-its value between calls to ..." the subroutine. You will see classic
-"sticky query" symptoms if your code looks like this:
-
- #!/usr/bin/perl -w
- use strict;
- use CGI;
- my $q = CGI->new();
- doit();
-
- sub doit {
- print($q->header(), $q->start_html());
- print('Value is ', $q->param('val')) if $q->param;
- $q->print('<p>', $q->startform, 'Value? ',
- $q->textfield(-name=>'val', -size=>20), ' ',
- $q->submit('enter'), $q->endform);
- print($q->end_html());
- }
-
-Because you remembered to put the C<-w> switch on the first line, the
-error log will tell you that "Variable $q will not stay shared"
-(provided you are using perl5.004 or higher).
-
-You must either pass the variable to the subroutine as a parameter,
-
- doit($q)
-
- sub doit {
- my($q) = @_;
- ....
-
-or declare this variable to be global,
-
- use vars qw($q);
- $q = CGI->new();
-
-The reason why Perl works this way is explained in a news posting by
-Mike Guy that is included with this FAQ (mjtg-news.txt).
-
-=for html
- <a href="mjtg-news.txt">mjtg-news.txt</a>
-
-=head2 Variables B<still> retain their value from one request to the next
-
-CGI.pm must pull some extra tricks when it is being used via
-Apache::Registry. Versions of CGI.pm before 2.35 did not know this,
-and Apache::Registry will complain if you try to use an earlier
-version.
-
-CGI.pm detects that it is running under Apache::Registry by looking
-for an environment variable. This test can fail if C<use CGI> is
-evaluated too early, before the environment has been set up. That can
-happen if you have C<use CGI> in a script and pull the script in with
-a C<PerlRequire> directive in httpd.conf. Replacing C<use CGI> with
-C<require CGI> will fix it.
-
-=head2 Do I have to rewrite my legacy code for mod_perl?
-
-If you have CGI code that seems to be fundamentally at odds with
-mod_perl's "compile once, run many" environment, you may find that
-it will work if run under the module C<Apache::PerlRun>. See the
-documentation of that module, which is included with recent versions
-of mod_perl.
-
-=head1 How can my script continue running after sending the response?
-
-If the client submits a form that will take some time to process, you
-may want to say "Thanks for submitting the form" and close the
-connection, before processing it.
-
-You can achieve this by registering the subroutine that processes the
-form as a cleanup handler:
-
- if($ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/) {
- Apache->request->register_cleanup(sub { doProcess($query) });
- }
diff --git a/tags/v1_29/faq/mod_perl_faq.pod b/tags/v1_29/faq/mod_perl_faq.pod
deleted file mode 100644
index 08bf8d3..0000000
--- a/tags/v1_29/faq/mod_perl_faq.pod
+++ /dev/null
@@ -1,432 +0,0 @@
-=head1 NAME
-
-Mod_perl_faq - frequently asked questions about mod_perl ($Date$)
-
-=head1 DESCRIPTION
-
-Mod_perl allows an Apache Web Server to directly execute perl code. This
-document is designed to answer questions that arise when designing new
-applications, and converting existing applications, to run in the mod_perl
-environment.
-
-=head1 QUESTIONS & ANSWERS
-
-=head2 What is mod_perl?
-
-The Apache/Perl integration project brings together the full power of the
-Perl programming language and the Apache HTTP server. This is achieved by
-linking the Perl runtime library into the server and providing an
-object-oriented Perl interface to the server's C language API.
-
-Mod_perl is a bundle of software. One part of the bundle is designed to
-be compiled and linked together with Apache and Perl. The remainder is
-perl code that provides the object-oriented interface to the "perl-enabled"
-web server.
-
-The primary advantages of mod_perl are power and speed. You have full
-access to the inner-workings of the web server and can intervene at any
-stage of request-processing. This allows for customized processing of (to
-name just a few of the phases) URI->filename translation, authentication,
-response generation and logging. There is very little run-time overhead.
-In particular, it is not necessary to start a separate process, as is
-often done with web-server extensions. The most wide-spread such
-extension mechanism, the Common Gateway Interface (CGI), can be replaced
-entirely with perl-code that handles the response generation phase of
-request processing. Mod_perl includes a general purpose module for this
-purpose (Apache::Registry) that can transparently run existing perl CGI
-scripts.
-
-=head2 Where can I get mod_perl?
-
-Mod_perl can be found at
-http://www.perl.com/CPAN/modules/by-module/Apache/
-
-=head2 What else do I need?
-
-=over 4
-
-=item Perl
-
-http://www.perl.com/CPAN/src/latest.tar.gz
-
-Win32 users note: mod_perl compiles cleanly and works with ActivePerl
-(build 626, June 2001). In
-http://www.mail-archive.com/modperl@apache.org/msg11513.html Randy
-Kobes wrote:
-
- A ppd for mod_perl, suitable for use with ActivePerls
- based on Perl-5.6.0, is now available. Installation is as ppm
- install
-
- http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl.ppd
-
- or in ftp://theoryx5.uwinnipeg.ca/pub/ppmpackages/.
- A post-install script will subsequently be run which
- will download and install the required ApacheModulePerl.dll;
- this should be placed in your Apache modules directory.
- If for some reason the script fails, this dll can be
- obtained from http://theoryx5.uwinnipeg.ca/ppmpackages/.
- Also available in this directory is a sample Apache
- httpd.conf suitable to test mod_perl on Win32.
-
-=item Apache
-
-http://www.apache.org/dist/
-
-=back
-
-=head2 How do I install it?
-
-Configuring and installing apache with mod_perl is a complex process,
-so it is really not a good idea to attempt to do it manually. If you
-are used to configuring third-party modules into Apache using the
-apache configuration process, please realize that running mod_perl's
-Makefile.PL with the right parameters does this for you.
-
-Read the INSTALL* files in the top-level mod_perl distribution
-directory and then choose one of the INSTALL.simple* recipes that is
-close to your requirements, as a starting point. When you succeed in
-compiling and linking an httpd, a quick way to check that everything
-is configured according to plan is to run it with the C<-l> (list
-compiled-in modules) and C<-V> (show paths) flags.
-
-=head2 What documentation should I read?
-
-The mod_perl documentation in mod_perl.pod. After you have installed
-mod_perl you can read it with the command: C<perldoc mod_perl>.
-
-The complete list of available documentation can be found at the end
-of mod_perl's README file.
-
-If you are using mod_perl to extend the server functionality, you will
-need to read C<perldoc Apache> and the Apache API notes, which can be
-found in apache_x.x.x/htdocs/manual/misc/API.html.
-
-Existing (perl-) CGI scripts should run as-is under mod_perl. There are a
-number of reasons why they may need to be adjusted, and these are
-discussed later in this FAQ. If you are developing a new CGI script it is
-probably best to use CGI.pm. It is part of the standard perl distribution
-and its documentation can be read with the command: C<perldoc CGI>.
-
-=head2 How do I run CGI scripts under mod_perl?
-
-Refer to L<mod_perl_cgi> for tips on writing and converting CGI
-scripts for mod_perl.
-
-=head2 How do I access the Apache API from mod_perl?
-
-Interfacing with Apache is discussed in L<mod_perl_api>.
-
-=head2 How secure are mod_perl scripts?
-
-Because mod_perl runs within an httpd child process, it runs with the
-user-id and group-id specified in the httpd.conf file. This user/group
-should have the lowest possible privileges. It should only have access
-to world readable files. Even so, careless scripts can give away
-information. You would not want your /etc/passwd file to be readable over
-the net, for instance.
-
-Different mod_perl scripts run successively using the same Perl
-interpreter instance. So, in addition to classical CGI mischiefs, a
-malicious mod_perl script can redefine any Perl object and change the
-behavior of other mod_perl scripts.
-
-If you turn on tainting checks, perl can help you to avoid the pitfalls of
-using data received from the net. Setting the C<-T> switch on the first line
-of the script is not sufficient to enable tainting checks under mod_perl.
-You have to include the directive C<PerlTaintCheck On> in the httpd.conf
-file.
-
-=head2 What if my script needs higher privileges?
-
-You will have to start a new process that runs under a suitable user-id
-(or group-id). If all requests handled by the script will need the higher
-privileges, you might as well write it as a suid CGI script. Read the
-documentation about suEXEC in the Apache documentation.
-
-Alternatively, pre-process the request with mod_perl and fork a suid
-helper process to handle the privileged part of the task.
-
-=head2 Why is httpd using so much memory?
-
-Read the section on "Memory Consumption" in the mod_perl.pod.
-
-Make sure that your scripts are not leaking memory. Global variables
-stay around indefinitely, lexical variables (declared with my()) are
-destroyed when they go out of scope, provided there are no references
-to them from outside of that scope. The Apache::Leak module can warn
-about some types of memory leak.
-
-To get information about the modules that have been loaded and their
-symbol-tables, use the Apache::Status module. It is enabled by adding
-these lines to the httpd configuration file.
-
- <Location /perl-status>
- SetHandler perl-script
- PerlHandler Apache::Status
- </Location>
-
-Then look at the URL http://www.your.host/perl-status
-
-Joel Wagner reports that calling an undefined subroutine in a module
-can cause a tight loop that consumes all memory. Here is a way to
-catch such errors. Define an autoload subroutine
-
- sub UNIVERSAL::AUTOLOAD {
- my $class = shift;
- warn "$class can't `$UNIVERSAL::AUTOLOAD'!\n";
- }
-
-It will produce a nice error in error_log, giving the line number of
-the call and the name of the undefined subroutine.
-
-=head2 Do I have to restart the server when I change my Perl code?
-
-Apache::Registry checks the timestamp of scripts that it has loaded
-and reloads them if they change. Other handlers and library modules
-are not automatically reloaded by mod_perl, but you can use the
-Apache::StatINC module to do this for you.
-
-=head2 So how do I use mod_perl in conjunction with ErrorDocument?
-
-Andreas Koenig writes:
-
-=over 4
-
-=item *
-
-Set up your testing engine:
-
-LWP comes with debugging capabilities that are sometimes better than
-your browser, sometimes your browser is the better testing
-device. Make sure you can call lwp-request from the command line and
-have your browser ready before you start. I find the C<-x> switch
-(extended debugging) and the C<-d> switch (do not display content) most
-useful.
-
-=item *
-
-Test your server with
-
- lwp-request -xd http://your.server/test/file.not_there
-
-Carefully examine if the status is 404 and if the headers look good.
-
-If you try 'lwp-request -es', the HTML output will not be the one you
-are sending, instead lwp-request will send its own cooked HTML text
-(as of version libwww-perl-5.09). Check the real text either with the
-C<-x> switch or with telnet or your browser.
-
-=item *
-
-Set up your Errordocument configuration in the testing area. I have
-this in my .htaccess file:
-
- ErrorDocument 404 /perl/errors/err404-01
-
-The /perl/ directory is configured to
-
- <Location /perl>
- SetHandler perl-script
- PerlHandler Apache::Registry::handler
- Options ExecCGI
- </Location>
-
-I have no PerlSendHeader and no PerlNewSendHeader directive in any
-configuration file.
-
-=item *
-
-Repeat step 2 (Test your server)
-
-=item *
-
-Write your error handler in mod_perl. You have to be prepared that you
-have to tell both apache *and* the browser the right thing. Basically
-you have to tell the browser what the error is, but you have to
-pretend to apache that everything was OK. If you tell apache the error
-condition, it will handle the situation on its own and add some
-unwanted stuff to the output that goes to the browser.
-
-The following works fine for me:
-
- my $r = Apache->request;
- $r->content_type('text/html; charset=ISO-8859-1');
- $r->send_http_header;
- $r->status(200);
- ...send other HTML stuff...
-
-At the time of the send_http_header we have an error condition of type
-404--this is what gets sent to the browser. After that I set status to
-200 to silence the apache engine.
-
-I was not successful in trying to do the same with CGI.pm, but I
-didn't try very hard.
-
-=item *
-
-Repeat step 2 (Test your server)
-
-=item *
-
-The above is tested with mod_perl/0.98 and 0.99
-
-=item *
-
-Open questions I could not find documentation for (except RTFS): what
-exactly is PerlSendHeaders and PerlNewSendHeaders. What is the default
-setting for those? How do these cooperate with CGI.pm, Apache.pm,
-Apache::Registry?
-
-=back
-
-=head2 How can I reference private library modules?
-
-If you put your modules into one of the directories on perl's search
-path (the @INC array), they will be found automatically.
-Traditionally, site-specific modules go in /usr/lib/perl5/site_perl/.
-Newer versions of mod_perl add the directory $ServerRoot/lib/perl to
-@INC on startup so that is a good place for modules that are only used
-by mod_perl scripts.
-
-If you need to load files from other non-standard locations, you can
-add directories to the @INC array with a 'use lib' statement in a
-startup script. See L<mod_perl_tuning> for an example.
-
-=head2 How can I pass arguments to a SSI script?
-
-Following the documentation, I have put the following in the html
-file:
-
- <!--#perl sub="Apache::Include" arg="/perl/ssi.pl" -->
-
-I want to send an argument to the ssi.pl script. How?
-
-It won't work with Apache::Include. Instead of a script, define a
-subroutine that's pulled in with PerlRequire or PerlModule, like so:
-
- sub My::ssi {
- my($r, $one, $two, $three) = @_;
- ...
- }
-
-In the html file:
-
- <!--#perl sub="My::ssi" arg="one" arg="two" arg="three" -->
-
-=head2 Why is image-file loading so slow when testing with httpd C<-X> ?
-
-If you use Netscape while your server is running in single-process
-mode, the "KeepAlive" feature gets in the way. Netscape tries to open
-multiple connections and keep them open. Because there is only one
-server process listening, each connection has to time-out before the
-next succeeds. Turn off KeepAlive in httpd.conf to avoid this effect.
-
-=head2 What can cause a subroutine or variable to be sporadically undefined?
-
-If you sometimes see error messages like this:
-
- [Thu Sep 11 11:03:06 1997] Undefined subroutine
- &Apache::ROOT::perl::script1::sub_foo called at
- /some/path/perl/script2 line 42.
-
-despite the fact that script2 normally works just fine, it looks like
-you have a namespace problem in a library file. If sub_foo is located
-in a file that is pulled in by 'require' and both script1 and script2
-require it, you need to be sure that the file containing sub_foo sets
-a package name. Otherwise, sub_foo gets defined in the namespace that
-is active the first time it is required, and the next require is a
-no-op because that file is already in %INC. The same problem can
-happen with global variables.
-
-The solution is simple, set up your require'd file something along
-these lines:
-
- package SomeName;
-
- sub sub_foo {...}
-
-Now, have scripts call SomeName::sub_foo() instead of sub_foo().
-
-=head2 Is there a bug that causes httpd processes to crash?
-
-You may see httpd child processes crashing with segmentation fault
-when you restart the server with a HUP or USR1 signal. This is not a
-bug in mod_perl. If you have 'PerlFreshRestart On' in the
-configuration, the main httpd daemon reloads all the perl modules that
-it has preloaded when it gets a HUP or USR1 signal. Unfortunately,
-not all perl modules are robust enough to survive this, for them,
-unusual situation.
-
-=head2 What could be causing sporadic errors "in cleanup"?
-
-Some people have seen error messages such as this:
-
- [Fri Sep 26 10:50:08 1997] (in cleanup) no dbproc key in hash
- at /usr/lib/perl5/site_perl/Apache/Registry.pm line 119.
-
-Doug writes:
-
-"I have yet to figure out why, but there have been a few arbitrary
-cases where Perl (in mod_perl) _insists_ on finding and/or calling a
-DESTROY method for an object. Defining an empty sub DESTROY has been
-the bandaid for these few cases."
-
-If the specific error message gives you a hint about which object is
-causing difficulty, put the C<sub DESTROY { }> in the module that
-defines that object class.
-
-=head2 How can I test that my script is running under mod_perl?
-
-There are 2 environment variables you can test.
-
- exists $ENV{"MOD_PERL"} # if running under mod_perl
-
- $ENV{"GATEWAY_INTERFACE"} eq "CGI-Perl/1.1"
-
-The MOD_PERL variable gets set immediately when the perl interpreter
-starts up, whereas GATEWAY_INTERFACE may not be set yet when BEGIN
-blocks are being processed.
-
-=head2 Why don't "format" and "write" work under mod_perl?
-
-The Perl tie'd filehandle interface is not complete, format/write is
-one of the missing pieces. If you configure Perl with sfio, write()
-should work just fine.
-
-=head2 Where can I get help that I did not find in here?
-
-There is a mailing-list dedicated to mod_perl. It is archived at
-http://outside.organic.com/mail-archives/modperl/ and at
-http://forum.swarthmore.edu/epigone/modperl (which has a search
-engine) and also at
-http://www.progressive-comp.com/Lists/?l=apache-modperl&r=1#apache-modperl
-(threaded and indexed).
-
-You can subscribe to the list by sending a mail to
-C<modperl-subscribe@perl.apache.org> and responding to the confirmation
-message that you will receive. To unsubscribe, send mail to
-C<modperl-unsubscribe@perl.apache.org> B<from the address you are
-subscribed at> and reply to the confirmation message. Look at the
-full headers of mails that you receive from the list to see the
-address that they were sent to. The address is embedded in the
-C<Return-Path> header (you will probably have to activate a "show full
-headers" function in your mail reader to see it). To find the
-address, delete C<modperl-return-nnnn-> from the front of the return path
-and C<@perl.apache.org> from the back, then replace the C<=> with C<@>.
-
-Remember: the mailing list is for questions about and discussion of
-mod_perl. Quetions about perl programming in general should be asked
-in the newsgroup comp.lang.perl.misc, after consulting the fine perl
-faqs. There is a whole set of newsgroups dedicated to web authoring,
-web servers etc.: comp.infosystems.www.*
-
-The mod_perl homepage http://perl.apache.org/ has links to other
-mod_perl resources.
-
-The pod source of this FAQ is available at
-http://www.ping.de/~fdc/mod_perl/mod_perl_faq.tar.gz
-
-=head2 Where do I send suggestions and corrections concerning this FAQ?
-
-mailto:fdc@cliwe.ping.de
diff --git a/tags/v1_29/htdocs/manual/mod/mod_perl.html b/tags/v1_29/htdocs/manual/mod/mod_perl.html
deleted file mode 100644
index 492dc3e..0000000
--- a/tags/v1_29/htdocs/manual/mod/mod_perl.html
+++ /dev/null
@@ -1,752 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta name="generator" content="HTML Tidy, see www.w3.org" />
-
- <title>Apache module mod_perl</title>
- </head>
-
- <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#000080"
- alink="#FF0000">
- <!-- generated by Apache::ModuleDoc 1.1 -->
-
- <div align="CENTER">
- <img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]" />
-
- <h3>Apache HTTP Server Version 1.3</h3>
- </div>
-
- <h1 align="CENTER">Module mod_perl</h1>
-
- <p>This module is contained in the mod_perl.c file.</p>
-
- <ul>
- <li><a href="#.Perl."><Perl></a></li>
- <li><a href="#./Perl."></Perl></a></li>
- <li><a href="#=pod">=pod</a></li>
- <li><a href="#=cut">=cut</a></li>
- <li><a href="#__END__">__END__</a></li>
- <li><a href="#PerlAccessHandler">PerlAccessHandler</a></li>
- <li><a href="#PerlAuthenHandler">PerlAuthenHandler</a></li>
- <li><a href="#PerlAuthzHandler">PerlAuthzHandler</a></li>
- <li><a href="#PerlChildExitHandler">PerlChildExitHandler</a></li>
- <li><a href="#PerlChildInitHandler">PerlChildInitHandler</a></li>
- <li><a href="#PerlCleanupHandler">PerlCleanupHandler</a></li>
- <li><a href="#PerlDispatchHandler">PerlDispatchHandler</a></li>
- <li><a href="#PerlFixupHandler">PerlFixupHandler</a></li>
- <li><a href="#PerlFreshRestart">PerlFreshRestart</a></li>
- <li><a href="#PerlHandler">PerlHandler</a></li>
- <li><a href="#PerlHeaderParserHandler">PerlHeaderParserHandler</a></li>
- <li><a href="#PerlInitHandler">PerlInitHandler</a></li>
- <li><a href="#PerlLogHandler">PerlLogHandler</a></li>
- <li><a href="#PerlModule">PerlModule</a></li>
- <li><a href="#PerlPassEnv">PerlPassEnv</a></li>
- <li><a href="#PerlPostReadRequestHandler">PerlPostReadRequestHandler</a></li>
- <li><a href="#PerlRequire">PerlRequire</a></li>
- <li><a href="#PerlRestartHandler">PerlRestartHandler</a></li>
- <li><a href="#PerlScript">PerlScript</a></li>
- <li><a href="#PerlSendHeader">PerlSendHeader</a></li>
- <li><a href="#PerlSetEnv">PerlSetEnv</a></li>
- <li><a href="#PerlSetVar">PerlSetVar</a></li>
- <li><a href="#PerlSetupEnv">PerlSetupEnv</a></li>
- <li><a href="#PerlTaintCheck">PerlTaintCheck</a></li>
- <li><a href="#PerlTransHandler">PerlTransHandler</a></li>
- <li><a href="#PerlTypeHandler">PerlTypeHandler</a></li>
- <li><a href="#PerlWarn">PerlWarn</a></li>
- </ul>
- <hr />
-
- <h2><a id=".Perl." name=".Perl."><Perl> directive</a></h2>
-
- <p>Description: Perl code<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> <Perl> <em>Raw Text</em>
- (RAW_ARGS)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>N/A</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="./Perl." name="./Perl."></Perl> directive</a></h2>
-
- <p>Description: End Perl code<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> </Perl> (NO_ARGS)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>N/A</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="=pod" name="=pod">=pod directive</a></h2>
-
- <p>Description: Start of POD<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> =pod <em>Raw Text</em>
- (RAW_ARGS)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>=pod</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="=cut" name="=cut">=cut directive</a></h2>
-
- <p>Description: End of POD<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> =cut (NO_ARGS)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>=cut</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="__END__" name="__END__">__END__ directive</a></h2>
-
- <p>Description: Stop reading config<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> __END__ <em>Raw Text</em>
- (RAW_ARGS)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>__END__</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlAccessHandler" name="PerlAccessHandler">PerlAccessHandler
- directive</a></h2>
-
- <p>Description: the Perl Access handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlAccessHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlAccessHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlAuthenHandler" name="PerlAuthenHandler">PerlAuthenHandler
- directive</a></h2>
-
- <p>Description: the Perl Authentication handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlAuthenHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlAuthenHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlAuthzHandler" name="PerlAuthzHandler">PerlAuthzHandler
- directive</a></h2>
-
- <p>Description: the Perl Authorization handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlAuthzHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlAuthzHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlChildExitHandler"
- name="PerlChildExitHandler">PerlChildExitHandler directive</a></h2>
-
- <p>Description: the Perl Child exit handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlChildExitHandler <em>Arg1 x
- n</em> (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlChildExitHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlChildInitHandler"
- name="PerlChildInitHandler">PerlChildInitHandler directive</a></h2>
-
- <p>Description: the Perl Child init handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlChildInitHandler <em>Arg1 x
- n</em> (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlChildInitHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlCleanupHandler" name="PerlCleanupHandler">PerlCleanupHandler
- directive</a></h2>
-
- <p>Description: the Perl Cleanup handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlCleanupHandler <em>Arg1 x
- n</em> (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlCleanupHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlDispatchHandler"
- name="PerlDispatchHandler">PerlDispatchHandler directive</a></h2>
-
- <p>Description: the Perl Dispatch handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlDispatchHandler <em>Arg1</em>
- (TAKE1)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>$PerlDispatchHandler =
- $arg</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlFixupHandler" name="PerlFixupHandler">PerlFixupHandler
- directive</a></h2>
-
- <p>Description: the Perl Fixup handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlFixupHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlFixupHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlFreshRestart" name="PerlFreshRestart">PerlFreshRestart
- directive</a></h2>
-
- <p>Description: Tell mod_perl to reload modules and flush Apache::Registry
- cache on restart<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlFreshRestart <em>On|Off</em>
- (FLAG)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>$PerlFreshRestart = 'On' ||
- 'Off'</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlHandler" name="PerlHandler">PerlHandler directive</a></h2>
-
- <p>Description: the Perl handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlHeaderParserHandler"
- name="PerlHeaderParserHandler">PerlHeaderParserHandler directive</a></h2>
-
- <p>Description: the Perl Header Parser handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlHeaderParserHandler <em>Arg1 x
- n</em> (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push
- @PerlHeaderParserHandler, $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlInitHandler" name="PerlInitHandler">PerlInitHandler
- directive</a></h2>
-
- <p>Description: the Perl Init handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlInitHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlInitHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlLogHandler" name="PerlLogHandler">PerlLogHandler
- directive</a></h2>
-
- <p>Description: the Perl Log handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlLogHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlLogHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlModule" name="PerlModule">PerlModule directive</a></h2>
-
- <p>Description: List of Perl modules<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlModule <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlModule,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlPassEnv" name="PerlPassEnv">PerlPassEnv directive</a></h2>
-
- <p>Description: pass environment variables to %ENV<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlPassEnv <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlPassEnv,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlPostReadRequestHandler"
- name="PerlPostReadRequestHandler">PerlPostReadRequestHandler
- directive</a></h2>
-
- <p>Description: the Perl Post Read Request handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlPostReadRequestHandler <em>Arg1
- x n</em> (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push
- @PerlPostReadRequestHandler, $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlRequire" name="PerlRequire">PerlRequire directive</a></h2>
-
- <p>Description: A Perl script name, pulled in via require<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlRequire <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlRequire,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlRestartHandler" name="PerlRestartHandler">PerlRestartHandler
- directive</a></h2>
-
- <p>Description: the Perl Restart handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlRestartHandler <em>Arg1 x
- n</em> (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlRestartHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlScript" name="PerlScript">PerlScript directive</a></h2>
-
- <p>Description: this directive is deprecated, use `PerlRequire'<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlScript <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlScript,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlSendHeader" name="PerlSendHeader">PerlSendHeader
- directive</a></h2>
-
- <p>Description: Tell mod_perl to parse and send HTTP headers<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlSendHeader <em>On|Off</em>
- (FLAG)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>$PerlSendHeader = 'On' ||
- 'Off'</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlSetEnv" name="PerlSetEnv">PerlSetEnv directive</a></h2>
-
- <p>Description: Perl %ENV key and value<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlSetEnv <em>Arg1 Arg2</em>
- (TAKE2)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlSetEnv, [$arg1
- => $arg2]</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlSetVar" name="PerlSetVar">PerlSetVar directive</a></h2>
-
- <p>Description: Perl config var and value<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlSetVar <em>Arg1 Arg2</em>
- (TAKE2)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlSetVar, [$arg1
- => $arg2]</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlSetupEnv" name="PerlSetupEnv">PerlSetupEnv
- directive</a></h2>
-
- <p>Description: Tell mod_perl to setup %ENV by default<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlSetupEnv <em>On|Off</em>
- (FLAG)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>$PerlSetupEnv = 'On' ||
- 'Off'</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlTaintCheck" name="PerlTaintCheck">PerlTaintCheck
- directive</a></h2>
-
- <p>Description: Turn on -T switch<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlTaintCheck <em>On|Off</em>
- (FLAG)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>$PerlTaintCheck = 'On' ||
- 'Off'</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlTransHandler" name="PerlTransHandler">PerlTransHandler
- directive</a></h2>
-
- <p>Description: the Perl Translation handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlTransHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlTransHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlTypeHandler" name="PerlTypeHandler">PerlTypeHandler
- directive</a></h2>
-
- <p>Description: the Perl Type check handler routine name<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlTypeHandler <em>Arg1 x n</em>
- (ITERATE)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>push @PerlTypeHandler,
- $arg1</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf anywhere and in
- .htaccess<br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> Any other than None<br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h2><a id="PerlWarn" name="PerlWarn">PerlWarn directive</a></h2>
-
- <p>Description: Turn on -w switch<br />
- <br />
- <a href="directive-dict.html#Syntax"
- rel="Help"><strong>Syntax:</strong></a> PerlWarn <em>On|Off</em>
- (FLAG)<br />
- <a href="directive-dict.html#PerlSyntax"
- rel="Help"><strong>PerlSyntax:</strong></a> <tt>$PerlWarn = 'On' ||
- 'Off'</tt><br />
- <a href="directive-dict.html#Context"
- rel="Help"><strong>Context:</strong></a> Allowed in *.conf only outside
- <Directory> or <Location><br />
- <a href="directive-dict.html#Override"
- rel="Help"><strong>Override:</strong></a> <i>Not applicable</i><br />
- <a href="directive-dict.html#Status"
- rel="Help"><strong>Status:</strong></a> Extension<br />
- <a href="directive-dict.html#Module"
- rel="Help"><strong>Module:</strong></a> mod_perl</p>
- <hr />
-
- <h3 align="CENTER">Apache HTTP Server Version 1.3</h3>
- <a href="./"><img src="../images/index.gif" alt="Index" /></a> <a
- href="../"><img src="../images/home.gif" alt="Home" /></a>
- </body>
-</html>
-
diff --git a/tags/v1_29/lib/.cvsignore b/tags/v1_29/lib/.cvsignore
deleted file mode 100644
index c357d4f..0000000
--- a/tags/v1_29/lib/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-mod_perl_hooks.pm
-
diff --git a/tags/v1_29/lib/Apache/.cvsignore b/tags/v1_29/lib/Apache/.cvsignore
deleted file mode 100644
index a31d108..0000000
--- a/tags/v1_29/lib/Apache/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-MyConfig.pm
diff --git a/tags/v1_29/lib/Apache/Constants/Exports.pm b/tags/v1_29/lib/Apache/Constants/Exports.pm
deleted file mode 100644
index 1ee3620..0000000
--- a/tags/v1_29/lib/Apache/Constants/Exports.pm
+++ /dev/null
@@ -1,139 +0,0 @@
-package Apache::Constants::Exports;
-
-use strict;
-
-my(@common) = qw(OK DECLINED DONE NOT_FOUND FORBIDDEN
- AUTH_REQUIRED SERVER_ERROR);
-my(@methods) = qw(M_CONNECT M_DELETE M_GET M_INVALID M_OPTIONS
- M_POST M_PUT M_TRACE
- M_PATCH M_PROPFIND M_PROPPATCH M_MKCOL M_COPY
- M_MOVE M_LOCK M_UNLOCK METHODS);
-my(@options) = qw(OPT_NONE OPT_INDEXES OPT_INCLUDES
- OPT_SYM_LINKS OPT_EXECCGI OPT_UNSET OPT_INCNOEXEC
- OPT_SYM_OWNER OPT_MULTI OPT_ALL);
-my(@server) = qw(MODULE_MAGIC_NUMBER
- SERVER_VERSION SERVER_BUILT);
-my(@response) = qw(DOCUMENT_FOLLOWS MOVED REDIRECT
- USE_LOCAL_COPY
- BAD_REQUEST
- BAD_GATEWAY
- RESPONSE_CODES
- NOT_IMPLEMENTED
- NOT_AUTHORITATIVE
- CONTINUE);
-my(@satisfy) = qw(SATISFY_ALL SATISFY_ANY SATISFY_NOSPEC);
-my(@remotehost) = qw(REMOTE_HOST REMOTE_NAME
- REMOTE_NOLOOKUP REMOTE_DOUBLE_REV);
-my(@http) = qw(HTTP_OK
- HTTP_MOVED_TEMPORARILY
- HTTP_MOVED_PERMANENTLY
- HTTP_METHOD_NOT_ALLOWED
- HTTP_NOT_MODIFIED
- HTTP_UNAUTHORIZED
- HTTP_FORBIDDEN
- HTTP_NOT_FOUND
- HTTP_BAD_REQUEST
- HTTP_INTERNAL_SERVER_ERROR
- HTTP_NOT_ACCEPTABLE
- HTTP_NO_CONTENT
- HTTP_PRECONDITION_FAILED
- HTTP_SERVICE_UNAVAILABLE
- HTTP_VARIANT_ALSO_VARIES);
-my(@config) = qw(DECLINE_CMD);
-my(@types) = qw(DIR_MAGIC_TYPE);
-my(@override) = qw(
- OR_NONE
- OR_LIMIT
- OR_OPTIONS
- OR_FILEINFO
- OR_AUTHCFG
- OR_INDEXES
- OR_UNSET
- OR_ALL
- ACCESS_CONF
- RSRC_CONF);
-my(@args_how) = qw(
- RAW_ARGS
- TAKE1
- TAKE2
- ITERATE
- ITERATE2
- FLAG
- NO_ARGS
- TAKE12
- TAKE3
- TAKE23
- TAKE123);
-
-my $rc = [@common, @response];
-
-%Apache::Constants::EXPORT_TAGS = (
- common => \@common,
- config => \@config,
- response => $rc,
- http => \@http,
- options => \@options,
- methods => \@methods,
- remotehost => \@remotehost,
- satisfy => \@satisfy,
- server => \@server,
- types => \@types,
- args_how => \@args_how,
- override => \@override,
- #depreciated
- response_codes => $rc,
-);
-
-@Apache::Constants::EXPORT_OK = (
- @response,
- @http,
- @options,
- @methods,
- @remotehost,
- @satisfy,
- @server,
- @config,
- @types,
- @args_how,
- @override,
-);
-
-*Apache::Constants::EXPORT = \@common;
-
-sub gen_ctags {
- my @tags = ();
- my $pack = __PACKAGE__;
- print <<EOF;
-/*
- * Generated by $pack\::gen_ctags, do not edit!!!
- */
-EOF
-
- while(my($k,$v) = each %Apache::Constants::EXPORT_TAGS) {
- push @tags, $k;
- print "static char *ETAG_", $k, "[] = { \n",
- (map { qq( "$_",\n) } @$v),
- " NULL,\n};\n";
- }
-
- my %case_tags = ();
- for my $tag (@tags) {
- my $key = substr($tag, 0, 1);
- push @{ $case_tags{$key} }, $tag;
- }
-
- print "static char **export_tags(char *tag) {\n";
- print " switch (*tag) {\n";
- for my $k (sort keys %case_tags) {
- my $v = $case_tags{$k};
- print "\tcase '$k':\n";
- for my $tag (@$v) {
- print qq|\tif(strEQ("$tag", tag))\n\t return ETAG_$tag;\n|;
- }
- }
- print qq|\tdefault:\n\tcroak("unknown tag `%s'", tag);\n|;
- print " }\n}\n";
-}
-
-1;
-__END__
diff --git a/tags/v1_29/lib/Apache/Debug.pm b/tags/v1_29/lib/Apache/Debug.pm
deleted file mode 100644
index 80c87de..0000000
--- a/tags/v1_29/lib/Apache/Debug.pm
+++ /dev/null
@@ -1,158 +0,0 @@
-package Apache::Debug;
-use Cwd 'fastcwd';
-
-use vars qw($VERSION);
-$VERSION = "1.61";
-
-sub import {
- local $^W = 0;
- shift;
-
- my(%args) = @_;
- return unless exists $args{level};
-
- print STDERR "Apache::Debug: [@_]\n";
- $Apache::Registry::Debug = $args{level};
-
- $^M = 'a' x (1<<16);
-
- require Carp;
- $SIG{__DIE__} = \&Carp::confess;
-}
-
-#from HTTP::Status
-
-my %StatusCode = (
- 100 => 'Continue',
- 101 => 'Switching Protocols',
- 200 => 'OK',
- 201 => 'Created',
- 202 => 'Accepted',
- 203 => 'Non-Authoritative Information',
- 204 => 'No Content',
- 205 => 'Reset Content',
- 206 => 'Partial Content',
- 300 => 'Multiple Choices',
- 301 => 'Moved Permanently',
- 302 => 'Moved Temporarily',
- 303 => 'See Other',
- 304 => 'Not Modified',
- 305 => 'Use Proxy',
- 400 => 'Bad Request',
- 401 => 'Unauthorized',
- 402 => 'Payment Required',
- 403 => 'Forbidden',
- 404 => 'Not Found',
- 405 => 'Method Not Allowed',
- 406 => 'Not Acceptable',
- 407 => 'Proxy Authentication Required',
- 408 => 'Request Timeout',
- 409 => 'Conflict',
- 410 => 'Gone',
- 411 => 'Length Required',
- 412 => 'Precondition Failed',
- 413 => 'Request Entity Too Large',
- 414 => 'Request-URI Too Large',
- 415 => 'Unsupported Media Type',
- 500 => 'Internal Server Error',
- 501 => 'Not Implemented',
- 502 => 'Bad Gateway',
- 503 => 'Service Unavailable',
- 504 => 'Gateway Timeout',
- 505 => 'HTTP Version Not Supported',
-);
-
-sub dump {
- my($r, $status) = (shift,shift);
- my $srv = $r->server;
- my $conn = $r->connection;
- my %headers = $r->headers_in;
- my $host = $r->get_remote_host;
- my $cwd = fastcwd;
- $r->status($status);
- $r->content_type("text/html");
- $r->content_language("en");
- $r->no_cache(1);
- $r->header_out("X-Debug-Version" => q$Id$);
- $r->send_http_header;
-
- return 0 if $r->header_only; # should not generate a body
-
- my $title = "$status $StatusCode{$status}";
- $r->write_client(join("\n", "<html>",
- "<head><title>$title</title></head>",
- "<body>", "<h3>$title</h3>", @_,
- "<pre>", ($@ ? "$@\n" : ""), "cwd=$cwd\n"));
-
- for (
- qw(
- method uri protocol path_info filename
- allow_options
- )
- )
- {
- $r->print(sprintf "<b>\$r->%-17s</b> : %s\n", $_, $r->$_() );
- }
-
- for (
- qw(
- server_admin
- server_hostname
- port
- )
- )
- {
- $r->print(sprintf "<b>\$s->%-17s</b> : %s\n", $_, $srv->$_() );
- }
-
- for (
- qw(
- remote_host
- remote_ip
- remote_logname
- user
- auth_type
- )
- )
- {
- $r->print(sprintf "<b>\$c->%-17s</b> : %s\n", $_, $conn->$_() );
- }
-
- my $args = $r->args;
- my %args = $r->args;
- my %in = $r->content;
- $r->print(
- "\n<b>scalar \$r->args :</b> $args\n",
-
- "\n<b>\$r->args:</b>\n",
- (map { " $_ = $args{$_}\n" } sort keys %args),
-
- "\n<b>\$r->content:</b>\n",
- (map { " $_ = $in{$_}\n" } sort keys %in),
-
- "\n<b>\$r->headers_in:</b>\n",
- (map { sprintf " %-12s = %s\n", $_, $headers{$_} } sort keys %headers),
- );
- $r->print("</pre>\n</body></html>\n");
- return 0; #need to give a return status
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Debug - Utilities for debugging embedded perl code
-
-=head1 SYNOPSIS
-
- use Apache::Debug ();
-
- Apache::Debug::dump($r, SERVER_ERROR, "Uh Oh!");
-
-=head1 DESCRIPTION
-
-This module sends what may be helpful debugging info to the client
-rather that the error log.
-
diff --git a/tags/v1_29/lib/Apache/ExtUtils.pm b/tags/v1_29/lib/Apache/ExtUtils.pm
deleted file mode 100644
index f2f6eb0..0000000
--- a/tags/v1_29/lib/Apache/ExtUtils.pm
+++ /dev/null
@@ -1,400 +0,0 @@
-package Apache::ExtUtils;
-
-use strict;
-use Exporter ();
-use IO::File ();
-use File::Copy ();
-use File::Basename qw(basename);
-
-$Apache::ExtUtils::VERSION = '1.04';
-
-my @config_export = qw(%Config ldopts ccopts);
-@Apache::ExtUtils::EXPORT = qw(command_table);
-@Apache::ExtUtils::EXPORT_OK = (qw(pm), @config_export);
-
-my $errsv = "";
-
-sub import {
- my $class = shift;
- my $config_export = join '|', @config_export;
- for my $symbol (@_) {
- #perl -Mlib=lib -MApache::ExtUtils=%Config -e 'print $Config{cc}'
- if ($symbol =~ /$config_export/o) {
- require Config;
- *Apache::ExtUtils::Config = \%Config::Config;
- Config_pm_fixup();
- require ExtUtils::Embed;
- }
- }
- local $Exporter::ExportLevel = 1;
- $class->Exporter::import(@_);
-}
-
-*ldopts = \&ExtUtils::Embed::ldopts;
-*ccopts = \&ExtUtils::Embed::ccopts;
-
-sub Config_pm_fixup {
- eval { require Apache::MyConfig; };
- my %config_fixups = (
- ld => sub { s/(.*)/basename $1/e },
- ccdlflags => sub { s/-R\s+/-R/; },
- ccflags => sub {
- s/-D_GNU_SOURCE//;
- unless ($Apache::MyConfig::Setup{PERL_USELARGEFILES}) {
- s/-D_LARGEFILE_SOURCE\s+-D_FILE_OFFSET_BITS=\d+//;
- }
- },
- );
-
- while (my($key, $sub) = each %config_fixups) {
- local $_ = $Config::Config{$key};
- $sub->();
- (tied %Config::Config)->{$key} = $_;
- }
-}
-
-sub command_table {
- my($class, $cmds);
- if(@_ == 2) {
- ($class, $cmds) = @_;
- }
- else {
- $cmds = shift;
- $class = caller;
- }
- (my $file = $class) =~ s,.*::,,;
-
- eval {
- require "$file.pm"; #so we can see prototypes
- };
- if ($@) {
- unless ($@ =~ /Can.t locate /) {
- $errsv = $@;
- }
- require ExtUtils::testlib;
- ExtUtils::testlib->import;
- require lib;
- my $lib = "lib";#hmm, lib->import + -w == Unquoted string "lib" ...
- $lib->import('./lib');
- eval { require $class };
- if ($@ and $@ !~ /Can.t locate /) {
- $errsv ||= $@;
- }
- }
- unless (-e "$file.xs.orig") {
- File::Copy::cp("$file.xs", "$file.xs.orig");
- }
- my $fh = IO::File->new(">$file.xs") or die $!;
- my $xs = __PACKAGE__->xs_cmd_table($class, $cmds);
- print $fh $xs;
-
- close $fh;
-}
-
-#the first two `$$' are for the parms object and per-directory object
-my $proto_perl2c = {
- '$$$$$' => "TAKE3",
- '$$$$' => "TAKE2",
- '$$$' => "TAKE1",
- '$$' => "NO_ARGS",
- '' => "NO_ARGS",
- '$$$;$' => "TAKE12",
- '$$$$;$' => "TAKE23",
- '$$$;$$' => "TAKE123",
- '$$@' => "ITERATE",
- '$$@;@' => "ITERATE2",
- '$$$;*' => "RAW_ARGS",
-};
-
-my $proto_c2perl = {
- map { $proto_perl2c->{$_}, $_ } keys %$proto_perl2c
-};
-
-sub proto_perl2c { $proto_perl2c }
-sub proto_c2perl { $proto_c2perl }
-
-sub cmd_info {
- my($name, $subname, $info, $args_how) = @_;
- return <<EOF;
-static mod_perl_cmd_info cmd_info_$name = {
-"$subname", "$info",
-};
-EOF
-}
-
-sub xs_cmd_table {
- my($self, $class, $cmds) = @_;
- (my $modname = $class) =~ s/::/__/g;
- (my $pmname = $class) =~ s,::,/,g;
- $pmname .= '.pm';
-
- my $cmdtab = "";
- my $infos = "";
-
- for my $cmd (@$cmds) {
- my($name, $sub, $cmd_data, $req_override, $args_how, $proto, $desc);
- my $hash;
- if(ref($cmd) eq "ARRAY") {
- ($name,$desc) = @$cmd;
- }
- elsif(ref($cmd) eq "HASH") {
- $name = $cmd->{name};
- $sub = $cmd->{func} || $cmd->{name};
- $sub = join '::', $class, $sub unless defined &$sub;
- $cmd_data = $cmd->{cmd_data};
- $req_override = $cmd->{req_override};
- $desc = $cmd->{errmsg};
- $args_how = $cmd->{args_how};
- }
- else {
- $name = $cmd;
- }
- $name ||= $sub;
- my $realname = $name;
- if ($name =~ s/[\<\>]//g && !$cmd->{func}) {
- if($name =~ s:^/::) {
- $name .= "_END";
- }
- $sub = join '::', $class, $name;
- }
- $sub ||= join '::', $class, $name;
- $req_override ||= "OR_ALL";
- my $meth = $class->can($name) if $name;
-
- if(not $args_how and ($meth || defined(&$sub))) {
- if(defined($proto = prototype($meth || \&{$sub}))) {
- #extra $ is for config data
- $args_how = $proto_perl2c->{$proto};
- }
- else {
- $args_how ||= "TAKE123";
- }
- }
- $desc ||= "1-3 value(s) for $name";
- unless ($args_how) {
- $errsv ||= $@;
- die "Can't determine prototype for `$sub': $errsv";
- }
- (my $cname = $name) =~ s/\W/_/g;
- $infos .= cmd_info($cname, $sub, $cmd_data, $args_how);
- $cmdtab .= <<EOF;
-
- { "$realname", perl_cmd_perl_$args_how,
- (void*)&cmd_info_$cname,
- $req_override, $args_how, "$desc" },
-EOF
- }
-
- my $dir_merger = $class->can('DIR_MERGE') ?
- "perl_perl_merge_dir_config" : "NULL";
-
- my $dir_create = $class->can('DIR_CREATE') ?
- "perl_perl_create_dir_config" : "NULL";
-
- my $server_merger = $class->can('SERVER_MERGE') ?
- "perl_perl_merge_srv_config" : "NULL";
-
- my $server_create = $class->can('SERVER_CREATE') ?
- "perl_perl_create_srv_config" : "NULL";
-
- return <<EOF;
-#include "modules/perl/mod_perl.h"
-
-static mod_perl_perl_dir_config *newPerlConfig(pool *p)
-{
- mod_perl_perl_dir_config *cld =
- (mod_perl_perl_dir_config *)
- palloc(p, sizeof (mod_perl_perl_dir_config));
- cld->obj = Nullsv;
- cld->pclass = "$class";
- register_cleanup(p, cld, perl_perl_cmd_cleanup, null_cleanup);
- return cld;
-}
-
-static void *create_dir_config_sv (pool *p, char *dirname)
-{
- return newPerlConfig(p);
-}
-
-static void *create_srv_config_sv (pool *p, server_rec *s)
-{
- return newPerlConfig(p);
-}
-
-static void stash_mod_pointer (char *class, void *ptr)
-{
- SV *sv = newSV(0);
- sv_setref_pv(sv, NULL, (void*)ptr);
- hv_store(perl_get_hv("Apache::XS_ModuleConfig",TRUE),
- class, strlen(class), sv, FALSE);
-}
-
-$infos
-
-static command_rec mod_cmds[] = {
- $cmdtab
- { NULL }
-};
-
-module MODULE_VAR_EXPORT XS_${modname} = {
- STANDARD_MODULE_STUFF,
- NULL, /* module initializer */
- create_dir_config_sv, /* per-directory config creator */
- $dir_merger, /* dir config merger */
- create_srv_config_sv, /* server config creator */
- $server_merger, /* server config merger */
- mod_cmds, /* command table */
- NULL, /* [7] list of handlers */
- NULL, /* [2] filename-to-URI translation */
- NULL, /* [5] check/validate user_id */
- NULL, /* [6] check user_id is valid *here* */
- NULL, /* [4] check access by host address */
- NULL, /* [7] MIME type checker/setter */
- NULL, /* [8] fixups */
- NULL, /* [10] logger */
- NULL, /* [3] header parser */
- NULL, /* process initializer */
- NULL, /* process exit/cleanup */
- NULL, /* [1] post read_request handling */
-};
-
-#define this_module "$pmname"
-
-static void remove_module_cleanup(void *data)
-{
- if (find_linked_module("$class")) {
- /* need to remove the module so module index is reset */
- remove_module(&XS_${modname});
- }
- if (data) {
- /* make sure BOOT section is re-run on restarts */
- (void)hv_delete(GvHV(incgv), this_module,
- strlen(this_module), G_DISCARD);
- if (dowarn) {
- /* avoid subroutine redefined warnings */
- perl_clear_symtab(gv_stashpv("$class", FALSE));
- }
- }
-}
-
-MODULE = $class PACKAGE = $class
-
-PROTOTYPES: DISABLE
-
-BOOT:
- XS_${modname}.name = "$class";
- add_module(&XS_${modname});
- stash_mod_pointer("$class", &XS_${modname});
- register_cleanup(perl_get_startup_pool(), (void *)1,
- remove_module_cleanup, null_cleanup);
-
-void
-END()
-
- CODE:
- remove_module_cleanup(NULL);
-EOF
-}
-
-#perl -MApache::ExtUtils=pm -e pm -- Apache::Foo
-sub pm {
- my($class) = @_ ? @_ : @ARGV;
- (my $name = $class) =~ s/.*::(\w+)$/$1/;
- write_pm($class, $name);
- write_makepl($class, $name);
-}
-
-sub outfh {
- my($file) = @_;
-
- my $fh = local *FH;
- if (-e $file) {
- die "$file exists";
- }
- open $fh, ">$file" or die "open $file: $!";
- print STDERR "writing $file\n";
- return $fh;
-}
-
-sub write_pm {
- my($class, $name) = @_;
- my $fh = outfh("$name.pm");
- print $fh <<EOF;
-package $class;
-
-use strict;
-use Apache::ModuleConfig ();
-use DynaLoader ();
-
-if(\$ENV{MOD_PERL}) {
- no strict;
- \$VERSION = '1.00';
- \@ISA = qw(DynaLoader);
- __PACKAGE__->bootstrap(\$VERSION);
-}
-
-sub DirectiveName (\$\$\$) {
- my(\$cfg, \$parms, \$arg) = \@_;
- my \$scfg = Apache::ModuleConfig->get(\$parms->server);
-
-}
-
-1;
-__END__
-EOF
- close $fh or die $!;
-}
-
-sub write_makepl {
- my($class, $name) = @_;
-
- my $fh = outfh("Makefile.PL");
- print $fh <<EOF;
-package $class;
-
-use ExtUtils::MakeMaker;
-
-use Apache::ExtUtils qw(command_table);
-use Apache::src ();
-
-my \@directives = (
- {
- name => 'DirectiveName',
- errmsg => 'the syntax error message',
- args_how => 'TAKE1',
- req_override => 'OR_ALL',
- }
- );
-
-command_table(\\\@directives);
-
-WriteMakefile(
- 'NAME' => __PACKAGE__,
- 'VERSION_FROM' => '$name.pm',
- 'INC' => Apache::src->new->inc,
- );
-EOF
- close $fh or die $!;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::ExtUtils - Utils for Apache:C/Perl glue
-
-=head1 SYNOPSIS
-
- use Apache::ExtUtils ();
-
-=head1 DESCRIPTION
-
-Under constuction, all here subject to change.
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-
diff --git a/tags/v1_29/lib/Apache/FakeRequest.pm b/tags/v1_29/lib/Apache/FakeRequest.pm
deleted file mode 100644
index 7188c8a..0000000
--- a/tags/v1_29/lib/Apache/FakeRequest.pm
+++ /dev/null
@@ -1,193 +0,0 @@
-package Apache::FakeRequest;
-
-$Apache::FakeRequest::VERSION = "1.00";
-@Apache::FakeRequest::ISA = qw(Apache);
-
-sub new {
- my $class = shift;
- bless {@_}, $class;
-}
-
-sub print { shift; CORE::print(@_) }
-
-#dummy method stubs
-my @methods = qw{
- allow_options
- as_string auth_name auth_type
- basic_http_header bootstrap bytes_sent
- can_stack_handlers cgi_env cgi_header_out
- cgi_var clear_rgy_endav connection
- content content_encoding content_language
- content_type dir_config document_root
- err_header_out err_headers_out exit
- filename get_basic_auth_pw get_remote_host
- get_remote_logname handler hard_timeout
- header_in header_only header_out
- headers_in headers_out hostname import
- internal_redirect_handler is_initial_req is_main
- kill_timeout log_error log_reason
- lookup_file lookup_uri main
- max_requests_per_child method method_number
- module next no_cache
- note_basic_auth_failure notes
- path_info perl_hook post_connection prev
- protocol proxyreq push_handlers
- query_string read read_client_block
- read_length register_cleanup request
- requires reset_timeout rflush
- send_cgi_header send_fd send_http_header
- sent_header seqno server
- server_root_relative soft_timeout status
- status_line subprocess_env taint
- the_request translate_name unescape_url
- unescape_url_info untaint uri warn
- write_client
-};
-
-sub elem {
- my($self, $key, $val) = @_;
- $self->{$key} = $val if $val;
- $self->{$key};
-}
-
-sub parse_args {
- my($wantarray,$string) = @_;
- return unless defined $string and $string;
- if(defined $wantarray and $wantarray) {
- return map {
- s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
- $_;
- } split /[=&;]/, $string, -1;
- }
- $string;
-}
-
-sub args {
- my($r,$val) = @_;
- $r->{args} = $val if $val;
- parse_args(wantarray, $r->{args});
-}
-
-
-{
- my @code;
- for my $meth (@methods) {
- push @code, "sub $meth { shift->elem('$meth', \@_) };";
- }
- eval "@code";
- die $@ if $@;
-}
-
-
-package Apache::Constants;
-
-sub OK { 0 }
-sub DECLINED { -1 }
-sub DONE { -2 }
-
-sub CONTINUE { 100 }
-sub DOCUMENT_FOLLOWS { 200 }
-sub NOT_AUTHORITATIVE { 203 }
-sub HTTP_NO_CONTENT { 204 }
-sub MOVED { 301 }
-sub REDIRECT { 302 }
-sub USE_LOCAL_COPY { 304 }
-sub HTTP_NOT_MODIFIED { 304 }
-sub BAD_REQUEST { 400 }
-sub AUTH_REQUIRED { 401 }
-sub FORBIDDEN { 403 }
-sub NOT_FOUND { 404 }
-sub HTTP_METHOD_NOT_ALLOWED { 405 }
-sub HTTP_NOT_ACCEPTABLE { 406 }
-sub HTTP_LENGTH_REQUIRED { 411 }
-sub HTTP_PRECONDITION_FAILED { 412 }
-sub SERVER_ERROR { 500 }
-sub NOT_IMPLEMENTED { 501 }
-sub BAD_GATEWAY { 502 }
-sub HTTP_SERVICE_UNAVAILABLE { 503 }
-sub HTTP_VARIANT_ALSO_VARIES { 506 }
-
-# methods
-
-sub M_GET { 0 }
-sub M_PUT { 1 }
-sub M_POST { 2 }
-sub M_DELETE { 3 }
-sub M_CONNECT { 4 }
-sub M_OPTIONS { 5 }
-sub M_TRACE { 6 }
-sub M_INVALID { 7 }
-
-# options
-
-sub OPT_NONE { 0 }
-sub OPT_INDEXES { 1 }
-sub OPT_INCLUDES { 2 }
-sub OPT_SYM_LINKS { 4 }
-sub OPT_EXECCGI { 8 }
-sub OPT_UNSET { 16 }
-sub OPT_INCNOEXEC { 32 }
-sub OPT_SYM_OWNER { 64 }
-sub OPT_MULTI { 128 }
-sub OPT_ALL { 15 }
-
-# satisfy
-
-sub SATISFY_ALL { 0 }
-sub SATISFY_ANY { 1 }
-sub SATISFY_NOSPEC { 2 }
-
-# remotehost
-
-sub REMOTE_HOST { 0 }
-sub REMOTE_NAME { 1 }
-sub REMOTE_NOLOOKUP { 2 }
-sub REMOTE_DOUBLE_REV { 3 }
-
-
-
-sub MODULE_MAGIC_NUMBER { "The answer is 42" }
-sub SERVER_VERSION { "1.x" }
-sub SERVER_BUILT { "199908" }
-
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::FakeRequest - fake request object for debugging
-
-=head1 SYNOPSIS
-
- use Apache::FakeRequest;
- my $request = Apache::FakeRequest->new(method_name => 'value', ...);
-
-
-=head1 DESCRIPTION
-
-B<Apache::FakeRequest> is used to set up an empty Apache request
-object that can be used for debugging. The B<Apache::FakeRequest>
-methods just set internal variables of the same name as the method and
-return the value of the internal variables. Initial values for
-methods can be specified when the object is created. The I<print>
-method prints to STDOUT.
-
-Subroutines for Apache constants are also defined so that using
-B<Apache::Constants> while debugging works, although the values of the
-constants are hard-coded rather than extracted from the Apache source
-code.
-
- #!/usr/bin/perl
-
- use Apache::FakeRequest ();
- use mymodule ();
-
- my $request = Apache::FakeRequest->new('get_remote_host'=>'foobar.com');
- mymodule::handler($request);
-
-=head1 AUTHORS
-
-Doug MacEachern, with contributions from Andrew Ford <A.Ford@ford-mason.co.uk>.
-
diff --git a/tags/v1_29/lib/Apache/Include.pm b/tags/v1_29/lib/Apache/Include.pm
deleted file mode 100644
index 9502a9d..0000000
--- a/tags/v1_29/lib/Apache/Include.pm
+++ /dev/null
@@ -1,84 +0,0 @@
-package Apache::Include;
-use Apache::Registry ();
-
-$VERSION = "1.00";
-
-sub handler {
- my($r, $uri) = (shift,shift);
- %ENV = $r->cgi_env;
- my($ouri,$fname) = ($r->uri, $r->filename);
- $r->uri($uri);
- $r->translate_name;
- $r->Apache::Registry::handler(@_);
- $r->uri($ouri); $r->filename($fname); #reset
- return 0;
-
-# hmm, this should work, but alloc.c:chk_on_blk_list()
-# will fprintf (stderr, "Ouch! Freeing free block\n"); exit(1);
-# my $subr = $r->lookup_uri($uri);
-# $subr->Apache::Registry::handler(@_);
-# return $subr->status;
-}
-
-sub virtual {
- my($self, $uri, $r) = @_;
- $r ||= Apache->request;
- my $subr = $r->lookup_uri($uri);
- $subr->header_in("Content-length" => "0");
- $subr->run;
- return $subr->status;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Include - Utilities for mod_perl/mod_include integration
-
-=head1 SYNOPSIS
-
- <!--#perl sub="Apache::Include" arg="/perl/ssi.pl" -->
-
-
-=head1 DESCRIPTION
-
-The B<Apache::Include> module provides a handler, making it simple to
-include Apache::Registry scripts with the mod_include perl directive.
-
-Apache::Registry scripts can also be used in mod_include parsed
-documents using 'virtual include'.
-
-=head1 METHODS
-
-=over 4
-
-=item Apache::Include->virtual($uri)
-
-The C<virtual> method may be called to include the output of a given
-uri in your Perl scripts. Example:
-
- use Apache::Include ();
-
- print "Content-type: text/html\n\n";
-
- print "before include\n";
-
- my $uri = "/perl/env.pl";
-
- Apache::Include->virtual($uri);
-
- print "after include\n";
-
-=back
-
-=head1 SEE ALSO
-
-perl(1), mod_perl(3), mod_include
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-
diff --git a/tags/v1_29/lib/Apache/Opcode.pm b/tags/v1_29/lib/Apache/Opcode.pm
deleted file mode 100644
index d5b4f0e..0000000
--- a/tags/v1_29/lib/Apache/Opcode.pm
+++ /dev/null
@@ -1,122 +0,0 @@
-package Apache::Opcode;
-
-use strict;
-
-my $Mask = read_opmask(\*DATA);
-
-sub __NOTYET__handler {
- my $r = shift;
- my $mask;
- if(my $opcodes = $r->dir_config("Opcodes")) {
- my $file = $r->server_root_relative($opcodes);
- if(-e $file) {
- $mask = $file;
- }
- else {
- my @opnames = split /\s+/, $opcodes;
- $mask = \@opnames;
- }
- }
- else {
- $mask = \$Mask;
- }
- return -1; #DECLINED
-}
-
-sub read_opmask {
- require Opcode;
- my $fh = shift;
- my $mask;
- while (<$fh>) {
- chomp;
- s/^\s+//;s/\s+$//;
- s/^#.*//;
- next unless /\w+/;
- #warn "adding $_\n";
- $mask |= Opcode::opset($_);
- }
- return $mask;
-}
-
-sub gen_op_mask {
- require MIME::Base64;
- my $mask;
- if(@ARGV) {
- local *FH;
- open FH, $ARGV[0] or die "can't open $ARGV[0] $!";
- $mask = read_opmask(\*FH);
- close FH;
- }
- else {
- $mask = $Mask;
- }
- printf qq{
-static char *MP_op_mask = "%s";
-}, MIME::Base64::encode($mask);
-}
-
-1;
-
-__DATA__
-backtick
-glob
-open
-close
-pipe_op
-fileno
-umask
-dbmopen
-dbmclose
-getc
-read
-enterwrite
-leavewrite
-sysopen
-sysseek
-sysread
-syswrite
-send
-recv
-socket
-sockpair
-bind
-connect
-listen
-accept
-shutdown
-chown
-chroot
-unlink
-chmod
-rename
-link
-symlink
-readlink
-mkdir
-rmdir
-open_dir
-readdir
-telldir
-seekdir
-rewinddir
-closedir
-fork
-wait
-waitpid
-system
-exec
-kill
-alarm
-sleep
-shmget
-shmctl
-shmread
-shmwrite
-msgget
-msgctl
-msgsnd
-msgrcv
-semget
-semctl
-semop
-syscall
diff --git a/tags/v1_29/lib/Apache/Options.pm b/tags/v1_29/lib/Apache/Options.pm
deleted file mode 100644
index 81c06f8..0000000
--- a/tags/v1_29/lib/Apache/Options.pm
+++ /dev/null
@@ -1,45 +0,0 @@
-package Apache::Options;
-use Apache::Constants ();
-@ISA = qw(Apache::Constants);
-*EXPORT = $Apache::Constants::EXPORT_TAGS{options};
-$VERSION = '1.61';
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Options - OPT_* defines from httpd_core.h
-
-=head1 SYNOPSIS
-
- use Apache::Options;
-
-=head1 DESCRIPTION
-
-The B<Apache::Options> module will export the following bitmask
-constants:
-
- OPT_NONE
- OPT_INDEXES
- OPT_INCLUDES
- OPT_SYMLINKS
- OPT_EXECCGI
- OPT_UNSET
- OPT_INCNOEXEC
- OPT_SYM_OWNER
- OPT_MULTI
- OPT_ALL
-
-These constants can be used to check the return value from
-Apache->request->allow_options() method.
-
-This module is simply a stub which imports from L<Apache::Constants>,
-just as if you had said C<use Apache::Constants ':options';>.
-
-=head1 SEE ALSO
-
-L<Apache>, L<Apache::Constants>
-
-=cut
diff --git a/tags/v1_29/lib/Apache/PerlRun.pm b/tags/v1_29/lib/Apache/PerlRun.pm
deleted file mode 100644
index b0ce359..0000000
--- a/tags/v1_29/lib/Apache/PerlRun.pm
+++ /dev/null
@@ -1,435 +0,0 @@
-package Apache::PerlRun;
-
-use strict;
-use vars qw($Debug);
-use Apache::Constants qw(:common &OPT_EXECCGI);
-
-BEGIN {
- OPT_EXECCGI() if $ENV{MOD_PERL}; #preload, :common are alread pre-loaded
-}
-
-unless (defined $Apache::Registry::NameWithVirtualHost) {
- $Apache::Registry::NameWithVirtualHost = 1;
-}
-
-unless (defined $Apache::Registry::MarkLine) {
- $Apache::Registry::MarkLine = 1;
-}
-
-$Debug ||= 0;
-my $Is_Win32 = $^O eq "MSWin32";
-
-sub new {
- my($class, $r) = @_;
- my $filename = $r->filename;
- $r->warn("Apache::PerlRun->new for $filename in process $$")
- if $Debug && $Debug & 4;
-
- return bless {r=>$r}, $class;
-}
-
-sub xlog_error {
- my($r, $msg) = @_;
- $r->log_error($msg);
- $r->notes('error-notes', $msg);
-}
-
-sub can_compile {
- my($pr) = @_;
- my $r = $pr->{r};
- my $filename = $r->filename;
-#XXX reported problems with $r->finfo
-# if (-r $r->finfo && -s _) {
- if (-r $filename && -s _) {
- if (!($r->allow_options & OPT_EXECCGI)) {
- $r->log_reason("Options ExecCGI is off in this directory",
- $filename);
- return FORBIDDEN;
- }
- if (-d _) {
- return DECLINED;
- }
- unless (-x _ or $Is_Win32) {
- $r->log_reason("file permissions deny server execution",
- $filename);
- return FORBIDDEN;
- }
-
- $pr->{'mtime'} = -M _;
- return wantarray ? (OK, $pr->{'mtime'}) : OK;
- }
- xlog_error($r, "$filename not found or unable to stat");
- return NOT_FOUND;
-}
-
-sub mark_line {
- my $filename = shift->{r}->filename;
- return $Apache::Registry::MarkLine ?
- "\n#line 1 $filename\n" : "";
-}
-
-sub sub_wrap {
- my($pr, $code, $package) = @_;
-
- $code ||= $pr->{'code'};
- $package ||= $pr->{'namespace'};
-
- my $line = $pr->mark_line;
- my $sub = join(
- '',
- 'package ',
- $package,
- ';use Apache qw(exit);',
- 'sub handler {',
- $line,
- $$code,
- "\n}", # last line comment without newline?
- );
- $pr->{'sub'} = \$sub;
-}
-
-sub cached {
- my($pr) = @_;
- exists $Apache::Registry->{$pr->namespace}{'mtime'};
-}
-
-sub should_compile {
- my($pr, $package, $mtime) = @_;
- $package ||= $pr->{'namespace'};
- $mtime ||= $pr->{'mtime'};
- !($pr->cached
- &&
- $Apache::Registry->{$package}{'mtime'} <= $mtime);
-}
-
-sub set_mtime {
- my($pr, $mtime, $package) = @_;
- $mtime ||= $pr->{'mtime'};
- $package ||= $pr->{'namespace'};
- $Apache::Registry->{$package}{'mtime'} = $mtime;
-}
-
-sub compile {
- my($pr, $eval) = @_;
- $eval ||= $pr->{'sub'};
- # don't use $r, but something else, so the script won't use
- # inherited $r by mistake
- my $_r = $pr->{r};
- $_r->clear_rgy_endav;
- $_r->log_error("Apache::PerlRun->compile") if $Debug && $Debug & 4;
- Apache->untaint($$eval);
- {
- no strict; #so eval'd code doesn't inherit our bits
- eval $$eval;
- }
- $_r->stash_rgy_endav;
- return $pr->error_check;
-}
-
-sub run {
- my $pr = shift;
- my $package = $pr->{'namespace'};
- my $r = $pr->{r};
-
- my $rc = OK;
- my $cv = \&{"$package\::handler"};
-
- my $oldwarn = $^W;
- eval { $rc = &{$cv}($r, @_) } if $r->seqno;
- $pr->{status} = $rc;
- $^W = $oldwarn;
-
- my $errsv = "";
- if($@) {
- $errsv = $@;
- $@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
- $@{$r->uri} = $errsv;
- }
-
- if($errsv) {
- xlog_error($r, $errsv);
- return SERVER_ERROR;
- }
-
- return wantarray ? (OK, $rc) : OK;
-}
-
-sub status {
- shift->{r}->status;
-}
-
-sub namespace_from {
- my($pr) = @_;
- my $r = $pr->{r};
-
- my $uri = $r->uri;
-
- $r->log_error(sprintf "Apache::PerlRun->namespace escaping %s",
- $uri) if $Debug && $Debug & 4;
-
- my $path_info = $r->path_info;
- my $script_name = $path_info && $uri =~ /$path_info$/ ?
- substr($uri, 0, length($uri)-length($path_info)) :
- $uri;
-
- if ($Apache::Registry::NameWithVirtualHost && $r->server->is_virtual) {
- my $name = $r->get_server_name;
- $script_name = join "", $name, $script_name if $name;
- }
-
- $script_name =~ s:/+$:/__INDEX__:;
-
- return $script_name;
-}
-
-sub namespace {
- my($pr, $root) = @_;
- return $pr->{'namespace'} if $pr->{'namespace'};
-
- my $script_name = $pr->namespace_from;
-
- # Escape everything into valid perl identifiers
- $script_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%2x",unpack("C",$1))/eg;
-
- # second pass cares for slashes and words starting with a digit
- $script_name =~ s{
- (/+) # directory
- (\d?) # package's first character
- }[
- "::" . (length $2 ? sprintf("_%2x",unpack("C",$2)) : "")
- ]egx;
-
- $Apache::Registry::curstash = $script_name;
-
- $root ||= "Apache::ROOT";
-
- $pr->{r}->log_error("Apache::PerlRun->namespace: package $root$script_name")
- if $Debug && $Debug & 4;
-
- $pr->{'namespace'} = $root.$script_name;
- return $pr->{'namespace'};
-}
-
-sub readscript {
- my $pr = shift;
- $pr->{'code'} = $pr->{r}->slurp_filename;
-}
-
-sub error_check {
- my $pr = shift;
- if ($@ and substr($@,0,4) ne " at ") {
- $pr->{r}->log_error("PerlRun: `$@'");
- $pr->{r}->notes('error-notes', $@);
- $@{$pr->{r}->uri} = $@;
- $@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
- return SERVER_ERROR;
- }
- return OK;
-}
-
-#XXX not good enough yet
-my(%switches) = (
- 'T' => sub {
- Apache::warn("Apache::PerlRun: T switch ignored, ".
- "enable with 'PerlTaintCheck On'\n")
- unless $Apache::__T; "";
- },
- 'w' => sub { 'BEGIN {$^W = 1;}; $^W = 1;' },
-);
-
-sub parse_cmdline {
- my($pr, $code) = @_;
- $code ||= $pr->{'code'};
- my($line) = $$code =~ /^(.*)$/m;
- my(@cmdline) = split /\s+/, $line;
- return $code unless @cmdline;
- return $code unless shift(@cmdline) =~ /^\#!/;
- my($s, @s, $prepend);
- $prepend = "";
- for $s (@cmdline) {
- next unless $s =~ s/^-//;
- last if substr($s,0,1) eq "-";
- for (split //, $s) {
- next unless $switches{$_};
- #print STDERR "parsed `$_' switch\n";
- $prepend .= &{$switches{$_}};
- }
- }
- $$code =~ s/^/$prepend/ if $prepend;
- return $code;
-}
-
-sub chdir_file {
- my($pr, $dir) = @_;
- my $r = $pr->{r};
- $r->chdir_file($dir ? $dir : $r->filename);
-}
-
-sub set_script_name {
- *0 = \(shift->{r}->filename);
-}
-
-sub handler ($$) {
- my($class, $r);
- if (@_ >= 2) {
- ($class, $r) = (shift, shift);
- }
- else {
- ($class, $r) = (__PACKAGE__, shift);
- }
-
- my $pr = $class->new($r);
- my $rc = $pr->can_compile;
- return $rc unless $rc == OK;
-
- my $package = $pr->namespace;
- my $code = $pr->readscript;
- $pr->parse_cmdline($code);
-
- $pr->set_script_name;
- $pr->chdir_file;
- my $line = $pr->mark_line;
-
- #make sure this hooks are restored to their original state
- local $SIG{__DIE__} = $SIG{__DIE__};
- local $SIG{__WARN__} = $SIG{__WARN__};
-
- my %orig_inc = %INC;
- my $eval = join '',
- 'package ',
- $package,
- ';use Apache qw(exit);',
- $line,
- $$code,
- "\n";
- $rc = $pr->compile(\$eval);
-
- $pr->chdir_file("$Apache::Server::CWD/");
- #in case .pl files do not declare package ...;
- for (keys %INC) {
- next if $orig_inc{$_};
- next if /\.pm$/;
- delete $INC{$_};
- }
-
- if(my $opt = $r->dir_config("PerlRunOnce")) {
- $r->child_terminate if lc($opt) eq "on";
- }
-
- $pr->flush_namespace($package);
-
- return $rc;
-}
-
-BEGIN {
- if ($] < 5.006) {
- $INC{'warnings.pm'} = __FILE__;
- *warnings::unimport = sub {};
- }
-}
-
-sub flush_namespace {
- my($self, $package) = @_;
- $package ||= $self->namespace;
-
- no strict 'refs';
- my $tab = \%{$package.'::'};
-
- for (keys %$tab) {
- my $fullname = join '::', $package, $_;
- #code/hash/array/scalar might be imported
- #make sure the gv does not point elsewhere
- #before undefing each
- if (%$fullname) {
- *{$fullname} = {};
- undef %$fullname;
- }
- if (@$fullname) {
- *{$fullname} = [];
- undef @$fullname;
- }
- if ($$fullname) {
- my $tmp; #argh, no such thing as an anonymous scalar
- *{$fullname} = \$tmp;
- undef $$fullname;
- }
- if (defined &$fullname) {
- no warnings;
- local $^W = 0;
- if (defined(my $p = prototype $fullname)) {
- *{$fullname} = eval "sub ($p) {}";
- }
- else {
- *{$fullname} = sub {};
- }
- undef &$fullname;
- }
- if (*{$fullname}{IO}) {
- if (fileno $fullname) {
- close $fullname;
- }
- }
- }
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::PerlRun - Run unaltered CGI scripts under mod_perl
-
-=head1 SYNOPSIS
-
- #in httpd.conf
-
- Alias /cgi-perl/ /perl/apache/scripts/
- PerlModule Apache::PerlRun
-
- <Location /cgi-perl>
- SetHandler perl-script
- PerlHandler Apache::PerlRun
- Options +ExecCGI
- #optional
- PerlSendHeader On
- ...
- </Location>
-
-=head1 DESCRIPTION
-
-This module's B<handler> emulates the CGI environment,
-allowing programmers to write scripts that run under CGI or
-mod_perl without change. Unlike B<Apache::Registry>, the
-B<Apache::PerlRun> handler does not cache the script inside of a
-subroutine. Scripts will be "compiled" every request. After the
-script has run, it's namespace is flushed of all variables and
-subroutines.
-
-The B<Apache::Registry> handler is much faster than
-B<Apache::PerlRun>. However, B<Apache::PerlRun> is much faster than
-CGI as the fork is still avoided and scripts can use modules which
-have been pre-loaded at server startup time. This module is meant for
-"Dirty" CGI Perl scripts which relied on the single request lifetime
-of CGI and cannot run under B<Apache::Registry> without cleanup.
-
-=head1 CAVEATS
-
-If your scripts still have problems running under the I<Apache::PerlRun>
-handler, the I<PerlRunOnce> option can be used so that the process running
-the script will be shutdown. Add this to your httpd.conf:
-
- <Location ...>
- PerlSetVar PerlRunOnce On
- ...
- </Location>
-
-=head1 SEE ALSO
-
-perl(1), mod_perl(3), Apache::Registry(3)
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-=cut
diff --git a/tags/v1_29/lib/Apache/PerlSections.pm b/tags/v1_29/lib/Apache/PerlSections.pm
deleted file mode 100644
index f00122c..0000000
--- a/tags/v1_29/lib/Apache/PerlSections.pm
+++ /dev/null
@@ -1,173 +0,0 @@
-package Apache::PerlSections;
-
-use strict;
-$Apache::PerlSections::VERSION = '1.61';
-
-use Devel::Symdump ();
-use Data::Dumper ();
-
-sub store {
- require IO::File;
-
- my($self, $file) = @_;
- my $fh = IO::File->new(">$file") or die "can't open $file $!\n";
-
- $fh->print($self->dump);
-
- $fh->close;
-}
-
-sub dump {
- my @retval = "package Apache::ReadConfig;";
-
- local $Data::Dumper::Indent = 1;
-
- my $stab = Devel::Symdump->rnew('Apache::ReadConfig');
-
- my %dump = (
- hashes => 'HASH',
- scalars => 'SCALAR',
- arrays => 'ARRAY',
- );
-
- while(my($meth,$type) = each %dump) {
- no strict 'refs';
- push @retval, "#$meth:\n";
- for my $name ($stab->$meth()) {
- my $s = Data::Dumper->Dump([*$name{$type}], ['*'.$name]);
- $s =~ s/Apache:{0,2}ReadConfig:://;
- if($s =~ /^\$/) {
- $s =~ s/= \\/= /; #whack backwack
- }
- push @retval, $s unless $s =~ /= (undef|\(\));$/;
- }
- }
-
- return join "\n", @retval, "1;", "__END__", "";
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::PerlSections - Utilities for work with <Perl> sections
-
-=head1 SYNOPSIS
-
- use Apache::PerlSections ();
-
-=head1 DESCRIPTION
-
-It is possible to configure you server entirely in Perl using
-<Perl> sections in I<httpd.conf>. This module is here to help
-you with such a task.
-
-=head1 METHODS
-
-=over 4
-
-=item dump
-
-This method will dump out all the configuration variables mod_perl
-will be feeding the the apache config gears. The output is suitable
-to read back in via C<eval>.
-
-Example:
-
- <Perl>
-
- use Apache::PerlSections ();
-
- $Port = 8529;
-
- $Location{"/perl"} = {
- SetHandler => "perl-script",
- PerlHandler => "Apache::Registry",
- Options => "ExecCGI",
- };
-
- @DocumentIndex = qw(index.htm index.html);
-
- $VirtualHost{"www.foo.com"} = {
- DocumentRoot => "/tmp/docs",
- ErrorLog => "/dev/null",
- Location => {
- "/" => {
- Allowoverride => 'All',
- Order => 'deny,allow',
- Deny => 'from all',
- Allow => 'from foo.com',
- },
- },
- };
-
- print Apache::PerlSections->dump;
-
- </Perl>
-
-This will print something like so:
-
- package Apache::ReadConfig;
- #scalars:
-
- $Port = 8529;
-
- #arrays:
-
- @DocumentIndex = (
- 'index.htm',
- 'index.html'
- );
-
- #hashes:
-
- %Location = (
- '/perl' => {
- PerlHandler => 'Apache::Registry',
- SetHandler => 'perl-script',
- Options => 'ExecCGI'
- }
- );
-
- %VirtualHost = (
- 'www.foo.com' => {
- Location => {
- '/' => {
- Deny => 'from all',
- Order => 'deny,allow',
- Allow => 'from foo.com',
- Allowoverride => 'All'
- }
- },
- DocumentRoot => '/tmp/docs',
- ErrorLog => '/dev/null'
- }
- );
-
- 1;
- __END__
-
-=item store
-
-This method will call the C<dump> method, writing the output
-to a file, suitable to be pulled in via C<require>.
-
-Example:
-
- Apache::PerlSections->store("httpd_config.pl");
-
- require 'httpd_config.pl';
-
-=back
-
-=head1 SEE ALSO
-
-mod_perl(1), Data::Dumper(3), Devel::Symdump(3)
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-
diff --git a/tags/v1_29/lib/Apache/RedirectLogFix.pm b/tags/v1_29/lib/Apache/RedirectLogFix.pm
deleted file mode 100644
index ebb4e58..0000000
--- a/tags/v1_29/lib/Apache/RedirectLogFix.pm
+++ /dev/null
@@ -1,35 +0,0 @@
-package Apache::RedirectLogFix;
-
-use Apache::Constants qw(OK DECLINED REDIRECT);
-
-sub handler {
- my $r = shift->last;
- return DECLINED unless $r->handler && ($r->handler eq "perl-script");
-
- if(my $loc = $r->header_out("Location")) {
- if($r->status == 200 and substr($loc, 0, 1) ne "/") {
- $r->status(REDIRECT);
- return OK
- }
- }
- return DECLINED;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::RedirectLogFix - Properly set redirect status for loggers
-
-=head1 SYNOPSIS
-
-PerlLogHandler Apache::RedirectLogFix
-
-=head1 DESCRIPTION
-
-Due the nature of how mod_perl handles redirects, the status code
-is not properly logged. This module works around that bug until
-mod_perl can deal with this.
-
diff --git a/tags/v1_29/lib/Apache/Registry.pm b/tags/v1_29/lib/Apache/Registry.pm
deleted file mode 100644
index 861a39d..0000000
--- a/tags/v1_29/lib/Apache/Registry.pm
+++ /dev/null
@@ -1,337 +0,0 @@
-package Apache::Registry;
-use Apache ();
-#use strict; #eval'd scripts will inherit hints
-use Apache::Constants qw(:common &OPT_EXECCGI);
-
-BEGIN {
- OPT_EXECCGI() if $ENV{MOD_PERL}; #preload, :common are alread pre-loaded
-}
-
-$Apache::Registry::VERSION = '2.01';
-
-$Apache::Registry::Debug ||= 0;
-# 1 => log recompile in errorlog
-# 2 => Apache::Debug::dump in case of $@
-# 4 => trace pedantically
-Apache->module('Apache::Debug') if $Apache::Registry::Debug;
-
-my $Is_Win32 = $^O eq "MSWin32";
-
-unless (defined $Apache::Registry::NameWithVirtualHost) {
- $Apache::Registry::NameWithVirtualHost = 1;
-}
-unless (defined $Apache::Registry::MarkLine) {
- $Apache::Registry::MarkLine = 1;
-}
-
-sub xlog_error {
- my($r, $msg) = @_;
- $r->log_error($msg);
- $r->notes('error-notes', $msg);
- $@{$r->uri} = $msg;
-}
-
-sub handler {
- my $r = shift;
- if(ref $r) {
- $r->request($r);
- }
- else {
- #warn "Registry args are: ($r, @_)\n";
- $r = Apache->request;
- }
- my $filename = $r->filename;
- #local $0 = $filename; #this core dumps!?
- *0 = \$filename;
- my $oldwarn = $^W;
- $r->log_error("Apache::Registry::handler for $filename in process $$")
- if $Debug && $Debug & 4;
-
- if (-r $filename && -s _) {
- if (-d _) {
- return DECLINED;
- }
- if (!($r->allow_options & OPT_EXECCGI)) {
- $r->log_reason("Options ExecCGI is off in this directory",
- $filename);
- return FORBIDDEN;
- }
- unless (-x _ or $Is_Win32) {
- $r->log_reason("file permissions deny server execution",
- $filename);
- return FORBIDDEN;
- }
-
- my $mtime = -M _;
-
- my $uri = $r->uri;
- # turn into a package name
- $r->log_error(sprintf "Apache::Registry::handler examining %s",
- $uri) if $Debug && $Debug & 4;
- my $path_info = $r->path_info;
- my $script_name = $path_info && $uri =~ /\Q$path_info\E$/ ?
- substr($uri, 0, length($uri)-length($path_info)) :
- $uri;
-
- $script_name =~ s:/+$:/__INDEX__:;
-
- if ($Apache::Registry::NameWithVirtualHost && $r->server->is_virtual) {
- my $name = $r->get_server_name;
- $script_name = join "", $name, $script_name if $name;
- }
-
- # Escape everything into valid perl identifiers
- $script_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%2x",unpack("C",$1))/eg;
-
- # second pass cares for slashes and words starting with a digit
- $script_name =~ s{
- (/+) # directory
- (\d?) # package's first character
- }[
- "::" . (length $2 ? sprintf("_%2x",unpack("C",$2)) : "")
- ]egx;
-
- my $package = "Apache::ROOT$script_name";
- $Apache::Registry::curstash = $script_name;
- $r->log_error("Apache::Registry::handler package $package")
- if $Debug && $Debug & 4;
-
- $r->chdir_file;
-
- if (
- exists $Apache::Registry->{$package}{'mtime'}
- &&
- $Apache::Registry->{$package}{'mtime'} <= $mtime
- ){
- # we have compiled this subroutine already, nothing left to do
- } else {
- $r->log_error("Apache::Registry::handler reading $filename")
- if $Debug && $Debug & 4;
- my $sub = $r->slurp_filename;
- $sub = parse_cmdline($$sub);
-
- # compile this subroutine into the uniq package name
- $r->log_error("Apache::Registry::handler eval-ing") if $Debug && $Debug & 4;
- undef &{"$package\::handler"} unless $Debug && $Debug & 4; #avoid warnings
- if($package->can('undef_functions')) {
- $package->undef_functions;
- }
- $r->clear_rgy_endav($script_name);
-
- my $line = $Apache::Registry::MarkLine ?
- "\n#line 1 $filename\n" : "";
-
- my $eval = join(
- '',
- 'package ',
- $package,
- ';use Apache qw(exit);',
- 'sub handler {',
- $line,
- $sub,
- "\n}", # last line comment without newline?
- );
- compile($eval);
- $r->stash_rgy_endav($script_name);
- if ($@) {
- xlog_error($r, $@);
- return SERVER_ERROR unless $Debug && $Debug & 2;
- return Apache::Debug::dump($r, SERVER_ERROR);
- }
- $r->log_error(qq{Compiled package \"$package\" for process $$})
- if $Debug && $Debug & 1;
- $Apache::Registry->{$package}{'mtime'} = $mtime;
- }
-
- my $old_status = $r->status;
-
- my $cv = \&{"$package\::handler"};
- eval { &{$cv}($r, @_) } if $r->seqno;
- $r->chdir_file("$Apache::Server::CWD/");
- $^W = $oldwarn;
-
- my $errsv = "";
- if($@) {
- $errsv = $@;
- $@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
- $@{$uri} = $errsv;
- }
-
- if($errsv) {
- xlog_error($r, $errsv);
- return SERVER_ERROR unless $Debug && $Debug & 2;
- return Apache::Debug::dump($r, SERVER_ERROR);
- }
-
-# #XXX
-# if(my $loc = $r->header_out("Location")) {
-# if($r->status == 200 and substr($loc, 0, 1) ne "/") {
-# return REDIRECT;
-# }
-# }
- return $r->status($old_status);
- } else {
- xlog_error($r, "$filename not found or unable to stat");
- return NOT_FOUND unless $Debug && $Debug & 2;
- return Apache::Debug::dump($r, NOT_FOUND);
- }
-}
-
-sub compile {
- my $eval = shift;
- Apache->untaint($eval);
- eval $eval;
-}
-
-#XXX not good enough yet
-my(%switches) = (
- 'T' => sub {
- Apache::warn("Apache::Registry: T switch ignored, ".
- "enable with 'PerlTaintCheck On'\n")
- unless $Apache::__T; "";
- },
- 'w' => sub { 'BEGIN {$^W = 1;}; $^W = 1;' },
-);
-
-sub parse_cmdline {
- my $sub = shift;
- my($line) = $sub =~ /^(.*)$/m;
- my(@cmdline) = split /\s+/, $line;
- return $sub unless @cmdline;
- return $sub unless shift(@cmdline) =~ /^\#!/;
- my($s, @s, $prepend);
- $prepend = "";
- for $s (@cmdline) {
- next unless $s =~ s/^-//;
- last if substr($s,0,1) eq "-";
- for (split //, $s) {
- next unless $switches{$_};
- #print STDERR "parsed `$_' switch\n";
- $prepend .= &{$switches{$_}};
- }
- }
- $sub =~ s/^/$prepend/ if $prepend;
- return $sub;
-}
-
-#trick so we show up under CPAN/modules/by-module/CGI/
-package CGI::mod_perl;
-
-sub DESTROY {}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Registry - Run unaltered CGI scrips under mod_perl
-
-=head1 SYNOPSIS
-
- #in httpd.conf
-
- Alias /perl/ /perl/apache/scripts/ #optional
- PerlModule Apache::Registry
-
- <Location /perl>
- SetHandler perl-script
- PerlHandler Apache::Registry
- Options ExecCGI
- </Location>
-
-=head1 DESCRIPTION
-
-URIs in the form of C<http://www.host.com/perl/file.pl> will be
-compiled as the body of a perl subroutine and executed. Each server
-process or 'child' will compile the subroutine once and store it in
-memory. It will recompile it whenever the file is updated on disk.
-Think of it as an object oriented server with each script implementing
-a class loaded at runtime.
-
-The file looks much like a "normal" script, but it is compiled or 'evaled'
-into a subroutine.
-
-Here's an example:
-
- my $r = Apache->request;
- $r->content_type("text/html");
- $r->send_http_header;
- $r->print("Hi There!");
-
-This module emulates the CGI environment,
-allowing programmers to write scripts that run under CGI or
-mod_perl without change. Existing CGI scripts may require some
-changes, simply because a CGI script has a very short lifetime of one
-HTTP request, allowing you to get away with "quick and dirty"
-scripting. Using mod_perl and Apache::Registry requires you to be
-more careful, but it also gives new meaning to the word "quick"!
-
-Be sure to read all mod_perl related documentation for more details,
-including instructions for setting up an environment that looks exactly
-like CGI:
-
- print "Content-type: text/html\n\n";
- print "Hi There!";
-
-Note that each httpd process or "child" must compile each script once,
-so the first request to one server may seem slow, but each request
-there after will be faster. If your scripts are large and/or make use
-of many Perl modules, this difference should be noticeable to the human
-eye.
-
-=head1 SECURITY
-
-Apache::Registry::handler will preform the same checks as mod_cgi
-before running the script.
-
-=head1 ENVIRONMENT
-
-The Apache function `exit' overrides the Perl core built-in function.
-
-The environment variable B<GATEWAY_INTERFACE> is set to C<CGI-Perl/1.1>.
-
-=head1 COMMANDLINE SWITCHES IN FIRST LINE
-
-Normally when a Perl script is run from the command line or under CGI,
-arguments on the `#!' line are passed to the perl interpreter for processing.
-
-Apache::Registry currently only honors the B<-w> switch and will turn
-on warnings using the C<$^W> global variable. Another common switch
-used with CGI scripts is B<-T> to turn on taint checking. This can
-only be enabled when the server starts with the configuration
-directive:
-
- PerlTaintCheck On
-
-However, if taint checking is not enabled, but the B<-T> switch is seen,
-Apache::Registry will write a warning to the error_log.
-
-=head1 DEBUGGING
-
-You may set the debug level with the $Apache::Registry::Debug bitmask
-
- 1 => log recompile in errorlog
- 2 => Apache::Debug::dump in case of $@
- 4 => trace pedantically
-
-=head1 CAVEATS
-
-Apache::Registry makes things look just the CGI environment, however, you
-must understand that this *is not CGI*. Each httpd child will compile
-your script into memory and keep it there, whereas CGI will run it once,
-cleaning out the entire process space. Many times you have heard
-"always use C<-w>, always use C<-w> and 'use strict'".
-This is more important here than anywhere else!
-
-Your scripts cannot contain the __END__ or __DATA__ token to terminate
-compilation.
-
-=head1 SEE ALSO
-
-perl(1), mod_perl(3), Apache(3), Apache::Debug(3)
-
-=head1 AUTHORS
-
-Andreas J. Koenig and Doug MacEachern
-
diff --git a/tags/v1_29/lib/Apache/RegistryBB.pm b/tags/v1_29/lib/Apache/RegistryBB.pm
deleted file mode 100644
index 0a1eace..0000000
--- a/tags/v1_29/lib/Apache/RegistryBB.pm
+++ /dev/null
@@ -1,43 +0,0 @@
-package Apache::RegistryBB;
-
-use strict;
-use vars qw(@ISA);
-use Apache::Constants qw(NOT_FOUND FORBIDDEN OK DECLINED);
-use Apache::RegistryNG ();
-@ISA = qw(Apache::RegistryNG);
-
-#Apache::Registry - Bare-Bones
-#configure like so:
-# PerlModule Apache::RegistryBB
-# <Location /perl>
-# SetHandler perl-script
-# PerlHandler ApacheRegistryBB->handler
-# </Location>
-
-#skip -x, OPT_EXEC, etc. checks
-sub can_compile {
- my $r = shift->{r};
- unless (-r $r->finfo) {
- $r->log_reason("file does not exist");
- return NOT_FOUND;
- }
- if (-d _) {
- $r->log_reason("attempt to invoke directory as script");
- return DECLINED;
- }
- return OK;
-}
-
-#only cache once, don't re-compile if updated on disk
-sub should_compile {
- not shift->cached;
-}
-
-#don't chdir() to the script file directory
-sub chdir_file {
- #noop
-}
-
-1;
-
-__END__
diff --git a/tags/v1_29/lib/Apache/RegistryLoader.pm b/tags/v1_29/lib/Apache/RegistryLoader.pm
deleted file mode 100644
index ae83e24..0000000
--- a/tags/v1_29/lib/Apache/RegistryLoader.pm
+++ /dev/null
@@ -1,178 +0,0 @@
-package Apache::RegistryLoader;
-use 5.003_97;
-use mod_perl 1.01;
-use strict;
-use Apache::Registry ();
-use Apache::Constants qw(OPT_EXECCGI);
-@Apache::RegistryLoader::ISA = qw(Apache::Registry);
-$Apache::RegistryLoader::VERSION = '1.91';
-
-sub new {
- my $class = shift;
- bless {@_} => $class;
-}
-
-sub handler {
- my($self, $uri, $filename, $virthost) = @_;
-
- Apache::warn(__PACKAGE__.qq{ failed, reason: uri is a required parameter}),
- return
- unless defined $uri and $uri;
-
- if ($filename) {
- Apache::warn(__PACKAGE__.qq{: Cannot find a filename [$filename]}),
- return
- unless -e $filename;
- } else {
-
- # try to translate URI->filename
- if (my $func = $self->{trans}) {
- no strict 'refs';
- $filename = &{$func}($uri);
- Apache::warn(__PACKAGE__.
- qq{: Translation of uri [$uri] to filename failed [tried: $filename]}),
- return
- unless -e $filename;
- } else {
- # try to guess
- (my $guess = $uri) =~ s,^/,,;
- $filename = Apache->server_root_relative($guess);
- Apache::warn(__PACKAGE__.
- qq{: No 'trans' sub was passed: tried to guess the filename [tried: $filename], but failed, for uri [$uri]}),
- return
- unless -e $filename;
- }
- }
-
- # warn "*** RegistryLoader: uri=$uri, filename=$filename\n";
-
- my $r = bless {
- uri => $uri,
- filename => $filename,
- } => ref($self) || $self;
-
- $r->{virthost} = $virthost if defined $virthost;
-
- $r->SUPER::handler;
-}
-
-#override Apache class methods called by Apache::Registry
-#normally only available at request-time via blessed request_rec pointer
-sub slurp_filename {
- my $r = shift;
- my $filename = $r->filename;
- my $fh = Apache::gensym(__PACKAGE__);
- open $fh, $filename;
- local $/;
- my $code = <$fh>;
- return \$code;
-}
-
-sub get_server_name { shift->{virthost} }
-sub filename { shift->{filename} }
-sub uri { shift->{uri} }
-sub status {200}
-sub path_info {}
-sub log_error { shift; die @_ if $@; warn @_; }
-*log_reason = \&log_error;
-sub allow_options { OPT_EXECCGI } #will be checked again at run-time
-sub clear_rgy_endav {}
-sub stash_rgy_endav {}
-sub request {}
-sub seqno {0}
-sub server { shift }
-sub is_virtual { exists shift->{virthost} }
-sub header_out {""}
-sub chdir_file {
- my($r, $file) = @_;
- $file ||= $r->filename;
- Apache::chdir_file(undef, $file);
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::RegistryLoader - Compile Apache::Registry scripts at server startup
-
-=head1 SYNOPSIS
-
- #in PerlScript
-
- use Apache::RegistryLoader ();
-
- my $r = Apache::RegistryLoader->new;
-
- $r->handler($uri, $filename);
-
- $r->handler($uri, $filename, $virtual_hostname);
-
-=head1 DESCRIPTION
-
-This modules allows compilation of B<Apache::Registry> scripts at
-server startup. The script's handler routine is compiled by the
-parent server, of which children get a copy. The
-B<Apache::RegistryLoader> C<handler> method takes arguments of C<uri>
-and the C<filename>. URI to filename translation normally doesn't
-happen until HTTP request time, so we're forced to roll our own
-translation.
-
-If filename is omitted and a C<trans> routine was not
-defined, the loader will try using the B<uri> relative to
-B<ServerRoot>. Example:
-
- #in httpd.conf
- ServerRoot /opt/www/apache
- Alias /perl/ /opt/www/apache/perl
-
- #in PerlScript
- use Apache::RegistryLoader ();
-
- #/opt/www/apache/perl/test.pl
- #is the script loaded from disk here:
- Apache::RegistryLoader->new->handler("/perl/test.pl");
-
-To make the loader smarter about the uri->filename translation, you may
-provide the C<new> method with a C<trans> function to translate the
-uri to filename.
-
-The following example will pre-load all files ending with C<.pl> in the
-B<perl-scripts/> directory relative to B<ServerRoot>.
-The example code assumes the Location URI C</perl> is an B<Alias> to
-this directory.
-
- {
- use Cwd ();
- use Apache::RegistryLoader ();
- use DirHandle ();
- use strict;
-
- my $dir = Apache->server_root_relative("perl-scripts/");
-
- my $rl = Apache::RegistryLoader->new(trans => sub {
- my $uri = shift;
- $uri =~ s:^/perl/:/perl-scripts/:;
- return Apache->server_root_relative($uri);
- });
-
- my $dh = DirHandle->new($dir) or die $!;
-
- for my $file ($dh->read) {
- next unless $file =~ /\.pl$/;
- $rl->handler("/perl/$file");
- }
- }
-
-=head1 AUTHORS
-
-Doug MacEachern
-
-Stas Bekman (Rewrote the handler() to report and handle all the possible
-erroneous conditions)
-
-=head1 SEE ALSO
-
-Apache::Registry(3), Apache(3), mod_perl(3)
-
diff --git a/tags/v1_29/lib/Apache/RegistryNG.pm b/tags/v1_29/lib/Apache/RegistryNG.pm
deleted file mode 100644
index cc0b5bd..0000000
--- a/tags/v1_29/lib/Apache/RegistryNG.pm
+++ /dev/null
@@ -1,64 +0,0 @@
-package Apache::RegistryNG;
-
-use Apache::PerlRun ();
-use Apache::Constants qw(:common);
-use strict;
-use vars qw($VERSION @ISA);
-$VERSION = '1.00';
-@ISA = qw(Apache::PerlRun);
-
-#OO replacement for Apache::Registry
-#configure like so:
-# <Location /perl>
-# SetHandler perl-script
-# PerlHandler Apache::RegistryNG->handler
-# Options +ExecCGI
-# </Location>
-# see also: Apache::RegistryBB
-
-sub namespace_from {
- shift->{r}->filename;
-}
-
-sub handler ($$) {
- my($class, $r);
- if (@_ >= 2) {
- ($class, $r) = (shift, shift);
- }
- else {
- ($class, $r) = (__PACKAGE__, shift);
- }
- my $pr = $class->new($r);
-
- my $rc = $pr->can_compile;
- return $rc unless $rc == OK;
-
- local $^W = $^W;
-
- my $package = $pr->namespace;
- $pr->set_script_name;
- $pr->chdir_file;
-
- if($pr->should_compile) {
- $pr->readscript;
- $pr->parse_cmdline;
- $pr->sub_wrap;
- my $rc = $pr->compile;
- return $rc if $rc != OK;
- $pr->set_mtime;
- }
-
- my $old_status = $r->status;
-
- $rc = $pr->run(@_);
- $pr->chdir_file("$Apache::Server::CWD/");
-
- my $pr_status = $pr->status;
- $r->status($old_status);
-
- return ($rc != OK) ? $rc : $pr_status;
-}
-
-1;
-
-__END__
diff --git a/tags/v1_29/lib/Apache/Resource.pm b/tags/v1_29/lib/Apache/Resource.pm
deleted file mode 100644
index 0afc038..0000000
--- a/tags/v1_29/lib/Apache/Resource.pm
+++ /dev/null
@@ -1,185 +0,0 @@
-#! /usr/local/bin/perl
-package Apache::Resource;
-
-use strict;
-use vars qw($Debug);
-use BSD::Resource qw(setrlimit getrlimit get_rlimits);
-
-$Debug ||= 0;
-$Apache::Resource::VERSION = '1.71';
-
-sub MB ($) {
- my $num = shift;
- return ($num < (1024 * 1024)) ? $num*1024*1024 : $num;
-}
-
-sub BM ($) {
- my $num = shift;
- return ($num > (1024 * 1024)) ? '(' . ($num>>20) . 'Mb)' : '';
-}
-
-sub DEFAULT_RLIMIT_DATA () { 64 } #data (memory) size in MB
-sub DEFAULT_RLIMIT_AS () { 64 } #address space (memory) size in MB
-sub DEFAULT_RLIMIT_CPU () { 60*6 } #cpu time in seconds
-sub DEFAULT_RLIMIT_CORE () { 0 } #core file size (MB)
-sub DEFAULT_RLIMIT_RSS () { 16 } #resident set size (MB)
-sub DEFAULT_RLIMIT_FSIZE () { 10 } #file size (MB)
-sub DEFAULT_RLIMIT_STACK () { 20 } #stack size (MB)
-
-my %is_mb = map {$_,1} qw{DATA RSS STACK FSIZE CORE MEMLOCK AS};
-
-sub debug { print STDERR @_ if $Debug }
-
-sub install_rlimit ($$$) {
- my($res, $soft, $hard) = @_;
-
- my $name = $res;
-
- my $cv = \&{"BSD::Resource::RLIMIT_${res}"};
- eval { $res = $cv->() };
- return if $@;
-
- unless ($soft) {
- my $defval = \&{"DEFAULT_RLIMIT_${name}"};
- if(defined &$defval) {
- $soft = $defval->();
- }
- else {
- warn "can't find default for `$defval'\n";
- }
- }
-
- $hard ||= $soft;
-
- debug "Apache::Resource: PID $$ attempting to set `$name'=$soft:$hard ...";
-
- ($soft, $hard) = (MB $soft, MB $hard) if $is_mb{$name};
-
- return setrlimit $res, $soft, $hard;
-}
-
-sub handler {
- while(my($k,$v) = each %ENV) {
- next unless $k =~ /^PERL_RLIMIT_(\w+)$/;
- $k = $1;
- next if $k eq "DEFAULTS";
- my($soft, $hard) = split ":", $v, 2;
- $hard ||= $soft;
-
- my $set = install_rlimit $k, $soft, $hard;
- debug "not " unless $set;
- debug "ok\n";
- debug $@ if $@;
- }
-
- 0;
-}
-
-sub default_handler {
- while(my($k,$v) = each %Apache::Resource::) {
- next unless $k =~ s/^DEFAULT_/PERL_/;
- $ENV{$k} = "";
- }
- handler();
-}
-
-sub status_rlimit {
- my $lim = get_rlimits();
- my @retval = ("<table border=1><tr>",
- (map "<th>$_</th>", qw(Resource Soft Hard)),
- "</tr>");
-
- for my $res (keys %$lim) {
- my $val = eval "&BSD::Resource::${res}()";
- my ($soft,$hard) = getrlimit $val;
- (my $limit = $res) =~ s/^RLIMIT_//;
- ($soft, $hard) = ("$soft " . BM($soft),"$hard ". BM($hard))
- if $is_mb{$limit};
- push @retval,
- "<tr>",
- (map { "<td>$_</td>" } $res, $soft, $hard),
- "</tr>";
- }
-
- push @retval, "</table><P>";
- push @retval, "<SMALL>Apache::Resource $Apache::Resource::VERSION</SMALL>";
-
- return \@retval;
-}
-
-if($ENV{MOD_PERL}) {
- if($ENV{PERL_RLIMIT_DEFAULTS}) {
- Apache->push_handlers(PerlChildInitHandler => \&default_handler);
- }
-
- Apache::Status->menu_item(rlimit => "Resource Limits",
- \&status_rlimit)
- if Apache->module("Apache::Status");
-}
-
-#perl Apache/Resource.pm
-++$Debug, default_handler unless caller();
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Resource - Limit resources used by httpd children
-
-=head1 SYNOPSIS
-
- PerlModule Apache::Resource
- #set child memory limit in megabytes
- #default is 64 Meg
- PerlSetEnv PERL_RLIMIT_DATA 32:48
-
- #linux does not honor RLIMIT_DATA
- #RLIMIT_AS (address space) will work to limit the size of a process
- PerlSetEnv PERL_RLIMIT_AS 32:48
-
- #set child cpu limit in seconds
- #default is 360 seconds
- PerlSetEnv PERL_RLIMIT_CPU 120
-
- PerlChildInitHandler Apache::Resource
-
-=head1 DESCRIPTION
-
-B<Apache::Resource> uses the B<BSD::Resource> module, which
-uses the C function C<setrlimit> to set limits on
-system resources such as memory and cpu usage.
-
-Any B<RLIMIT> operation available to limit on your system can be set
-by defining that operation as an environment variable with a C<PERL_>
-prefix. See your system C<setrlimit> manpage for available resources
-which can be limited.
-
-The following limit values are in megabytes: C<DATA>, C<RSS>, C<STACK>,
-C<FSIZE>, C<CORE>, C<MEMLOCK>; all others are treated as their natural unit.
-
-If the value of the variable is of the form C<S:H>, C<S> is treated as
-the soft limit, and C<H> is the hard limit. If it is just a single
-number, it is used for both soft and hard limits.
-
-=head1 DEFAULTS
-
-To set reasonable defaults for all RLIMITs, add this to your httpd.conf:
-
- PerlSetEnv PERL_RLIMIT_DEFAULTS On
- PerlModule Apache::Resource
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-=head1 SEE ALSO
-
-BSD::Resource(3), setrlimit(2)
-
-=cut
-
-
-
-
diff --git a/tags/v1_29/lib/Apache/SIG.pm b/tags/v1_29/lib/Apache/SIG.pm
deleted file mode 100644
index 5ab090d..0000000
--- a/tags/v1_29/lib/Apache/SIG.pm
+++ /dev/null
@@ -1,89 +0,0 @@
-package Apache::SIG;
-
-use strict;
-$Apache::SIG::VERSION = '1.91';
-
-$Apache::SIG::PipeKey ||= 'SIGPIPE';
-
-sub set {
- $SIG{PIPE} = \&PIPE;
-}
-
-sub handler {
- my $r = shift;
- if ($r->is_main) {
- $r->request($r);
- $SIG{PIPE} = \&PIPE;
- }
-}
-
-sub PIPE {
- my $ppid = getppid;
- my $s = ($ppid > 1) ? -2 : 0;
-
- if (my $r = Apache->request) {
- $r->subprocess_env($Apache::SIG::PipeKey => '1');
- } else {
- warn "[modperl] caught SIGPIPE in process $$\n";
- warn "\thint: may be a client (browser) hit STOP?\n";
- warn "[modperl] process $$ going to Apache::exit with status=$s\n";
- }
- Apache::exit($s);
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::SIG - Override apache signal handlers with Perl's
-
-=head1 SYNOPSIS
-
- PerlFixupHandler Apache::SIG
-
-=head1 DESCRIPTION
-
-When a client drops a connection and apache is in the middle of a
-write, a timeout will occur and httpd sends a B<SIGPIPE>. When
-apache's SIGPIPE handler is used, Perl may be left in the middle of
-it's eval context, causing bizarre errors during subsequent requests
-are handled by that child. When Apache::SIG is used, it installs a
-different SIGPIPE handler which rewinds the context to make sure Perl
-is back to normal state, preventing these bizarre errors.
-
-If you would like to log when a request was cancelled by a SIGPIPE in your
-Apache access_log, you can declare Apache::SIG as a handler (any
-Perl*Handler will do, as long as it is run before PerlHandler,
-e.g. PerlFixupHandler), and you must also define a custom LogFormat in your
-httpd.conf, like so:
-
-PerlFixupHandler Apache::SIG
-LogFormat "%h %l %u %t \"%r\" %s %b %{SIGPIPE}e"
-
-If the server has noticed that the request was cancelled via a SIGPIPE,
-then the log line will end with C<1>, otherwise it will just be a dash.
-
-=head1 CAVEATS
-
-The signal handler in this package uses the subprocess_env table of the
-main request object to supply the 'SIGPIPE' "environment variable" to
-the log handler. If you already use the key 'SIGPIPE' in your
-subprocess_env table, then you can redefine the key like this:
-
-$Apache::SIG::PipeKey = 'my_SIGPIPE';
-
-and log it like this:
-
-LogFormat "%h %l %u %t \"%r\" %s %b %{my_SIGPIPE}e"
-
-=head1 AUTHORS
-
-Doug MacEachern and Doug Bagley
-
-=head1 SEE ALSO
-
-perlvar(1)
-
-=cut
diff --git a/tags/v1_29/lib/Apache/SizeLimit.pm b/tags/v1_29/lib/Apache/SizeLimit.pm
deleted file mode 100644
index 47af92f..0000000
--- a/tags/v1_29/lib/Apache/SizeLimit.pm
+++ /dev/null
@@ -1,349 +0,0 @@
-package Apache::SizeLimit;
-
-=head1 NAME
-
-Apache::SizeLimit - Because size does matter.
-
-=head1 SYNOPSIS
-
-This module allows you to kill off Apache httpd processes if they grow too
-large. You can choose to set up the process size limiter to check the
-process size on every request:
-
- # in your startup.pl:
- use Apache::SizeLimit;
- # sizes are in KB
- $Apache::SizeLimit::MAX_PROCESS_SIZE = 10000; # 10MB
- $Apache::SizeLimit::MIN_SHARE_SIZE = 1000; # 1MB
- $Apache::SizeLimit::MAX_UNSHARED_SIZE = 12000; # 12MB
-
- # in your httpd.conf:
- PerlCleanupHandler Apache::SizeLimit
-
-Or you can just check those requests that are likely to get big, such as
-CGI requests. This way of checking is also easier for those who are mostly
-just running CGI.pm/Registry scripts:
-
- # in your CGI:
- use Apache::SizeLimit;
- &Apache::SizeLimit::setmax(10000); # Max size in KB
- &Apache::SizeLimit::setmin(1000); # Min share in KB
- &Apache::SizeLimit::setmax_unshared(12000); # Max unshared size in KB
-
-Since checking the process size can take a few system calls on some
-platforms (e.g. linux), you may want to only check the process size every
-N times. To do so, put this in your startup.pl or CGI:
-
- $Apache::SizeLimit::CHECK_EVERY_N_REQUESTS = 2;
-
-This will only check the process size every other time the process size
-checker is called.
-
-=head1 DESCRIPTION
-
-This module is highly platform dependent, please read the CAVEATS section.
-
-This module was written in response to questions on the mod_perl mailing
-list on how to tell the httpd process to exit if it gets too big.
-
-Actually there are two big reasons your httpd children will grow. First,
-it could have a bug that causes the process to increase in size
-dramatically, until your system starts swapping. Second, your process just
-does stuff that requires a lot of memory, and the more different kinds of
-requests your server handles, the larger the httpd processes grow over
-time.
-
-This module will not really help you with the first problem. For that you
-should probably look into Apache::Resource or some other means of setting a
-limit on the data size of your program. BSD-ish systems have setrlimit()
-which will croak your memory gobbling processes. However it is a little
-violent, terminating your process in mid-request.
-
-This module attempts to solve the second situation where your process
-slowly grows over time. The idea is to check the memory usage after every
-request, and if it exceeds a threshold, exit gracefully.
-
-By using this module, you should be able to discontinue using the Apache
-configuration directive B<MaxRequestsPerChild>, although for some folks,
-using both in combination does the job. Personally, I just use the
-technique shown in this module and set my MaxRequestsPerChild value to
-6000.
-
-=head1 SHARED MEMORY OPTIONS
-
-In addition to simply checking the total size of a process, this
-module can factor in how much of the memory used by the process is
-actually being shared by copy-on-write. If you don't understand how
-memory is shared in this way, take a look at the mod_perl Guide at
-http://perl.apache.org/guide/.
-
-You can take advantage of the shared memory information by setting a
-minimum shared size and/or a maximum unshared size. Experience on one
-heavily trafficked mod_perl site showed that setting maximum unshared
-size and leaving the others unset is the most effective policy. This
-is because it only kills off processes that are truly using too much
-physical RAM, allowing most processes to live longer and reducing the
-process churn rate.
-
-=head1 CAVEATS
-
-This module is platform dependent, since finding the size of a process
-is pretty different from OS to OS, and some platforms may not be
-supported. In particular, the limits on minimum shared memory and
-maximum shared memory are currently only supported on Linux and BSD.
-If you can contribute support for another OS, please do.
-
-Currently supported OSes:
-
-=over 4
-
-=item linux
-
-For linux we read the process size out of /proc/self/status. This is
-a little slow, but usually not too bad. If you are worried about
-performance, try only setting up the the exit handler inside CGIs
-(with the C<setmax> function), and see if the CHECK_EVERY_N_REQUESTS
-option is of benefit.
-
-=item solaris 2.6 and above
-
-For solaris we simply retrieve the size of /proc/self/as, which
-contains the address-space image of the process, and convert to KB.
-Shared memory calculations are not supported.
-
-NOTE: This is only known to work for solaris 2.6 and above. Evidently
-the /proc filesystem has changed between 2.5.1 and 2.6. Can anyone
-confirm or deny?
-
-=item *bsd*
-
-Uses BSD::Resource::getrusage() to determine process size. This is pretty
-efficient (a lot more efficient than reading it from the /proc fs anyway).
-
-=item AIX?
-
-Uses BSD::Resource::getrusage() to determine process size. Not sure if the
-shared memory calculations will work or not. AIX users?
-
-=item Win32
-
-Uses Win32::API to access process memory information. Win32::API can be
-installed under ActiveState perl using the supplied ppm utility.
-
-=back
-
-If your platform is not supported, and if you can tell me how to check for
-the size of a process under your OS (in KB), then I will add it to the list.
-The more portable/efficient the solution, the better, of course.
-
-=head1 TODO
-
-Possibly provide a perl make/install so that the SizeLimit.pm is created at
-build time with only the code you need on your platform.
-
-If Apache was started in non-forking mode, should hitting the size limit
-cause the process to exit?
-
-=cut
-
-use Apache::Constants qw(:common);
-use Config;
-use strict;
-use vars qw($VERSION $HOW_BIG_IS_IT $MAX_PROCESS_SIZE
- $REQUEST_COUNT $CHECK_EVERY_N_REQUESTS
- $MIN_SHARE_SIZE $MAX_UNSHARED_SIZE $START_TIME $WIN32);
-
-$VERSION = '0.03';
-$CHECK_EVERY_N_REQUESTS = 1;
-$REQUEST_COUNT = 1;
-$MAX_PROCESS_SIZE = 0;
-$MIN_SHARE_SIZE = 0;
-$MAX_UNSHARED_SIZE = 0;
-$WIN32 = 0;
-
-
-BEGIN {
- # decide at compile time how to check for a process' memory size.
- if (($Config{'osname'} eq 'solaris') &&
- ($Config{'osvers'} >= 2.6)) {
- $HOW_BIG_IS_IT = \&solaris_2_6_size_check;
- } elsif ($Config{'osname'} eq 'linux') {
- $HOW_BIG_IS_IT = \&linux_size_check;
- } elsif ($Config{'osname'} =~ /(bsd|aix|darwin)/i) {
- # will getrusage work on all BSDs? I should hope so.
- if (eval("require BSD::Resource;")) {
- $HOW_BIG_IS_IT = \&bsd_size_check;
- } else {
- die "you must install BSD::Resource for Apache::SizeLimit to work on your platform.";
- }
- } elsif ($Config{'osname'} eq 'MSWin32') {
- $WIN32 = 1;
- if (eval("require Win32::API")) {
- $HOW_BIG_IS_IT = \&win32_size_check;
- } else {
- die "you must install Win32::API for Apache::SizeLimit to work on your platform.";
- }
- } else {
- die "Apache::SizeLimit not implemented on your platform.";
- }
-}
-
-# return process size (in KB)
-sub linux_size_check {
- my ($size, $resident, $share) = (0,0,0);
- local(*FH);
- if (open(FH, "</proc/self/statm")) {
- ($size, $resident, $share) = split(/\s/, scalar <FH>);
- close(FH);
- } else {
- &error_log("Fatal Error: couldn't access /proc/self/status");
- }
- # linux on intel x86 has 4KB page size...
- return($size*4, $share*4);
-}
-
-sub solaris_2_6_size_check {
- my $size = -s "/proc/self/as" or
- &error_log("Fatal Error: /proc/self/as doesn't exist or is empty");
- $size = int($size/1024); # to get it into kb
- return($size, 0); # return 0 for share, to avoid undef warnings
-}
-
-sub bsd_size_check {
- return (&BSD::Resource::getrusage())[2,3];
-}
-
-sub win32_size_check {
- # get handle on current process
- my $GetCurrentProcess = new Win32::API('kernel32',
- 'GetCurrentProcess',
- [],
- 'I');
- my $hProcess = $GetCurrentProcess->Call();
-
-
- # memory usage is bundled up in ProcessMemoryCounters structure
- # populated by GetProcessMemoryInfo() win32 call
- my $DWORD = 'B32'; # 32 bits
- my $SIZE_T = 'I'; # unsigned integer
-
- # build a buffer structure to populate
- my $pmem_struct = "$DWORD" x 2 . "$SIZE_T" x 8;
- my $pProcessMemoryCounters = pack($pmem_struct, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
-
- # GetProcessMemoryInfo is in "psapi.dll"
- my $GetProcessMemoryInfo = new Win32::API('psapi',
- 'GetProcessMemoryInfo',
- ['I', 'P', 'I'],
- 'I');
-
- my $bool = $GetProcessMemoryInfo->Call($hProcess,
- $pProcessMemoryCounters,
- length($pProcessMemoryCounters));
-
- # unpack ProcessMemoryCounters structure
- my ($cb,
- $PageFaultCount,
- $PeakWorkingSetSize,
- $WorkingSetSize,
- $QuotaPeakPagedPoolUsage,
- $QuotaPagedPoolUsage,
- $QuotaPeakNonPagedPoolUsage,
- $QuotaNonPagedPoolUsage,
- $PagefileUsage,
- $PeakPagefileUsage) = unpack($pmem_struct, $pProcessMemoryCounters);
-
- # only care about peak working set size
- my $size = int($PeakWorkingSetSize / 1024);
-
- return ($size, 0);
-}
-
-
-sub exit_if_too_big {
- my $r = shift;
- return DECLINED if ($CHECK_EVERY_N_REQUESTS &&
- ($REQUEST_COUNT++ % $CHECK_EVERY_N_REQUESTS));
-
- $START_TIME ||= time;
-
- my($size, $share) = &$HOW_BIG_IS_IT();
-
- if (($MAX_PROCESS_SIZE && $size > $MAX_PROCESS_SIZE)
- ||
- ($MIN_SHARE_SIZE && $share < $MIN_SHARE_SIZE)
- ||
- ($MAX_UNSHARED_SIZE && ($size - $share) > $MAX_UNSHARED_SIZE)) {
-
- # wake up! time to die.
- if ($WIN32 || (getppid > 1)) { # this is a child httpd
- my $e = time - $START_TIME;
- my $msg = "httpd process too big, exiting at SIZE=$size KB ";
- $msg .= " SHARE=$share KB " if ($share);
- $msg .= " REQUESTS=$REQUEST_COUNT LIFETIME=$e seconds";
- error_log($msg);
-
- if ($WIN32) {
- CORE::exit(-2); # child_terminate() is disabled in win32 Apache
- } else {
- $r->child_terminate();
- }
-
- } else { # this is the main httpd, whose parent is init?
- my $msg = "main process too big, SIZE=$size KB ";
- $msg .= " SHARE=$share KB" if ($share);
- error_log($msg);
- }
- }
- return OK;
-}
-
-# setmax can be called from within a CGI/Registry script to tell the httpd
-# to exit if the CGI causes the process to grow too big.
-sub setmax {
- $MAX_PROCESS_SIZE = shift;
- Apache->request->post_connection(\&exit_if_too_big);
-}
-
-sub setmin {
- $MIN_SHARE_SIZE = shift;
- Apache->request->post_connection(\&exit_if_too_big);
-}
-
-sub setmax_unshared {
- $MAX_UNSHARED_SIZE = shift;
- Apache->request->post_connection(\&exit_if_too_big);
-}
-
-sub handler {
- my $r = shift || Apache->request;
- if ($r->is_main()) {
- # we want to operate in a cleanup handler
- if ($r->current_callback eq 'PerlCleanupHandler') {
- exit_if_too_big($r);
- } else {
- $r->post_connection(\&exit_if_too_big);
- }
- }
- return(DECLINED);
-}
-
-sub error_log {
- print STDERR "[", scalar(localtime(time)), "] ($$) Apache::SizeLimit @_\n";
-}
-
-1;
-
-=head1 AUTHOR
-
-Doug Bagley <doug+modperl@bagley.org>, channeling Procrustes.
-
-Brian Moseley <ix@maz.org>: Solaris 2.6 support
-
-Doug Steinwand and Perrin Harkins <perrin@elem.com>: added support
- for shared memory and additional diagnostic info
-
-Matt Phillips <mphillips@virage.com> and Mohamed Hendawi
-<mhendawi@virage.com>: Win32 support
-
-=cut
diff --git a/tags/v1_29/lib/Apache/StatINC.pm b/tags/v1_29/lib/Apache/StatINC.pm
deleted file mode 100644
index 788c0e0..0000000
--- a/tags/v1_29/lib/Apache/StatINC.pm
+++ /dev/null
@@ -1,145 +0,0 @@
-package Apache::StatINC;
-use strict;
-
-$Apache::StatINC::VERSION = "1.07";
-
-my %Stat = ($INC{"Apache/StatINC.pm"} => time);
-
-sub handler {
- my $r = shift;
- my $do_undef = ref($r) && ((lc($r->dir_config("StatINC_UndefOnReload") ||
- $r->dir_config("UndefOnReload")) || '') eq "on");
- my $DEBUG = ref($r) && (lc($r->dir_config("StatINCDebug") || '') eq "on");
- $DEBUG = $r->dir_config("StatINC_Debug") if ref($r) && $r->dir_config("StatINC_Debug");
-
- while(my($key,$file) = each %INC) {
- local $^W = 0;
- my $mtime = (stat $file)[9];
- # warn and skip the files with relative paths which can't be locate by applying @INC;
- warn("Apache::StatINC: Can't locate $file\n"),next unless defined $mtime and $mtime;
- unless(defined $Stat{$file}) {
- $Stat{$file} = $^T;
- }
- # if modified, reload the module
- if($mtime > $Stat{$file}) {
- # make sure file's prefix is in @INC
- my $found_in_inc;
- for (@INC) {
- if(index($file,$_) == 0) {
- $found_in_inc = 1;
- last;
- }
- }
-
- if(!$found_in_inc) {
- my $inc_dir = substr($file, 0, length($file)-length($key)-1);
- push @INC, $inc_dir;
- warn "Apache::StatINC: process $$ adding $inc_dir to \@INC\n"
- if $DEBUG > 0;
- }
-
- if($do_undef and $key =~ /\.pm$/) {
- require Apache::Symbol;
- my $class = Apache::Symbol::file2class($key);
- $class->Apache::Symbol::undef_functions( undef, 1 );
- }
- delete $INC{$key};
- eval{ require $key };
- if ($@) {
- warn "Apache::StatINC: process $$ failed to reload $key. $@"
- if $DEBUG > 0;
- } else {
- warn "Apache::StatINC: process $$ reloading $key.\n"
- if $DEBUG > 0;
- }
- }
- $Stat{$file} = $mtime;
- }
-
- return 1;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::StatINC - Reload %INC files when updated on disk
-
-=head1 SYNOPSIS
-
- #httpd.conf or some such
- #can be any Perl*Handler
- PerlInitHandler Apache::StatINC
-
-=head1 DESCRIPTION
-
-When Perl pulls a file via C<require>, it stores the filename in the
-global hash C<%INC>. The next time Perl tries to C<require> the same
-file, it sees the file in C<%INC> and does not reload from disk. This
-module's handler iterates over C<%INC> and reloads the file if it has
-changed on disk.
-
-Note that StatINC operates on the current context of C<@INC>.
-Which means, when called as a Perl*Handler it will not see C<@INC> paths
-added or removed by Apache::Registry scripts, as the value of C<@INC> is
-saved on server startup and restored to that value after each request.
-In other words, if you want StatINC to work with modules that live in custom
-C<@INC> paths, you should modify C<@INC> when the server is started.
-Besides, 'use lib' in startup scripts, you can also set the B<PERL5LIB>
-variable in the httpd's environment to include any non-standard 'lib'
-directories that you choose. For example, you might use a
-script called 'start_httpd' to start apache, and include a line like this:
-
- PERL5LIB=/usr/local/foo/myperllibs; export PERL5LIB
-
-When you have problems with modules not being reloaded, please refer
-to the following lines in 'perlmodlib':
-
-"Always use B<-w>. Try to C<use strict;> (or C<use strict qw(...);>).
-Remember that you can add C<no strict qw(...);> to individual blocks
-of code that need less strictness. Always use B<-w>. Always use B<-w>!
-Follow the guidelines in the perlstyle(1) manual."
-
-Warnings when running under mod_perl is enabled with 'PerlWarn On' in
-your httpd.conf.
-
-It will most likely help you to find the problem. Really.
-
-=head1 OPTIONS
-
-=over 4
-
-=item StatINC_UndefOnReload
-
-Normally, StatINC will turn of warnings to avoid "Subroutine redefined"
-warnings when it reloads a file. However, this does not disable the
-Perl mandatory warning when re-defining C<constant> subroutines
-(see perldoc perlsub). With this option On, StatINC will invoke the
-B<Apache::Symbol> I<undef_functions> method to avoid these mandatory
-warnings:
-
- PerlSetVar StatINC_UndefOnReload On
-
-=item StatINC_Debug
-
-You can make StatINC tell when it reloads a module by setting this
-option to on.
-
- PerlSetVar StatINC_Debug 1
-
-The only used debug level is currently 1.
-
-=back
-
-=head1 SEE ALSO
-
-mod_perl(3)
-
-=head1 AUTHOR
-
-Currently maintained by Ask Bjoern Hansen <ask@netcetera.dk>.
-Written by Doug MacEachern.
-
-
diff --git a/tags/v1_29/lib/Apache/Status.pm b/tags/v1_29/lib/Apache/Status.pm
deleted file mode 100644
index e8e513b..0000000
--- a/tags/v1_29/lib/Apache/Status.pm
+++ /dev/null
@@ -1,790 +0,0 @@
-package Apache::Status;
-use strict;
-use mod_perl ();
-
-$Apache::Status::VERSION = '2.03';
-
-my %is_installed = ();
-my $Is_Win32 = ($^O eq "MSWin32");
-{
- local $SIG{__DIE__};
- %is_installed = map {
- $_, (eval("require $_") || 0);
- } qw (Data::Dumper Devel::Symdump B Apache::Request Apache::Peek Apache::Symbol);
-}
-
-use vars qw($newQ);
-
-if ($is_installed{"Apache::Request"}) {
- $newQ ||= sub { Apache::Request->new(@_) };
-}
-else {
- $is_installed{"CGI"} = eval("require CGI") || 0;
- $newQ ||= sub { CGI->new; };
-}
-
-my $CPAN_base = "http://www.perl.com/CPAN/modules/by-module";
-
-my(%status) = (
- script => "PerlRequire'd Files",
- inc => "Loaded Modules",
- rgysubs => "Compiled Registry Scripts",
- 'symdump' => "Symbol Table Dump",
- inh_tree => "Inheritance Tree",
- isa_tree => "ISA Tree",
- env => "Environment",
- sig => "Signal Handlers",
- myconfig => "Perl Configuration",
- hooks => "Enabled mod_perl Hooks",
-);
-
-delete $status{'hooks'} if $mod_perl::VERSION >= 1.9901;
-delete $status{'sig'} if $Is_Win32;
-
-if($Apache::Server::SaveConfig) {
- $status{"section_config"} = "Perl Section Configuration";
-}
-
-sub menu_item {
- my($self, $key, $val, $sub) = @_;
- $status{$key} = $val;
- no strict;
- *{"status_${key}"} = $sub
- if $sub and ref $sub eq 'CODE';
-}
-
-sub handler {
- my($r) = @_;
- Apache->request($r); #for Apache::CGI
- my $qs = $r->args || "";
- my $sub = "status_$qs";
- no strict 'refs';
-
- if($qs =~ s/^(noh_\w+).*/$1/) {
- return &{$qs}($r, $newQ->($r));
- }
-
- header($r);
- if(defined &$sub) {
- $r->print(@{ &{$sub}($r, $newQ->($r)) });
- }
- elsif ($qs and %{$qs."::"}) {
- $r->print(symdump($r, $newQ->($r), $qs));
- }
- else {
- my $uri = $r->uri;
- $r->print(
- map { qq[<a href="$uri?$_">$status{$_}</a><br>\n] } keys %status
- );
- }
- $r->print("</body></html>");
-
- 1;
-}
-
-sub header {
- my $r = shift;
- my $start = scalar localtime $^T;
- my $srv = Apache::Constants::SERVER_VERSION();
- $r->send_http_header("text/html");
- my $v = $^V ? sprintf "v%vd", $^V : $];
- $r->print(<<"EOF");
-<html>
-<head><title>Apache::Status</title></head>
-<body>
-Embedded Perl version <b>$v</b> for <b>$srv</b> process <b>$$</b>,
-<br> running since $start<hr>
-EOF
-
-}
-
-sub symdump {
- my($r, $q, $package) = @_;
- unless ($is_installed{"Devel::Symdump"}) {
- return <<EOF;
-Please install the <a href="$CPAN_base/Devel/">Devel::Symdump</a> module.
-EOF
- }
- my $meth = "new";
- $meth = "rnew" if lc($r->dir_config("StatusRdump")) eq "on";
- my $sob = Devel::Symdump->$meth($package);
- return $sob->Apache::Status::as_HTML($package, $r, $q);
-}
-
-sub status_symdump {
- my($r,$q) = @_;
- [symdump($r, $q, 'main')];
-}
-
-sub status_section_config {
- my($r,$q) = @_;
- require Apache::PerlSections;
- ["<pre>", Apache::PerlSections->dump, "</pre>"];
-}
-
-sub status_hooks {
- my($r,$q) = @_;
- require mod_perl;
- require mod_perl_hooks;
- my @retval = qw(<table>);
- my @list = mod_perl::hooks();
- for my $hook (sort @list) {
- my $on_off =
- mod_perl::hook($hook) ? "<b>Enabled</b>" : "<i>Disabled</i>";
- push @retval, "<tr><td>$hook</td><td>$on_off</td></tr>\n";
- }
- push @retval, qw(</table>);
- \@retval;
-}
-
-sub status_inc {
- my($r,$q) = @_;
- my(@retval, $module, $v, $file);
- my $uri = $r->uri;
- push @retval, "<table border=1>";
- push @retval,
- "<tr>",
- (map "<td><b>$_</b></td>", qw(Package Version Modified File)),
- "</tr>\n";
-
- foreach $file (sort keys %INC) {
- local $^W = 0;
- next if $file =~ m:^/:;
- next unless $file =~ m:\.pm:;
- next unless $INC{$file}; #e.g. fake Apache/TieHandle.pm
- no strict 'refs';
- ($module = $file) =~ s,/,::,g;
- $module =~ s,\.pm$,,;
- $v = ${"$module\:\:VERSION"} || '0.00';
- push @retval,
- "<tr>",
- (map "<td>$_</td>",
- qq(<a href="$uri?$module">$module</a>),
- $v, scalar localtime((stat $INC{$file})[9]), $INC{$file}),
- "</tr>\n";
- }
- push @retval, "</table>\n";
- push @retval, "<p><b>\@INC</b> = <br>", join "<br>\n", @INC, "";
- \@retval;
-}
-
-sub status_script {
- my($r,$q) = @_;
- my(@retval, $file);
- push @retval, "<table border=1>";
- push @retval, "<tr><td><b>PerlRequire</b></td><td><b>Location</b></td></tr>\n";
- foreach $file (sort keys %INC) {
- next if $file =~ m:\.(pm|al|ix)$:;
- push @retval,
- qq(<tr><td>$file</td><td>$INC{$file}</td></tr>\n);
- }
- push @retval, "</table>";
- \@retval;
-}
-
-my $RegistryCache;
-
-sub registry_cache {
- my($self, $cache) = @_;
-
- if ($cache) {
- $RegistryCache = $cache;
- }
-
- $RegistryCache || $Apache::Registry;
-}
-
-sub status_rgysubs {
- my($r,$q) = @_;
- my(@retval);
- local $_;
- my $uri = $r->uri;
- my $cache = __PACKAGE__->registry_cache;
- push @retval, "<b>Click on package name to see its symbol table</b><p>\n";
- foreach (sort keys %$cache) {
- push @retval,
- qq(<a href="$uri?$_">$_</a>\n),
- "<br>";
- }
- \@retval;
-}
-
-sub status_env {
- ["<pre>",
- (map { "$_ = $ENV{$_}\n" } sort keys %ENV),
- "</pre>"];
-}
-
-sub status_sig {
- ["<pre>",
- (map {
- my $val = $SIG{$_} || "";
- if($val and ref $val eq "CODE") {
- if(my $cv = Apache::Symbol->can('sv_name')) {
- $val = "\\&". $cv->($val);
- }
- }
- "$_ = $val\n" }
- sort keys %SIG),
- "</pre>"];
-}
-
-sub status_myconfig {
- require Config;
- ["<pre>", Config::myconfig(), "</pre>"]
-}
-
-sub status_inh_tree { ["<pre>", Devel::Symdump->inh_tree, "</pre>"] }
-sub status_isa_tree { ["<pre>", Devel::Symdump->isa_tree, "</pre>"] }
-
-sub status_data_dump {
- my($r,$q) = @_;
- my($name,$type) = (split "/", $r->uri)[-2,-1];
- my $script = $q->script_name;
- no strict 'refs';
- my @retval;
- push @retval, "Data Dump of $name $type <pre>\n";
- my $str = Data::Dumper->Dump([*$name{$type}], ['*'.$name]);
- $str =~ s/= \\/= /; #whack backwack
- push @retval, $str, "\n";
- push @retval, peek_link($r, $q, $name, $type);
- push @retval, b_graph_link($r, $q, $name);
- push @retval, "</pre>";
- \@retval;
-}
-
-sub cv_file {
- my $obj = shift;
- $obj->can('FILEGV') ? $obj->FILEGV->SV->PV : $obj->FILE;
-}
-
-sub status_cv_dump {
- my($r,$q) = @_;
- return [] unless $is_installed{B};
-
- no strict 'refs';
-
- my($name,$type) = (split "/", $r->uri)[-2,-1];
- my @retval = "Subroutine info for <b>$name</b> <pre>\n";
- my $script = $q->script_name;
- my $obj = B::svref_2object(*$name{CODE});
- my $file = cv_file($obj);
- my $stash = $obj->GV->STASH->NAME;
-
- push @retval, "File: ",
- (-e $file ? qq(<a href="file:$file">$file</a>) : $file), "\n";
-
- my $cv = $obj->GV->CV;
- my $proto = $cv->PV if $cv->can('PV');
- push @retval,
- qq(Package: <a href="$script?$stash">$stash</a>\n);
- push @retval, "Line: ", $obj->GV->LINE, "\n";
- push @retval, "Prototype: ", $proto || "none", "\n";
- push @retval, "XSUB: ", $obj->XSUB ? "yes" : "no", "\n";
- push @retval, peek_link($r, $q, $name, $type);
- #push @retval, xref_link($r, $q, $name);
- push @retval, b_graph_link($r, $q, $name);
- push @retval, b_lexinfo_link($r, $q, $name);
- push @retval, b_terse_link($r, $q, $name);
- push @retval, b_terse_size_link($r, $q, $name);
- push @retval, b_deparse_link($r, $q, $name);
- push @retval, b_fathom_link($r, $q, $name);
- push @retval, "</pre>";
- \@retval;
-}
-
-sub status_config {
- my($r, $key) = @_;
- return (lc($r->dir_config($key)) eq "on") ||
- (lc($r->dir_config('StatusOptionsAll')) eq "on");
-}
-
-sub b_graph_link {
- my($r,$q,$name) = @_;
- return unless status_config($r, "StatusGraph");
- return unless eval { require B::Graph };
- B::Graph->UNIVERSAL::VERSION('0.03');
- my $script = $q->script_name;
- return qq(\n<a href="$script/$name?noh_b_graph">OP Tree Graph</a>\n);
-}
-
-sub b_lexinfo_link {
- my($r, $q, $name) = @_;
- return unless status_config($r, "StatusLexInfo");
- return unless eval { require B::LexInfo };
- my $script = $q->script_name;
- return qq(\n<a href="$script/$name?noh_b_lexinfo">Lexical Info</a>\n);
-}
-
-sub noh_b_lexinfo {
- my $r = shift;
- $r->send_http_header("text/plain");
- no strict 'refs';
- my($name) = (split "/", $r->uri)[-1];
- $r->print("Lexical Info for $name\n\n");
- my $lexi = B::LexInfo->new;
- my $info = $lexi->cvlexinfo($name);
- print ${ $lexi->dumper($info) };
-}
-
-my %b_terse_exp = ('slow' => 'syntax', 'exec' => 'execution');
-
-sub b_terse_link {
- my($r, $q, $name) = @_;
- return unless status_config($r, "StatusTerse");
- return unless eval { require B::Terse };
- my $script = $q->script_name;
- my @retval;
- for (qw(exec slow)) {
- my $exp = "$b_terse_exp{$_} order";
- push @retval,
- qq(\n<a href="$script/$_/$name?noh_b_terse">Syntax Tree Dump ($exp)</a>\n);
- }
- join '', @retval;
-}
-
-sub noh_b_terse {
- my $r = shift;
- return unless eval { require B::Terse };
- $r->send_http_header("text/plain");
- no strict 'refs';
- my($arg, $name) = (split "/", $r->uri)[-2,-1];
- $r->print("Syntax Tree Dump ($b_terse_exp{$arg}) for $name\n\n");
- B::Terse::compile($arg, $name)->();
-}
-
-sub b_terse_size_link {
- my($r, $q, $name) = @_;
- return unless status_config($r, "StatusTerseSize");
- return unless eval { require B::TerseSize };
- my $script = $q->script_name;
- my @retval;
- for (qw(exec slow)) {
- my $exp = "$b_terse_exp{$_} order";
- push @retval,
- qq(\n<a href="$script/$_/$name?noh_b_terse_size">Syntax Tree Size ($exp)</a>\n);
- }
- join '', @retval;
-}
-
-sub noh_b_terse_size {
- my $r = shift;
- return unless eval { require B::TerseSize };
- $r->send_http_header("text/html");
- $r->print('<pre>');
- my($arg, $name) = (split "/", $r->uri)[-2,-1];
- my $uri = $r->location;
- my $link = qq{<a href="$uri/$name/CODE?cv_dump">$name</a>};
- $r->print("Syntax Tree Size ($b_terse_exp{$arg} order) for $link\n\n");
- B::TerseSize::compile($arg, $name)->();
-}
-
-sub b_package_size_link {
- my($r, $q, $name) = @_;
- return unless status_config($r, "StatusPackageSize");
- return unless eval { require B::TerseSize };
- my $script = $q->script_name;
- qq(<a href="$script/$name?noh_b_package_size">Memory Usage</a>\n);
-}
-
-sub noh_b_package_size {
- my($r, $q) = @_;
- return unless eval { require B::TerseSize };
- $r->send_http_header("text/html");
- $r->print('<pre>');
- no strict 'refs';
- my($package) = (split "/", $r->uri)[-1];
- my $script = $q->script_name;
- $r->print("Memory Usage for package $package\n\n");
- my($subs, $opcount, $opsize) = B::TerseSize::package_size($package);
- $r->print("Totals: $opsize bytes | $opcount OPs\n\n");
- my($clen, $slen, $nlen);
- my @keys = map {
- $nlen = length > $nlen ? length : $nlen;
- $_;
- } (sort { $subs->{$b}->{size} <=> $subs->{$a}->{size} } keys %$subs);
-
- $clen = length $subs->{$keys[0]}->{count};
- $slen = length $subs->{$keys[0]}->{size};
-
- for my $name (@keys) {
- my $stats = $subs->{$name};
- if ($name =~ /^my /) {
- printf "%-${nlen}s %${slen}d bytes\n", $name, $stats->{size};
- }
- elsif ($name =~ /^\*(\w+)\{(\w+)\}/) {
- my $link = qq(<a href="$script/$package\::$1/$2?data_dump">);
- printf "$link%-${nlen}s</a> %${slen}d bytes\n", $name, $stats->{size};
- }
- else {
- my $link =
- qq(<a href="$script/slow/$package\::$name?noh_b_terse_size">);
- printf "$link%-${nlen}s</a> %${slen}d bytes | %${clen}d OPs\n",
- $name, $stats->{size}, $stats->{count};
- }
- }
-}
-
-sub b_deparse_link {
- my($r, $q, $name) = @_;
- return unless status_config($r, "StatusDeparse");
- return unless eval { require B::Deparse };
- return unless $B::Deparse::VERSION >= 0.59;
- my $script = $q->script_name;
- return qq(\n<a href="$script/$name?noh_b_deparse">Deparse</a>\n);
-}
-
-sub noh_b_deparse {
- my $r = shift;
- $r->send_http_header("text/plain");
- my $name = (split "/", $r->uri)[-1];
- $r->print("Deparse of $name\n\n");
- my $deparse = B::Deparse->new(split /\s+/,
- $r->dir_config('StatusDeparseOptions')||"");
- my $body = $deparse->coderef2text(\&{$name});
- $r->print("sub $name $body");
-}
-
-sub b_fathom_link {
- my($r, $q, $name) = @_;
- return unless status_config($r, "StatusFathom");
- return unless eval { require B::Fathom };
- return unless $B::Fathom::VERSION >= 0.05;
- my $script = $q->script_name;
- return qq(\n<a href="$script/$name?noh_b_fathom">Fathom Score</a>\n);
-}
-
-sub noh_b_fathom {
- my $r = shift;
- $r->send_http_header("text/plain");
- my $name = (split "/", $r->uri)[-1];
- $r->print("Fathom Score of $name\n\n");
- my $fathom = B::Fathom->new(split /\s+/,
- $r->dir_config('StatusFathomOptions')||"");
- $r->print($fathom->fathom(\&{$name}));
-}
-
-sub peek_link {
- my($r,$q,$name,$type) = @_;
- return unless status_config($r, "StatusPeek");
- return unless $is_installed{"Apache::Peek"};
- my $script = $q->script_name;
- return qq(\n<a href="$script/$name/$type?noh_peek">Peek Dump</a>\n);
-}
-
-sub noh_peek {
- my $r = shift;
- $r->send_http_header("text/plain");
- no strict 'refs';
- my($name,$type) = (split "/", $r->uri)[-2,-1];
- $type =~ s/^FUNCTION$/CODE/;
- $r->print("Peek Dump of $name $type\n\n");
- Apache::Peek::Dump(*{$name}{$type});
-}
-
-sub xref_link {
- my($r,$q,$name) = @_;
- my $script = $q->script_name;
- return unless $is_installed{"B::Xref"};
- return qq(\n<a href="$script/$name?noh_xref">Cross Reference Report</a>\n);
-}
-
-sub noh_xref {
- my $r = shift;
- require B::Xref;
- (my $thing = $r->path_info) =~ s:^/::;
- $r->send_http_header("text/plain");
- print "Xref of $thing\n";
- B::Xref::compile($thing)->();
-}
-
-$Apache::Status::BGraphCache ||= 0;
-if ($Apache::Status::BGraphCache) {
- Apache->push_handlers(PerlChildExitHandler => sub {
- unlink keys %Apache::Status::BGraphCache;
- });
-}
-
-sub noh_b_graph {
- my $r = shift;
- require B::Graph;
-
- untie *STDOUT;
-
- my $dir = $r->server_root_relative(
- $r->dir_config("GraphDir") || "logs/b_graphs");
-
- mkdir $dir, 0755 unless -d $dir;
-
- (my $thing = $r->path_info) =~ s:^/::;
- $thing =~ s{::}{-}g; # :: is not allowed in the filename on some OS
- my $type = "dot";
- my $file = "$dir/$thing.$$.gif";
-
- unless (-e $file) {
- tie *STDOUT, "B::Graph", $r, $file;
- B::Graph::compile("-$type", $thing)->();
- (tied *STDOUT)->{graph}->close;
- }
-
- if(-s $file) {
- local *FH;
- open FH, $file or
- die "can't open $file $!";
- $r->send_http_header("image/gif");
- $r->send_fd(\*FH);
- }
- else {
- $r->send_http_header("text/plain");
- $r->print("Graph of $thing failed!\n");
- }
- if ($Apache::Status::BGraphCache) {
- $Apache::Status::BGraphCache{$file}++;
- }
- else {
- unlink $file;
- }
-
- 0;
-}
-
-sub B::Graph::TIEHANDLE {
- my($class, $r, $file) = @_;
-
- if ($file =~ /^([^<>|;]+)$/) {
- $file = $1;
- }
- else {
- die "TAINTED data in THING=> ($file)";
- }
-
- $ENV{PATH} = join ":", qw{/usr/bin /usr/local/bin};
- my $dot = $r->dir_config("Dot") || "dot";
-
- my $pipe = IO::File->new("|$dot -Tgif -o $file");
- $pipe or die "can't open pipe to dot $!";
- $pipe->autoflush(1);
-
- return bless {
- graph => $pipe,
- r => $r,
- }, $class;
-}
-
-sub B::Graph::PRINT {
- my $self = shift;
- $self->{graph}->print(@_);
-}
-
-my %can_dump = map {$_,1} qw(scalars arrays hashes);
-
-sub as_HTML {
- my($self, $package, $r, $q) = @_;
- my @m = qw(<TABLE>);
- my $uri = $r->uri;
- my $is_main = $package eq "main";
-
- my $do_dump = status_config($r, "StatusDumper");
-
- my @methods = sort keys %{$self->{'AUTOLOAD'}};
-
- if($is_main) {
- @methods = grep { $_ ne "packages" } @methods;
- unshift @methods, "packages";
- }
-
- for my $type (@methods) {
- (my $dtype = uc $type) =~ s/E?S$//;
- push @m, "<TR><TD valign=top><B>$type</B></TD>";
- my @line = ();
-
- for (sort $self->_partdump(uc $type)) {
- s/([\000-\037\177])/ '^' . pack('c', ord($1) ^ 64)/eg;
-
- if($type eq "scalars") {
- no strict 'refs';
- next unless defined eval { $$_ };
- }
-
- if($type eq "packages") {
- push @line, qq(<a href="$uri?$_">$_</a>);
- }
- elsif($type eq "functions") {
- if($is_installed{B}) {
- push @line, qq(<a href="$uri/$_/$dtype?cv_dump">$_</a>);
- }
- else {
- push @line, $_;
- }
- }
- elsif($do_dump and $can_dump{$type} and
- $is_installed{"Data::Dumper"}) {
- next if /_</;
- push @line, qq(<a href="$uri/$_/$dtype?data_dump">$_</a>);
- }
- else {
- push @line, $_;
- }
- }
- push @m, "<TD>" . join(", ", @line) . "</TD></TR>\n";
- }
- push @m, "</TABLE>";
-
- return join "\n", @m, "<hr>", b_package_size_link($r, $q, $package);
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::Status - Embedded interpreter status information
-
-=head1 SYNOPSIS
-
- <Location /perl-status>
- SetHandler perl-script
- PerlHandler Apache::Status
- </Location>
-
-=head1 DESCRIPTION
-
-The B<Apache::Status> module provides some information
-about the status of the Perl interpreter embedded in the server.
-
-Configure like so:
-
- <Location /perl-status>
- SetHandler perl-script
- PerlHandler Apache::Status
- </Location>
-
-Other modules can "plugin" a menu item like so:
-
- Apache::Status->menu_item(
- 'DBI' => "DBI connections", #item for Apache::DBI module
- sub {
- my($r,$q) = @_; #request and CGI objects
- my(@strings);
- push @strings, "blobs of html";
- return \@strings; #return an array ref
- }
- ) if Apache->module("Apache::Status"); #only if Apache::Status is loaded
-
-B<WARNING>: Apache::Status must be loaded before these modules via the
-PerlModule or PerlRequire directives.
-
-=head1 OPTIONS
-
-=over 4
-
-=item StatusOptionsAll
-
-This single directive will enable all of the options described below.
-
- PerlSetVar StatusOptionsAll On
-
-=item StatusDumper
-
-When browsing symbol tables, the values of arrays, hashes ans calars
-can be viewed via B<Data::Dumper> if this configuration variable is set
-to On:
-
- PerlSetVar StatusDumper On
-
-=item StatusPeek
-
-With this option On and the B<Apache::Peek> module installed,
-functions and variables can be viewed ala B<Devel::Peek> style:
-
- PerlSetVar StatusPeek On
-
-=item StatusLexInfo
-
-With this option On and the B<B::LexInfo> module installed,
-subroutine lexical variable information can be viewed.
-
- PerlSetVar StatusLexInfo On
-
-=item StatusDeparse
-
-With this option On and B<B::Deparse> version 0.59 or higher
-(included in Perl 5.005_59+), subroutines can be "deparsed".
-
- PerlSetVar StatusDeparse On
-
-Options can be passed to B::Deparse::new like so:
-
- PerlSetVar StatusDeparseOptions "-p -sC"
-
-See the B<B::Deparse> manpage for details.
-
-=item StatusTerse
-
-With this option On, text-based op tree graphs of subroutines can be
-displayed, thanks to B<B::Terse>.
-
- PerlSetVar StatusTerse On
-
-=item StatusTerseSize
-
-With this option On and the B<B::TerseSize> module installed,
-text-based op tree graphs of subroutines and their size can be
-displayed. See the B<B::TerseSize> docs for more info.
-
- PerlSetVar StatusTerseSize On
-
-=item StatusTerseSizeMainSummary
-
-With this option On and the B<B::TerseSize> module installed, a
-"Memory Usage" will be added to the Apache::Status main menu. This
-option is disabled by default, as it can be rather cpu intensive to
-summarize memory usage for the entire server. It is strongly
-suggested that this option only be used with a development server
-running in B<-X> mode, as the results will be cached.
-
- PerlSetVar StatusTerseSizeMainSummary On
-
-=item StatusGraph
-
-When B<StatusDumper> is enabled, another link "OP Tree Graph" will be
-present with the dump if this configuration variable is set to On:
-
- PerlSetVar StatusGraph
-
-This requires the B module (part of the Perl compiler kit) and
-B::Graph (version 0.03 or higher) module to be installed along with
-the B<dot> program.
-
-Dot is part of the graph visualization toolkit from AT&T:
-C<http://www.research.att.com/sw/tools/graphviz/>).
-
-B<WARNING>: Some graphs may produce very large images, some graphs may
-produce no image if B::Graph's output is incorrect.
-
-=item Dot
-
-Location of the dot program for StatusGraph,
-if other than /usr/bin or /usr/local/bin
-
-=item GraphDir
-
-Directory where StatusGraph should write it's temporary image files.
-Default is $ServerRoot/logs/b_graphs
-
-=back
-
-=head1 PREREQUISITES
-
-The I<Devel::Symdump> module, version B<2.00> or higher.
-
-=head1 SEE ALSO
-
-perl(1), Apache(3), Devel::Symdump(3), Data::Dumper(3), B(3), B::Graph(3)
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-
diff --git a/tags/v1_29/lib/Apache/Symdump.pm b/tags/v1_29/lib/Apache/Symdump.pm
deleted file mode 100644
index 8945ffa..0000000
--- a/tags/v1_29/lib/Apache/Symdump.pm
+++ /dev/null
@@ -1,66 +0,0 @@
-package Apache::Symdump;
-
-use strict;
-use Devel::Symdump ();
-use Apache::File ();
-
-my $X = 0;
-
-sub logfile {
- my($r, $name) = @_;
- $r->server_root_relative("logs/$name.$$.$X");
-}
-
-sub inc_snap {
- my $r = shift;
- my $fname = logfile($r, "incdump");
- my $fh = Apache::File->new(">$fname") or die $!;
- print $fh map { "$_ = $INC{$_}\n" } sort keys %INC;
- close $fh;
-}
-
-sub handler {
- my $r = shift;
- my $fname = logfile($r, "symdump");
- my $fh = Apache::File->new(">$fname") or die $!;
- print $fh +Devel::Symdump->rnew()->as_string;
- close $fh;
- inc_snap($r);
- $X++;
-}
-
-1;
-__END__
-
-=head1 NAME
-
-Apache::Symdump - Symbol table snapshots
-
-=head1 SYNOPSIS
-
- PerlLogHandler Apache::Symdump
-
-=head1 DESCRIPTION
-
-Apache:Symdump uses Devel::Symdump to record snapshots of the Perl symbol
-table in ServerRoot/logs/symdump.$$.$n
-Where B<$$> is the process id and B<$n> is incremented each time the handler
-is run. The B<diff> utility can be used to compare snapshots and get an idea
-of what might be making a process grow. Normally, new symbols come from
-modules or scripts that were not preloaded, the Perl method cache, etc.
-
- % diff -u symdump.$$.0 symdump.$$.1
-
-=head1 CAVEATS
-
-Apache::Symdump does not cleanup up its snapshot files, do so simply by:
-
- % rm logs/symdump.* logs/incdump.*
-
-=head1 SEE ALSO
-
-Devel::Symdump(3), Apache::Leak(3)
-
-=head1 AUTHOR
-
-Doug MacEachern
diff --git a/tags/v1_29/lib/Apache/fork.pm b/tags/v1_29/lib/Apache/fork.pm
deleted file mode 100644
index 3ea6148..0000000
--- a/tags/v1_29/lib/Apache/fork.pm
+++ /dev/null
@@ -1,96 +0,0 @@
-package Apache::fork;
-
-use strict;
-use Exporter ();
-@Apache::fork::EXPORT = qw(fork forkoption);
-$Apache::fork::VERSION = '1.00';
-
-*import = \&Exporter::import;
-
-if($ENV{MOD_PERL}) {
- *fork = \&Apache::fork;
- *forkoption = \&Apache::forkoption;
-}
-else {
- *forkoption = sub {};
- *fork = \&CORE::fork;
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::fork - Override Perl's built-in fork()
-
-=head1 SYNOPSIS
-
- use Apache::fork;
-
-=head1 DESCRIPTION
-
-The B<fork> function defined in this module will override Perl's
-built-in B<fork> function so that any children resulting from a fork()
-will (optionally) close any open listening http sockets (main server
-and virtuals) and/or kill the child httpd process with exit() is called.
-
-TOGGLING:
-forkoption(int) usage:
-
-int can be one of the following...
-
-0 = Nothing, perform your normal fork().
-1 = Have the child resulting from a fork close all listening sockets.
-2 = Have the child resulting from a fork() die with exit() is called.
-3 = Do both 1 and 2.
-
-Default is 3.
-
-NOTE: forkoption is NOT reset to default between hits, why? So you
-could set it in a perlscript and have it last across clients/runs (ie
-so you wouldn't need to go modifying your mod_perl (or in my case,
-pure CGI/perl scripts. ;)
-
-ALSO NOTE: The parent process will still have the http sockets open, so
-it can still communicate with the downstream client, as well as still
-accept connections after the client has disconnected, it's only the
-resulting child who will no longer have the http sockets open.
-
-ANOTHER NOTE: The child STILL has the socket open to the client, it's
-just the listening sockets (port 80, etc) that's closed.
-
-AYA NOTE: ALL listening sockets are closed, for the main server AND
-for any alternative ports you have the httpd process listening to.
-
-WHY?: Sometimes, you want to have your script fork, then exec a process
-so that it can perform some nifty thing in the background. Unfortunatly,
-when you fork (and exec), all open file descriptors are passed along,
-including the listening HTTP sockets that are used by the server to
-accept connections, which can be a bad thing. (ie. Child is forked,
-forked child has port 80 open, forked child exec()'s whatever, now
-whatever has port 80 open, server is HUP'd, restarted, whatever...
-'course, it can't because some other process already has control over
-port 80 (ie, whatever)) Ow? ;)
-
-Also, forked children would "hang around" when they were finished (or
-exit()'d) unless exit(-2) was used. And, the original parent httpd
-had no clue the children even existed. Essentually, you'd end up
-with an indefinite number of httpd processes (as each forked()'d child
-would never exit). Of course, with the socket closing patch in
-place... those children never again served another page either.
-
-This patch was made essentually to make fork() under mod_perl act
-like you'd expect it to (so modules that might be used by non-mod_perl
-scripts wouldn't need to be modified)
-
-Incase any of you were curious, all my CGI scripts run unmodified under
-mod_perl. Not a single line of mod_perl anything in them. If they
-won't work under mod_perl for some odd reason, I just modify mod_perl
-so they do. ;)
-
-=head1 AUTHOR
-
-Michael Turner, mturner@spry.com
-
-=cut
diff --git a/tags/v1_29/lib/Apache/httpd_conf.pm b/tags/v1_29/lib/Apache/httpd_conf.pm
deleted file mode 100644
index 28f4f49..0000000
--- a/tags/v1_29/lib/Apache/httpd_conf.pm
+++ /dev/null
@@ -1,267 +0,0 @@
-package Apache::httpd_conf;
-
-use strict;
-use vars qw($VERSION $AUTOLOAD);
-use File::Path ();
-use IO::File ();
-use Cwd ();
-
-$VERSION = '0.01';
-
-sub new {
- my $class = shift;
- my $self = bless {
- base => "",
- @_,
- }, $class;
- $self->{base} ||= (Cwd::fastcwd()."/t");
- return $self;
-}
-
-sub write {
- my $self = shift;
- my $args = {@_};
-
- while(my($k,$v) = each %$args) {
- $self->{$k} = $v;
- }
-
- my $base = $self->{base};
-
- #XXX this sucks, find a better way
- $Apache::httpd_conf::BaseDir = $base;
-
- unless (-d "$base/conf") {
- for (qw(conf logs docs perl)) {
- File::Path::mkpath("$base/$_", 0, 0755);
- }
- }
-
- my $fh = IO::File->new(">$base/conf/httpd.conf") or
- die "can't open $base/conf/httpd.conf $!";
-
- print $fh "PerlPassEnv PERL5LIB\n";
- print $fh "<Perl>\n";
- print $fh "BEGIN { \$Apache::httpd_conf::BaseDir = '$base'; }\n";
- print $fh "use ", __PACKAGE__, "();\n";
- print $fh "</Perl>\n";
-
- while(my($k,$v) = each %$self) {
- next unless $k =~ /^[A-Z]/;
- no strict;
- ${"Apache::ReadConfig::".$k} = $v;
- print $fh "$k $v\n";
- }
- print $fh "\n";
-
- $fh->close;
-}
-
-sub server_start {
- my $self = shift;
- my @args = ();
- my $args = {catch_sig => 1};
- my $know_where = 0;
-
- my %not_for_httpd = map { $_,1 } qw{httpd catch_sig};
-
- do {
- ++$know_where if /^-(d|f)/;
-
- if($not_for_httpd{$_}) {
- $args->{$_} = shift;
- }
- else {
- push @args, $_ if $_;
- }
- } while $_ = shift;
-
- my $httpd = $args->{httpd} ||
- prompt("where is your httpd?", "/opt/www/apache/httpd");
-
- push @args, "-d" => $Apache::httpd_conf::BaseDir unless $know_where;
-
- $self->catch_signals if $args->{catch_sig};
-
- system "$httpd @args &";
-}
-
-sub pid {
- my $self = shift;
- my $pid_file = join "/", $self->{base}, $self->PidFile;
-
- my $fh = IO::File->new($pid_file) or
- die "can't open $pid_file $!\n";
- chomp(my $pid = <$fh>);
- return $pid;
-}
-
-sub server_stop {
- kill 9, shift->pid;
-}
-
-sub server_url {
- no strict;
- require URI::URL;
- my $url = URI::URL->new();
- $url->scheme('http');
- $url->host($Apache::ReadConfig::ServerName || "localhost");
- $url->port($Apache::ReadConfig::Port || 80);
- return $url;
-}
-
-sub catch_signals {
- my $self = shift;
- $SIG{INT} = $SIG{__DIE__} =
- sub { print "stopping httpd\n"; $self->server_stop; exit(); }
-}
-
-sub prompt {
- my($mess,$def) = @_;
- print "$mess [$def]";
- STDIN->untaint;
- chomp(my $ans = <STDIN>);
- $ans || $def;
-}
-
-sub AUTOLOAD {
- my $self = shift;
- my $name = (split "::", $AUTOLOAD)[-1];
- my $val = shift || "";
-
- my $retval = ${$Apache::ReadConfig::{$name}};
-
- ${$Apache::ReadConfig::{$name}} = $val if $val;
-
- return $retval;
-}
-
-sub DESTROY {}
-
-package Apache::ReadConfig;
-
-no strict;
-
-use subs qw(prompt);
-*prompt = \&Apache::httpd_conf::prompt;
-
-my $dir = $Apache::httpd_conf::BaseDir || "";
-
-unless ($dir) {
- my $cwd = Cwd::fastcwd();
- for ($cwd, "$cwd/t") {
- $dir = $_, last if -d "$_/logs";
- }
-}
-
-my $Is_Win32 = ($^O eq "MSWin32");
-
-$ServerRoot = $dir;
-
-my $startup = "$ServerRoot/startup.pl";
-
-if(-e $startup) {
- push @PerlRequire, $startup;
-}
-
-
-$User = $Is_Win32 ? "nobody" : (getpwuid($>) || $>);
-$Group = $Is_Win32 ? "nogroup" : (getgrgid($)) || $));
-
-if($User eq "root") {
- my $other = (getpwnam('nobody'))[0];
- $User = $other if $other;
-}
-if($User eq "root") {
- print "Cannot run tests as User `$User'\n";
- $User = prompt "Which User?", "nobody";
- $Group = prompt "Which Group?", $Group;
-}
-#print "Will run tests as User: '$User' Group: '$Group'\n";
-
-$Port = 8529;
-$DocumentRoot = $dir ? "$dir/docs" : "docs";
-$ServerName = "localhost";
-
-@Alias = () unless @Alias;
-
-for (qw(/perl /cgi-bin)) {
- push @Alias, [$_ => $dir ? "$dir/perl" : "perl"];
-}
-
-my @mod_perl = (
- SetHandler => "perl-script",
- PerlHandler => "Apache::Registry",
- Options => "+ExecCGI",
-);
-
-push @AddType, ["text/x-server-parsed-html" => ".shtml"];
-
-$Location{"/perl"} = {
- @mod_perl,
-};
-
-$Location{"/cgi-bin"} = {
- SetHandler => "cgi-script",
- Options => "+ExecCGI",
-};
-
-$Location{"/perl-status"} = {
- SetHandler => "perl-script",
- PerlHandler => "Apache::Status",
-};
-
-for (qw(status info)) {
- $Location{"/server-$_"} = {
- SetHandler => "server-$_",
- };
-}
-
-$ErrorLog = "logs/error_log";
-$PidFile = "logs/httpd.pid";
-$LockFile = "logs/lock";
-
-for my $sym (
- qw{
- ResourceConfig AccessConfig TypesConfig TransferLog ScoreBoardFile
- }
- )
-{
- $$sym = "/dev/null";
-}
-
-while (my($k,$v) = each %Apache::ReadConfig::) {
- $$k ||= $v if defined $$k; #avoid -w warnings
-}
-
-1;
-__END__
-
-=head1 NAME
-
-Apache::httpd_conf - Generate an httpd.conf file
-
-=head1 SYNOPSIS
-
- use Apache::httpd_conf ();
-
- Apache::httpd_conf->write(Port => 8888);
-
-=head1 DESCRIPTION
-
-The Apache::httpd_conf module will generate a tiny httpd.conf file,
-which pulls itself back in via a <Perl> section. Any additional
-arguments passed to the C<write> method will be added to the generated
-httpd.conf file, and will override those defaults set in the <Perl>
-section. This module is handy mostly for starting httpd servers to
-test mod_perl scripts and modules.
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-=head1 SEE ALSO
-
-mod_perl(3), Apache::PerlSections(3)
-
-=cut
diff --git a/tags/v1_29/lib/Apache/src.pm b/tags/v1_29/lib/Apache/src.pm
deleted file mode 100644
index 12dca08..0000000
--- a/tags/v1_29/lib/Apache/src.pm
+++ /dev/null
@@ -1,449 +0,0 @@
-package Apache::src;
-
-use strict;
-use vars qw($VERSION);
-use File::Path ();
-use IO::File ();
-use Cwd ();
-use Config;
-
-#this is stuff ripped out of mod_perl's Makefile.PL
-#there's still commented out crap
-#there's still stuff to be added
-#once it is sane, we'll use these methods in Makefile.PL
-
-$VERSION = '0.01';
-sub IS_MOD_PERL_BUILD () {grep { -e "$_/lib/mod_perl.pm" } qw(. ..)}
-my $Is_Win32 = ($^O eq "MSWin32");
-$Apache::src::APXS ||= "";
-
-sub apxs {
- my $self = shift;
- eval { require Apache::MyConfig };
- my $apxs;
- my @trys = ($Apache::src::APXS,
- $Apache::MyConfig::Setup{'APXS'});
-
- unless (IS_MOD_PERL_BUILD) {
- #if we are building mod_perl via apxs, apxs should already be known
- #these extra tries are for things built outside of mod_perl
- #e.g. libapreq
- push @trys,
- which("apxs"),
- "/usr/local/apache/bin/apxs";
- }
-
- for (@trys) {
- next unless ($apxs = $_);
- chomp $apxs;
- last if -x $apxs;
- }
- return "" unless $apxs and -x $apxs;
- `$apxs @_ 2>/dev/null`;
-}
-
-sub apxs_cflags {
- my $cflags = __PACKAGE__->apxs("-q" => 'CFLAGS');
- #$cflags =~ s/-D\w+=\".*\"//g; #get rid of -Ds with quotes
- $cflags =~ s/\"/\\\"/g;
- $cflags;
-}
-
-sub which {
- my $name = shift;
-
- for (split ':', $ENV{PATH}) {
- my $app = "$_/$name";
- return $app if -x $app;
- }
-
- return "";
-}
-
-sub new {
- my $class = shift;
- my $dir;
-
- if(IS_MOD_PERL_BUILD) {
- eval {
- require "../lib/Apache/MyConfig.pm";
- };
-
- unless ($@) {
- $dir = $Apache::MyConfig::Setup{Apache_Src};
- for ($dir, "../$dir", "../../$dir") {
- last if -d ($dir = $_);
- }
- }
- }
-
- unless ($dir) {
- for (@INC) {
- last if -d ($dir = "$_/auto/Apache/include");
- }
- }
-
- bless {
- dir => $dir,
- @_,
- }, $class;
-}
-
-sub mmn_eq {
- my($class, $dir) = @_;
-# return 1 if $Is_Win32; #just assume, till Apache::src works under win32
- my $instsrc;
- my $instdir;
- for (@INC) {
- last if -d ($instdir = "$_/auto/Apache/include");
- }
- $instsrc = $class->new(dir => $instdir);
- my $targsrc = $class->new($dir ? (dir => $dir) : ());
-
- my $inst_mmn = $instsrc->module_magic_number;
- my $targ_mmn = $targsrc->module_magic_number;
-
- unless ($inst_mmn && $targ_mmn) {
- return 0;
- }
- if ($inst_mmn == $targ_mmn) {
- return 1;
- }
- print "Installed MMN $inst_mmn does not match target $targ_mmn\n";
- return 0;
-}
-
-sub default_dir {
- eval { require Apache::MyConfig };
- return $@ ?
- '../apache_x.x/src' :
- $Apache::MyConfig::Setup{Apache_Src};
-
-}
-
-sub find {
- my $self = shift;
- my %seen = ();
- my @dirs = ();
-
- for my $src_dir ($self->dir,
- $self->default_dir,
- <../apache*/src>,
- <../stronghold*/src>,
- "../src", "./src")
- {
- next unless (-d $src_dir || -l $src_dir);
- next if $seen{$src_dir}++;
-=pod
- next unless $vers = httpd_version($src_dir);
- unless(exists $vers_map{$vers}) {
- print STDERR "Apache version '$vers' unsupported\n";
- next;
- }
- $mft_map{$src_dir} = $vers_map{$vers};
- #print STDERR "$src_dir -> $vers_map{$vers}\n";
-=cut
- push @dirs, $src_dir;
- #$modified{$src_dir} = (stat($src_dir))[9];
- }
- return @dirs;
-}
-
-sub dir {
- my($self, $dir) = @_;
- $self->{dir} = $dir if $dir;
- return $self->{dir};
-}
-
-sub main {
- my $self = shift;
- asrc(shift || $self->dir);
-}
-
-sub asrc {
- my $d = shift;
- return $d if -e "$d/httpd.h";
- return "$d/include" if -e "$d/include/httpd.h";
- return "$d/main" if -e "$d/main/httpd.h";
- return Apache::src->apxs("-q" => 'INCLUDEDIR');
-}
-
-sub module_magic_number {
- my $self = shift;
- my $d = asrc(shift || $self->dir);
-
- return 0 unless $d;
-
- #return $mcache{$d} if $mcache{$d};
- my $fh;
- for (qw(ap_mmn.h http_config.h)) {
- last if $fh = IO::File->new("$d/$_");
- }
- return 0 unless $fh;
-
- my $n;
- my $mmn_pat = join "|", qw(MODULE_MAGIC_NUMBER_MAJOR MODULE_MAGIC_NUMBER);
- while(<$fh>) {
- if(s/^#define\s+($mmn_pat)\s+(\d+).*/$2/) {
- chomp($n = $_);
- last;
- }
- }
- $fh->close;
- #return($mcache{$d} = $n);
- return $n;
-}
-
-sub httpd_version {
- my($self, $dir, $vnumber) = @_;
- $dir = asrc($dir || $self->dir);
-
- if($vnumber) {
- #return $vcache{$dir} if $vcache{$dir};
- }
-
- my $fh = IO::File->new("$dir/httpd.h") or return undef;
- my($server, $version, $rest);
- my($fserver, $fversion, $frest);
- my($string, $extra, @vers);
-
- while(<$fh>) {
- next unless /^#define/;
- s/SERVER_PRODUCT \"/\"Apache/; #1.3.13
- next unless s/^#define\s+SERVER_(BASE|)(VERSION|REVISION)\s+"(.*)\s*".*/$3/;
- unless (m:/:) {
- $_ = "Apache/$_"; #1.3.14, argh
- }
- chomp($string = $_);
-
- #print STDERR "Examining SERVER_VERSION '$string'...";
- #could be something like:
- #Stronghold-1.4b1-dev Ben-SSL/1.3 Apache/1.1.1
- @vers = split /\s+/, $string;
- foreach (@vers) {
- next unless ($fserver,$fversion,$frest) =
- m,^([^/]+)/(\d\.\d+\.?\d*)([^ ]*),i;
-
- if($fserver eq "Apache") {
- ($server, $version) = ($fserver, $fversion);
- #$frest =~ s/^(a|b)(\d+).*/'_' . (length($2) > 1 ? $2 : "0$2")/e;
- $version .= $frest if $frest;
- }
- }
- }
- $fh->close;
-
- return $version;
-}
-
-sub find_in_inc {
- my $name = shift;
- for (@INC) {
- my $file;
- if (-e ($file = "$_/auto/Apache/$name")) {
- return $file;
- }
- }
-}
-
-sub otherldflags {
- my $self = shift;
- my @ldflags = ();
-
- if ($^O eq "aix") {
- if (my $file = find_in_inc("mod_perl.exp")) {
- push @ldflags, "-bI:" . $file;
- }
- my $httpdexp = $self->apxs("-q" => 'LIBEXECDIR') . "/httpd.exp";
- if (-e $httpdexp) {
- push @ldflags, "-bI:$httpdexp";
- } else {
- $httpdexp = $self->dir . "/support/httpd.exp";
- push @ldflags, "-bI:$httpdexp" if -e $httpdexp;
- }
- }
- return join(' ', @ldflags);
-}
-
-sub typemaps {
- my $typemaps = [];
-
- if (my $file = find_in_inc("typemap")) {
- push @$typemaps, $file;
- }
-
- if(IS_MOD_PERL_BUILD) {
- push @$typemaps, "../Apache/typemap";
- }
-
- return $typemaps;
-}
-
-sub inc {
- my $self = shift;
- my $src = $self->dir;
- my $main = $self->main;
- my $os = $Is_Win32 ? "win32" : "unix";
- my @inc = ();
- for ($src, "$src/modules/perl", $main, "$src/regex", "$src/os/$os") {
- push @inc, "-I$_" if -d $_;
- }
- my $ssl_dir = "$src/../ssl/include";
- unless (-d $ssl_dir) {
- eval { require Apache::MyConfig };
- $ssl_dir = "$Apache::MyConfig::Setup{SSL_BASE}/include";
- }
- push @inc, "-I$ssl_dir" if -d $ssl_dir;
- my $ainc = $self->apxs("-q" => 'INCLUDEDIR');
- push @inc, "-I$ainc" if -d $ainc;
- return "@inc";
-}
-
-sub ccflags {
- my $self = shift;
- my $cflags = $Config{'ccflags'};
- join " ", $cflags, $self->apxs("-q" => 'CFLAGS');
-}
-
-sub define {
- my $self = shift;
- if($Config{usethreads}) {
- return "-DPERL_THREADS";
- }
- return "";
-}
-
-=pod
-
-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?");
-}
-
-=cut
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::src - Methods for locating and parsing bits of Apache source code
-
-=head1 SYNOPSIS
-
- use Apache::src ();
- my $src = Apache::src->new;
-
-=head1 DESCRIPTION
-
-This module provides methods for locating and parsing bits of Apache
-source code.
-
-=head1 METHODS
-
-=over 4
-
-=item new
-
-Create an object blessed into the B<Apache::src> 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";
-
-=item main
-
-Apache's source tree was reorganized during development of version 1.3.
-So, common header files such as C<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";
-
-=item 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";
- ...
- }
-
-=item inc
-
-Print include paths for MakeMaker's B<INC> argument to
-C<WriteMakefile>.
-
-Example:
-
- use ExtUtils::MakeMaker;
-
- use Apache::src ();
-
- WriteMakefile(
- 'NAME' => 'Apache::Module',
- 'VERSION' => '0.01',
- 'INC' => Apache::src->new->inc,
- );
-
-
-=item module_magic_number
-
-Return the B<MODULE_MAGIC_NUMBER> defined in the apache source.
-
-Example:
-
- my $mmn = $src->module_magic_number;
-
-=item httpd_version
-
-Return the server version.
-
-Example:
-
- my $v = $src->httpd_version;
-
-=item otherldflags
-
-Return other ld flags for MakeMaker's B<dynamic_lib> argument to
-C<WriteMakefile>. This might be needed on systems like AIX that need
-special flags to the linker to be able to reference mod_perl or httpd
-symbols.
-
-Example:
-
- use ExtUtils::MakeMaker;
-
- use Apache::src ();
-
- WriteMakefile(
- 'NAME' => 'Apache::Module',
- 'VERSION' => '0.01',
- 'INC' => Apache::src->new->inc,
- 'dynamic_lib' => {
- 'OTHERLDFLAGS' => Apache::src->new->otherldflags,
- },
- );
-
-=back
-
-
-=head1 AUTHOR
-
-Doug MacEachern
-
diff --git a/tags/v1_29/lib/Apache/testold.pm b/tags/v1_29/lib/Apache/testold.pm
deleted file mode 100644
index 556f3e4..0000000
--- a/tags/v1_29/lib/Apache/testold.pm
+++ /dev/null
@@ -1,709 +0,0 @@
-package Apache::testold;
-
-use strict;
-use vars qw(@EXPORT $USE_THREAD $USE_SFIO $PERL_DIR @EXPORT_OK $VERSION);
-use Exporter ();
-use Config;
-use FileHandle ();
-*import = \&Exporter::import;
-
-$VERSION = "0.01";
-
-@EXPORT = qw(test fetch simple_fetch have_module skip_test
- $USE_THREAD $USE_SFIO $PERL_DIR WIN32 grab run_test);
-@EXPORT_OK = qw(have_httpd);
-
-BEGIN {
- $ENV{PERL_LWP_USE_HTTP_10} = 1; #default to http/1.0
-
- if(not $ENV{MOD_PERL}) {
- eval { require "net/config.pl"; }; #for 'make test'
- $PERL_DIR = $net::perldir;
- }
- if ($net::httpserver) {
- # Validate that the OS knows the name of the server in $net::httpserver
- # if 'localhost' is not defined, the tests wouldn't pass
- (my $hostname) = ($net::httpserver =~ /(.*?):/);
- warn qq{\n*** [Crucial] You must define "$hostname" (e.g. in /etc/hosts) in order for 'make test' to pass\n}
- unless gethostbyname $hostname;
- }
-}
-
-$PERL_DIR = $ENV{PERL_DIR} if exists $ENV{PERL_DIR};
-
-$USE_THREAD = ($Config{extensions} =~ /Thread/) || $Config{usethreads};
-$USE_SFIO = (($Config{'usesfio'} || '') eq 'true');
-
-my $Is_Win32 = ($^O eq "MSWin32");
-sub WIN32 () { $Is_Win32 };
-
-my $UA;
-
-eval {
- require LWP::UserAgent;
- require URI::URL;
- $UA = LWP::UserAgent->new;
-};
-
-unless (defined &Apache::bootstrap) {
- *Apache::bootstrap = sub {};
- *Apache::Constants::bootstrap = sub {};
-}
-
-sub write_httpd_conf {
- my $pkg = shift;
- my %args = (conf_file => 't/httpd.conf', @_);
- my $DIR = `pwd`; chomp $DIR;
-
- local *CONF;
- open CONF, ">$args{conf_file}" or die "Can't create $args{conf_file}: $!";
- print CONF <<EOF;
-
-Port $args{port}
-User $args{user}
-Group $args{group}
-ServerName localhost
-DocumentRoot $DIR/t
-
-$args{modules}
-
-ErrorLog $DIR/t/error_log
-PidFile $DIR/t/httpd.pid
-AccessConfig /dev/null
-ResourceConfig /dev/null
-LockFile $DIR/t/httpd.lock
-TypesConfig /dev/null
-TransferLog /dev/null
-ScoreBoardFile /dev/null
-
-AddType text/html .html
-
-# Look in ./blib/lib
-#PerlModule ExtUtils::testlib
-<Perl>
- use lib "$DIR/blib/lib", "$DIR/t/lib";
-</Perl>
-
-$args{include}
-EOF
-
- return 1;
-}
-
-sub _ask {
- # Just a function for asking the user questions
- my ($prompt, $default, $mustfind, $canskip) = @_;
-
- my $skip = defined $canskip ? " ('$canskip' to skip)" : '';
- my $response;
- do {
- print "$prompt [$default]$skip: ";
- chomp($response = <STDIN>);
- $response ||= $default;
- } until (!$mustfind || ($response eq $canskip) || (-e $response || !print("$response not found\n")));
-
- return $response;
-}
-
-sub get_test_params {
- my $pkg = shift;
-
- print("\nFor testing purposes, please give the full path to an httpd\n",
- "with mod_perl enabled. The path defaults to \$ENV{APACHE}, if present.");
-
- my %conf;
-
- my $httpd = $ENV{'APACHE'} || which('apache') || which('httpd') || '/usr/lib/httpd/httpd';
-
- $httpd = _ask("\n", $httpd, 1, '!');
- if ($httpd eq '!') {
- print "Skipping.\n";
- return;
- }
- system "$Config{lns} $httpd t/httpd";
-
- # Default: search for dynamic dependencies if mod_so is present, don't bother otherwise.
- my $default = (`t/httpd -l` =~ /mod_so\.c/ ? 'y' : 'n');
- if (lc _ask("Search existing config file for dynamic module dependencies?", $default) eq 'y') {
- my %compiled;
- for (`t/httpd -V`) {
- if (/([\w]+)="(.*)"/) {
- $compiled{$1} = $2;
- }
- }
- $compiled{SERVER_CONFIG_FILE} =~ s,^,$compiled{HTTPD_ROOT}/,
- unless $compiled{SERVER_CONFIG_FILE} =~ m,^/,;
-
- my $file = _ask(" Config file", $compiled{SERVER_CONFIG_FILE}, 1);
- $conf{modules} = $pkg->_read_existing_conf($file);
- }
-
- # Get default user (apache doesn't like to run as root, special-case it)
- my $defuser = ($< && getpwuid $<) || 'nobody';
- $conf{user} = _ask("User to run tests under", $defuser);
-
- my $defgroup = ($defuser eq 'nobody' ? 'nobody' : getgrgid((getpwnam $conf{user})[3]));
- $conf{group} = _ask("Group to run tests under", $defgroup);
-
- $conf{port} = _ask("Port to run tests under", 8228);
-
- return %conf;
-}
-
-sub _read_existing_conf {
- # Returns some "(Add|Load)Module" config lines, generated from the
- # existing config file and a few must-have modules.
- my ($self, $server_conf) = @_;
-
- open SERVER_CONF, $server_conf or die "Couldn't open $server_conf: $!";
- my @lines = grep {!m/^\s*\#/} <SERVER_CONF>;
- close SERVER_CONF;
-
- my @modules = grep /^\s*(Add|Load)Module/, @lines;
- my ($server_root) = (map /^\s*ServerRoot\s*(\S+)/, @lines);
- $server_root =~ s/^"//;
- $server_root =~ s/"$//;
-
- # Rewrite all modules to load from an absolute path.
- foreach (@modules) {
- s!(\s)([^/\s]\S+/)!$1$server_root/$2!;
- }
-
- my $static_mods = $self->static_modules('t/httpd');
-
- my @load;
- # Have to make sure that dir, autoindex and perl are loaded.
- foreach my $module (qw(dir autoindex perl)) {
- unless ($static_mods->{"mod_$module"} or grep /$module/i, @modules) {
- warn "Will attempt to load mod_$module dynamically.\n";
- push @load, $module;
- }
- }
-
- # Directories where apache DSOs live.
- my @module_dirs = map {m,(/\S*/),} @modules;
-
- # Finally compute the directives to load modules that need to be loaded.
- MODULE:
- foreach my $module (@load) {
- foreach my $module_dir (@module_dirs) {
- foreach my $filename ("mod_$module.so", "lib$module.so", "ApacheModule\u$module.dll") {
- if (-e "$module_dir/$filename") {
- push @modules, "LoadModule ${module}_module $module_dir/$filename\n"; next MODULE;
- }
- }
- }
- warn "Warning: couldn't find anything to load for 'mod_$module'.\n";
- }
-
- print "Adding the following dynamic config lines: \n@modules";
- return join '', @modules;
-}
-
-sub static_modules {
- # Returns a hashref whose keys are each of the modules compiled
- # statically into the given httpd binary.
- my ($self, $httpd) = @_;
-
- my @l = `$httpd -l`;
- return {map {lc($_) => 1} map /(\S+)\.c/, @l};
-}
-
-# Find an executable in the PATH.
-sub which {
- foreach (map { "$_/$_[0]" } split /:/, $ENV{PATH}) {
- next unless m,^/,;
- return $_ if -x;
- }
-}
-
-sub test {
- shift() if UNIVERSAL::isa($_[0], __PACKAGE__);
- my $s = $_[1] ? "ok $_[0]\n" : "not ok $_[0]\n";
- if($ENV{MOD_PERL}) {
- Apache->request->print($s);
- }
- else {
- print $s;
- }
-}
-
-sub fetch {
- # Old code calls fetch() as a function, new code as a method
- my $want_response;
- $want_response = shift() if UNIVERSAL::isa($_[0], __PACKAGE__);
- my ($ua, $url) = (@_ == 1 ? ($UA, shift()) : @_);
- my $request = ref $url ? $url : {uri=>$url};
-
- # Set some defaults
- $ENV{PORT} ||= 8529; # For mod_perl's own tests
- $request->{method} ||= 'GET';
- $request->{content} = '' unless exists $request->{content};
- $request->{uri} = "http://localhost:$ENV{PORT}$request->{uri}"
- unless $request->{uri} =~ /^http/;
- $request->{headers}{Content_Type} = 'application/x-www-form-urlencoded'
- if (!$request->{headers} and $request->{method} eq 'POST'); # Is this necessary?
-
- # Create & send the request
- $request->{headers} = new HTTP::Headers(%{$request->{headers}||{}});
- my $req = new HTTP::Request(@{$request}{'method','uri','headers','content'});
- my $response = $ua->request($req);
-
- return $want_response ? $response : $response->content;
-}
-
-sub simple_fetch {
- my $ua = LWP::UserAgent->new;
- my $url = URI::URL->new("http://$net::httpserver");
- my($path,$q) = split /\?/, shift;
- $url->path($path);
- $url->query($q) if $q;
- my $request = new HTTP::Request('GET', $url);
- my $response = $ua->request($request, undef, undef);
- $response->is_success;
-}
-
-#even if eval $mod fails, the .pm ends up in %INC
-#so the next eval $mod succeeds, when it shouldnot
-
-my %really_have = (
- 'Apache::Table' => sub {
- if ($ENV{MOD_PERL}) {
- return Apache::Table->can('TIEHASH');
- }
- else {
- return $net::callback_hooks{PERL_TABLE_API};
- }
- },
-);
-
-for (qw(Apache::Cookie Apache::Request)) {
- $really_have{$_} = $really_have{'Apache::Table'};
-}
-
-sub have_module {
- my $mod = shift;
- my $v = shift;
- eval {# surpress "can't boostrap" warnings
- local $SIG{__WARN__} = sub {};
- require Apache;
- require Apache::Constants;
- };
-
- eval "require $mod";
- if($v and not $@) {
- eval {
- local $SIG{__WARN__} = sub {};
- $mod->UNIVERSAL::VERSION($v);
- };
- if($@) {
- warn $@;
- return 0;
- }
- }
- if($@ && ($@ =~ /Can.t locate/)) {
- return 0;
- }
- elsif($@ && ($@ =~ /Can.t find loadable object for module/)) {
- return 0;
- }
- elsif($@) {
- warn "$@\n";
- }
-
- if (my $cv = $really_have{$mod}) {
- return 0 unless $cv->();
- }
-
- print "module $mod is installed\n" unless $ENV{MOD_PERL};
-
- return 1;
-}
-
-sub skip_test {
- print "1..0\n";
- exit;
-}
-
-sub have_httpd {
- return -e 't/httpd';
-}
-
-sub run {
- require Test::Harness;
- my $self = shift;
- my $args = shift || {};
- my @tests = ();
-
- # First we check if we already are within the "t" directory
- if (-d "t") {
- # try to move into test directory
- chdir "t" or die "Can't chdir: $!";
-
- # fix all relative library locations
- foreach (@INC) {
- $_ = "../$_" unless m,^(/)|([a-f]:),i;
- }
- }
-
- # Pick up the library files from the ../blib directory
- unshift(@INC, "../blib/lib", "../blib/arch");
- #print "@INC\n";
-
- $Test::Harness::verbose = shift(@ARGV)
- if $ARGV[0] =~ /^\d+$/ || $ARGV[0] eq "-v";
-
- $Test::Harness::verbose ||= $args->{verbose};
-
- if (@ARGV) {
- for (@ARGV) {
- if (-d $_) {
- push(@tests, <$_/*.t>);
- }
- else {
- $_ .= ".t" unless /\.t$/;
- push(@tests, $_);
- }
- }
- }
- else {
- push @tests, <*.t>, map { <$_/*.t> } @{ $args->{tdirs} || [] };
- }
-
- Test::Harness::runtests(@tests);
-}
-
-sub MM_test {
- # Writes the test section for the Makefile
- shift(); # Don't need package name
- my %conf = @_;
-
- my $section = <<EOF;
-TEST_VERBOSE=0
-TEST_TYPE=test_\$(LINKTYPE)
-TEST_FILE = test.pl
-TEST_FILES = t/*.t
-TESTDB_SW = -d
-
-#test: start_httpd run_tests kill_httpd
-
-test :: pure_all start_httpd run_tests kill_httpd
-
-testdb: start_httpd run_testsdb kill_httpd
-
-kill_httpd:
- kill `cat t/httpd.pid`
-
-start_httpd:
- t/httpd -f `pwd`/t/httpd.conf
-
-run_tests :: pure_all
- PERL_DL_NONLAZY=1 PORT=$conf{port}
-EOF
- chomp $section;
-
- $section .= <<'EOF';
- $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -e 'use Test::Harness qw(&runtests $$verbose); $$verbose=$(TEST_VERBOSE); runtests @ARGV;' $(TEST_FILES)
-
-run_testsdb :: pure_all
- PERL_DL_NONLAZY=1 $(FULLPERL) $(TESTDB_SW) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE)
-
-EOF
-
- return $section;
-}
-
-sub grab {
- require IO::Socket;
- my(@args) = @_;
- @args = @ARGV unless @args;
-
- unless (@args > 0) {
- die "usage: grab host:port path";
- }
-
- my($host, $port) = split ":", shift @args;
- $port ||= 80;
- my $url = shift @args || "/";
-
- my $remote = IO::Socket::INET->new(Proto => "tcp",
- PeerAddr => $host,
- PeerPort => $port,
- );
- unless ($remote) {
- die "cannot connect to http daemon on $host";
- }
- $remote->autoflush(1);
- print $remote "GET $url HTTP/1.0\n\n";
- my $response_line = 0;
- my $header_terminator = 0;
- my @msg = ();
-
- while ( <$remote> ) {
- #e.g. HTTP/1.1 200 OK
- if(m:^(HTTP/\d+\.\d+)[ \t]+(\d+)[ \t]*([^\012]*):i) {
- push @msg, $_;
- $response_line = 1;
- }
- elsif(/^([a-zA-Z0-9_\-]+)\s*:\s*(.*)/) {
- push @msg, $_;
- }
- elsif(/^\015?\012$/) {
- $header_terminator = 1;
- push @msg, $_;
- }
-
- print;
- }
- close $remote;
-
- print "~" x 40, "\n", "Diagnostics:\n";
- if ($response_line and $header_terminator) {
- print " HTTP response is valid:\n";
- }
- else {
- print " GET -> http://$host:$port$url\n";
- print " >>> No response line\n" unless $response_line;
- print " >>> No header terminator\n" unless $header_terminator;
- print " *** HTTP response is malformed\n";
- }
- print "-" x 40, "\n", @msg, "-" x 40, "\n";
-}
-
-sub run_test {
- my($test, $verbose) = @_;
- my $cmd = "$^X -w $test|";
- my $fh = FileHandle->new;
- $fh->open($cmd) or print "can't run $test. $!\n";
- my($ok,$next,$max,$files,$totok,$totmax);
- $ok = $next = $max = 0;
- my @failed = ();
- while (<$fh>) {
- if( $verbose ){
- print ">>> $_";
- }
- if (/^1\.\.([0-9]+)/) {
- $max = $1;
- $totmax += $max;
- $files++;
- $next = 1;
- }
- elsif ($max && /^(not\s+)?ok\b/) {
- my $this = $next;
- if (/^not ok\s*(\d*)/){
- $this = $1 if $1 > 0;
- push @failed, $this;
- }
- elsif (/^ok\s*(\d*)/) {
- $this = $1 if $1 > 0;
- $ok++;
- $totok++;
- }
- if ($this > $next) {
- # warn "Test output counter mismatch [test $this]\n";
- # no need to warn probably
- push @failed, $next..$this-1;
- }
- elsif ($this < $next) {
- #we have seen more "ok" lines than the number suggests
- warn "Confused test output: test $this answered after test ", $next-1, "\n";
- $next = $this;
- }
- $next = $this + 1;
- }
- }
- $fh->close; # must close to reap child resource values
- return($max, \@failed);
-}
-
-1;
-
-__END__
-
-=head1 NAME
-
-Apache::testold - Facilitates testing of Apache::* modules
-
-=head1 SYNOPSIS
-
- # In Makefile.PL
- use Apache::testold;
- my %params = Apache::testold->get_test_params();
- Apache::testold->write_httpd_conf(%params, include => $more_directives);
- *MY::test = sub { Apache::testold->MM_test(%params) };
-
- # In t/*.t script (or test.pl)
- use Apache::testold qw(skip_test have_httpd);
- skip_test unless have_httpd;
- (Some more methods of Doug's that I haven't reviewed or documented yet)
-
-=head1 DESCRIPTION
-
-This module helps authors of Apache::* modules write test suites that
-can query an actual running Apache server with mod_perl and their
-modules loaded into it. Its functionality is generally separated into
-methods that go in a Makefile.PL to configure, start, and stop the
-server, and methods that go in one of the test scripts to make HTTP
-queries and manage the results.
-
-=head1 METHODS
-
-=head2 get_test_params()
-
-This will ask the user a few questions about where the httpd binary
-is, and what user/group/port should be used when running the server.
-It will return a hash of the information it discovers. This hash is
-suitable for passing to the C<write_httpd_conf()> method.
-
-=head2 write_httpd_conf(%params)
-
-This will write a basic C<httpd.conf> file suitable for starting a
-HTTP server during the 'make test' stage. A hash of key/value pairs
-that affect the written file can be passed as arguments. The
-following keys are recognized:
-
-=over 4
-
-=item * conf_file
-
-The path to the file that will be created. Default is 't/httpd.conf'.
-
-=item * port
-
-The port that the Apache server will listen on.
-
-=item * user
-
-The user that the Apache server will run as.
-
-=item * group
-
-The group that the Apache server will run as.
-
-=item * include
-
-Any additional text you want added at the end of the config file.
-Typically you'll have some C<PerlModule> and C<Perl*Handler>
-directives to pass control to the module you're testing. The C<blib/>
-directories will be added to the C<@INC> path when searching for
-modules, so that's nice.
-
-=back
-
-=head2 MM_test(%params)
-
-This method helps write a Makefile that supports running a web server
-during the 'make test' stage. When you execute 'make test', 'make'
-will run 'make start_httpd', 'make run_tests', and 'make kill_httpd'
-in sequence. You can also run these commands independently if you
-want.
-
-Pass the hash of parameters returned by C<get_test_params()> as an
-argument to C<MM_test()>.
-
-To patch into the ExtUtils::MakeMaker wizardry (voodoo?), typically
-you'll do the following in your Makefile.PL:
-
- *MY::test = sub { Apache::testold->MM_test(%params) };
-
-=head2 fetch
-
- Apache::testold->fetch($request);
- Apache::testold->fetch($user_agent, $request);
-
-Call this method in a test script in order to fetch a page from the
-running web server. If you pass two arguments, the first should be an
-LWP::UserAgent object, and the second should specify the request to
-make of the server. If you only pass one argument, it specifies the
-request to make.
-
-The request can be specified either by a simple string indicating the
-URI to fetch, or by a hash reference, which gives you more control
-over the request. The following keys are recognized in the hash:
-
-=over 4
-
-=item * uri
-
-The URI to fetch from the server. If the URI does not begin with
-"http", we prepend "http://localhost:$PORT" so that we make requests
-of the test server.
-
-=item * method
-
-The request method to use. Default is 'GET'.
-
-=item * content
-
-The request content body. Typically used to simulate HTML fill-out
-form submission for POST requests. Default is null.
-
-=item * headers
-
-A hash of headers you want sent with the request. You might use this
-to send cookies or provide some application-specific header.
-
-=back
-
-If you don't provide a 'headers' parameter and you set the 'method'
-to 'POST', then we assume that you're trying to simulate HTML form
-submission and we add a 'Content_Type' header with a value of
-'application/x-www-form-urlencoded'.
-
-In a scalar context, fetch() returns the content of the web server's
-response. In a list context, fetch() returns the content and the
-HTTP::Response object itself. This can be handy if you need to check
-the response headers, or the HTTP return code, or whatever.
-
-=head2 static_modules
-
- Example: $mods = Apache::testold->static_modules('/path/to/httpd');
-
-This method returns a hashref whose keys are all the modules
-statically compiled into the given httpd binary. The corresponding
-values are all 1.
-
-=head1 EXAMPLES
-
-No good examples yet. Example submissions are welcome. In the meantime, see
-L<http://forum.swarthmore.edu/~ken/modules/Apache-AuthCookie/> , which
-I'm retrofitting to use Apache::testold.
-
-=head1 TO DO
-
-The MM_test method doesn't try to be very smart, it just writes the
-text that seems to work in my configuration. I am morally against
-using the 'make' command for installing Perl modules (though of course
-I do it anyway), so I haven't looked into this very much. Send bug
-reports or better (patches).
-
-I've got lots of code in my Apache::AuthCookie module (etc.) that
-assists in actually making the queries of the running server. I plan
-to add that to this module, but first I need to compare what's already
-here that does the same stuff.
-
-=head1 KUDOS
-
-To Doug MacEachern for writing the first version of this module.
-
-To caelum@debian.org (Rafael Kitover) for contributing the code to
-parse existing httpd.conf files for --enable-shared=max and DSOs.
-
-=head1 CAVEATS
-
-Except for making sure that the mod_perl distribution itself can run
-'make test' okay, I haven't tried very hard to keep compatibility with
-older versions of this module. In particular MM_test() has changed
-and probably isn't usable in the old ways, since some of its
-assumptions are gone. But none of this was ever documented, and
-MM_test() doesn't seem to actually be used anywhere in the mod_perl
-disribution, so I don't feel so bad about it.
-
-=head1 AUTHOR
-
-Doug MacEachern (original version)
-
-Ken Williams (latest changes and this documentation)
-
-=cut
-
diff --git a/tags/v1_29/lib/Bundle/Apache.pm b/tags/v1_29/lib/Bundle/Apache.pm
deleted file mode 100644
index 57129ce..0000000
--- a/tags/v1_29/lib/Bundle/Apache.pm
+++ /dev/null
@@ -1,66 +0,0 @@
-package Bundle::Apache;
-
-$VERSION = '1.02';
-
-1;
-
-__END__
-
-=head1 NAME
-
-Bundle::Apache - Install Apache mod_perl and related modules
-
-=head1 SYNOPSIS
-
-C<perl -MCPAN -e 'install Bundle::Apache'>
-
-=head1 CONTENTS
-
-MIME::Base64 - Used in authentication headers
-
-Digest::MD5 - Needed to do Digest authentication
-
-URI 0.10 - There are URIs everywhere
-
-Net::FTP 2.00 - If you want ftp://-support
-
-HTML::HeadParser - To get the correct $res->base
-
-LWP - The reason why you need the modules above
-
-Devel::Symdump - Symbol table browsing with Apache::Status
-
-Data::Dumper - Used by Apache::PerlSections->dump
-
-CGI - CGI.pm
-
-Tie::IxHash - For order in <Perl> sections
-
-Apache - Perl interface to Apache server API
-
-Apache::DBI - Wrapper around DBI->connect to transparently maintain persistent connections
-
-Apache::DB - Run the interactive Perl debugger under mod_perl
-
-Apache::Stage - Management of document staging directories
-
-Apache::Sandwich - Layered document maker
-
-Apache::Request - Effective methods for dealing with client request data
-
-Apache::Module - Interface to Apache C module structures
-
-Apache::Test - Wrapper around the standard "Test.pm" with helpers for testing an Apache server.
-
-=head1 DESCRIPTION
-
-This bundle contains modules used by Apache mod_perl.
-
-Asking CPAN.pm to install a bundle means to install the bundle itself
-along with all the modules contained in the CONTENTS section
-above. Modules that are up to date are not installed, of course.
-
-=head1 AUTHOR
-
-Doug MacEachern
-
diff --git a/tags/v1_29/lib/mod_perl.pm b/tags/v1_29/lib/mod_perl.pm
deleted file mode 100644
index 809a6ac..0000000
--- a/tags/v1_29/lib/mod_perl.pm
+++ /dev/null
@@ -1,58 +0,0 @@
-package mod_perl;
-use 5.003_97;
-use strict;
-use DynaLoader ();
-
-BEGIN {
- $mod_perl::VERSION = "1.29";
-}
-
-sub boot {
- my($class, $version) = @_;
- no strict 'refs';
- *{$class.'::dl_load_flags'} = DynaLoader->can('dl_load_flags');
- if ($ENV{MOD_PERL}) {
- (defined &{$class.'::bootstrap'} ?
- \&{$class.'::bootstrap'} :
- \&DynaLoader::bootstrap)->
- ($class, $version);
- }
-}
-
-sub hook {
- my $hook = shift;
- return 1 if $hook =~ /^PerlHandler$/;
-
- (my $try = $hook) =~ s/^Perl//;
- $try =~ s/Handler$//;
- return Apache::perl_hook($try) > 0;
-}
-
-sub import {
- my $class = shift;
-
- return unless @_;
-
- if($_[0] =~ /^\d/) {
- $class->UNIVERSAL::VERSION(shift);
- }
- return unless $ENV{MOD_PERL};
-
- for my $hook (@_) {
- require Apache;
- my $enabled = hook($hook);
- next if $enabled > 0;
- if($enabled < 0) {
- die "unknown mod_perl option `$hook'\n";
- }
- else {
- (my $flag = $hook) =~ s/([A-Z])/_$1/g;
- $flag = uc $flag;
- die "`$hook' not enabled, rebuild mod_perl with PERL$flag=1\n";
- }
- }
-}
-
-1;
-
-__END__
diff --git a/tags/v1_29/lib/mod_perl_hooks.pm.PL b/tags/v1_29/lib/mod_perl_hooks.pm.PL
deleted file mode 100644
index ce416f3..0000000
--- a/tags/v1_29/lib/mod_perl_hooks.pm.PL
+++ /dev/null
@@ -1,6 +0,0 @@
-
-sub mod_perl::hooks { qw() }
-
-1;
-
-__END__
diff --git a/tags/v1_29/mod_perl.gif b/tags/v1_29/mod_perl.gif
deleted file mode 100644
index 9451524..0000000
--- a/tags/v1_29/mod_perl.gif
+++ /dev/null
Binary files differ
diff --git a/tags/v1_29/mod_perl.pod b/tags/v1_29/mod_perl.pod
deleted file mode 100644
index 31ec4e9..0000000
--- a/tags/v1_29/mod_perl.pod
+++ /dev/null
@@ -1,823 +0,0 @@
-=head1 NAME
-
-mod_perl - Embed a Perl interpreter in the Apache HTTP server
-
-
-=head1 DESCRIPTION
-
-The Apache/Perl integration project brings together the full power of
-the Perl programming language and the Apache HTTP server. This is
-achieved by linking the Perl runtime library into the server and
-providing an object oriented Perl interface to the server's C language
-API.
-These pieces are seamlessly glued together by the `mod_perl' server
-plugin, making it is possible to write Apache modules entirely in
-Perl. In addition, the persistent interpreter embedded in the server
-avoids the overhead of starting an external interpreter and the
-penalty of Perl start-up (compile) time.
-
-Without question, the most popular Apache/Perl module is
-Apache::Registry module. This module emulates the CGI environment,
-allowing programmers to write scripts that run under CGI or
-mod_perl without change. Existing CGI scripts may require some
-changes, simply because a CGI script has a very short lifetime of one
-HTTP request, allowing you to get away with "quick and dirty"
-scripting. Using mod_perl and Apache::Registry requires you to be
-more careful, but it also gives new meaning to the work "quick"!
-Apache::Registry maintains a cache of compiled scripts, which happens
-the first time a script is accessed by a child server or once again if
-the file is updated on disk.
-
-Although it may be all you need, a speedy CGI replacement is only a
-small part of this project. Callback hooks are in place for each stage
-of a request. Apache-Perl modules may step in during the handler,
-header parser, uri translate, authentication, authorization, access,
-type check, fixup and logger stages of a request.
-
-=head1 FAQ
-
-The mod_perl FAQ is maintained by Frank Cringle
-E<lt>fdc@cliwe.ping.deE<gt>: http://perl.apache.org/faq/
-
-=head1 Apache/Perl API
-
-See 'perldoc Apache' for info on how to use the Perl-Apache API.
-
-See the lib/ directory for example modules and L<apache-modlist.html>
-for a comprehensive list.
-
-See the eg/ directory for example scripts.
-
-=head1 mod_perl
-
-For using mod_perl as a CGI replacement see the L<cgi_to_mod_perl> document.
-
-You may load modules at server startup via:
-
- PerlModule Apache::SSI SomeOther::Module
-
-Optionally:
-
- PerlRequire perl-scripts/script_to_load_at_startup.pl
-
-A B<PerlRequire> file is commonly used for intialization during server
-startup time. A PerlRequire file name can be absolute or relative to
-B<ServerRoot> or a path in C<@INC>. A B<PerlRequire>'d file must
-return a true value, i.e., the end of this file should have a:
-
- 1; #return true value
-
-See eg/startup.pl for an example to start with.
-
-In an httpd.conf E<lt>Location /fooE<gt> or .htaccess you need:
-
- PerlHandler sub_routine_name
-
-This is the name of the subroutine to call to handle each request.
-e.g.
-in the PerlModule Apache::Registry this is "Apache::Registry::handler".
-
-If PerlHandler is not a defined subroutine, mod_perl assumes it is a
-package name which defines a subroutine named "handler".
-
- PerlHandler Apache::Registry
-
-Would load Registry.pm (if it is not already) and call it's subroutine
-"handler".
-
-There are several stages of a request where the Apache API allows a
-module to step in and do something. The Apache documentation will
-tell you all about those stages and what your modules can do.
-By default, these hooks are disabled at compile time, see the INSTALL
-document for information on enabling these hooks.
-The following configuration directives take one argument, which is the name
-of the subroutine to call. If the value is not a subroutine name, mod_perl
-assumes it is a package name which implements a 'handler' subroutine.
-
- PerlChildInitHandler (requires apache_1.3.0 or higher)
- PerlPostReadRequestHandler (requires apache_1.3.0 or higher)
- PerlInitHandler
- PerlTransHandler
- PerlHeaderParserHandler
- PerlAccessHandler
- PerlAuthenHandler
- PerlAuthzHandler
- PerlTypeHandler
- PerlFixupHandler
- PerlHandler
- PerlLogHandler
- PerlCleanupHandler
- PerlChildExitHandler (requires apache_1.3.0 or higher)
-
-Only ChildInit, ChildExit, PostReadRequest and Trans handlers are not
-allowed in .htaccess files.
-
-Modules can check if the code is being run in the parent server during
-startup by checking the $Apache::Server::Starting variable.
-
-=head1 RESTARTING
-
-=over 4
-
-=item PerlFreshRestart
-
-By default, if a server is restarted
-(ala kill -USR1 `cat logs/httpd.pid`), Perl scripts and modules are
-not reloaded. To reload B<PerlRequire>'s, B<PerlModule>'s, other
-use()'d modules and flush the B<Apache::Registry> cache, enable with
-this command:
-
- PerlFreshRestart On
-
-=item PERL_DESTRUCT_LEVEL
-
-With Apache versions 1.3.0 and higher, mod_perl will call the
-perl_destruct() Perl API function during the child exit phase.
-This will cause proper execution of B<END> blocks found during server
-startup along with invoking the B<DESTROY> method on global objects
-who are still alive. It is possible that this operation may take a
-long time to finish, causing problems during a restart. If your code
-does not contain and B<END> blocks or B<DESTROY> methods which need to
-be run during child server shutdown, this destruction can be avoided by
-setting the I<PERL_DESTRUCT_LEVEL> environment variable to C<-1>.
-
-=back
-
-=head1 ENVIRONMENT
-
-Under CGI the Perl hash C<%ENV> is magical in that it inherits
-environment variables from the parent process and will set them should
-a process spawn a child. However, with mod_perl we're in the parent
-process that would normally setup the common environment variables
-before spawning a CGI process. Therefore, mod_perl must feed these
-variables to C<%ENV> directly. Normally, this does not happen until
-the response stage of a request when C<PerlHandler> is called. If you
-wish to set variables that will be available before then, such as for
-a C<PerlAuthenHandler>, you may use the C<PerlSetEnv> configuration
-directive:
-
- PerlSetEnv SomeKey SomeValue
-
-You may also use the C<PerlPassEnv> directive to pass an already
-existing environment variable to Perl's C<%ENV>:
-
- PerlPassEnv SomeKey
-
-=over 4
-
-=item CONFIGURATION
-
-The C<PerlSetVar> and C<PerlAddVar> directives provide a simple
-mechanism for passing information from configuration files to Perl
-modules or Registry scripts.
-
-The C<PerlSetVar> directive allows you to set a key/value pair.
-
- PerlSetVar SomeKey SomeValue
-
-Perl modules or scripts retrieve configuration values using the
-C<$r-E<gt>dir_config> method.
-
- $SomeValue = $r->dir_config('SomeKey');
-
-The C<PerlAddVar> directive allows you to emulate Perl arrays:
-
- PerlAddVar SomeKey FirstValue
- PerlAddVar SomeKey SecondValue
- ... ... ...
- PerlAddVar SomeKey Nth-Value
-
-In the Perl modules the values are extracted using the
-C<$r-E<gt>dir_config-E<gt>get> method.
-
- @array = $r->dir_config->get('SomeKey');
-
-Alternatively in your code you can extend the setting with:
-
- $r->dir_config->add(SomeKey => 'Bar');
-
-C<PerlSetVar> and C<PerlAddVar> handle keys case-insensitively.
-
-
-
-=item GATEWAY_INTERFACE
-
-The standard CGI environment variable B<GATEWAY_INTERFACE> is set to
-C<CGI-Perl/1.1> when running under mod_perl.
-
-=item MOD_PERL
-
-The environment variable `MOD_PERL' is set so scripts can say:
-
- if(exists $ENV{MOD_PERL}) {
- #we're running under mod_perl
- ...
- }
- else {
- #we're NOT running under mod_perl
- }
-
-=back
-
-=head1 BEGIN blocks
-
-Perl executes C<BEGIN> blocks during the compile time of code as soon
-as possible. The same is true under mod_perl. However, since
-mod_perl normally only compiles scripts and modules once, in the
-parent server or once per-child, C<BEGIN> blocks in that code will
-only be run once. As L<perlmod> explains, once a C<BEGIN> has run, it
-is immediately undefined. In the mod_perl environment, this means
-C<BEGIN> blocks will not be run during each incoming request unless
-that request happens to be one that is compiling the code.
-
-Modules and files pulled in via require/use which contain C<BEGIN>
-blocks will be executed:
- - only once, if pulled in by the parent process
- - once per-child process if not pulled in by the parent process
- - an additional time, once per-child process if the module is pulled in off of disk again via Apache::StatINC
- - an additional time, in the parent process on each restart if PerlFreshRestart is On
- - unpredictable if you fiddle with C<%INC> yourself
-
-B<Apache::Registry> scripts which contain C<BEGIN> blocks will be
-executed:
- - only once, if pulled in by the parent process via B<Apache::RegistryLoader>
- - once per-child process if not pulled in by the parent process
- - an additional time, once per-child process if the script file has changed on disk
- - an additional time, in the parent process on each restart if pulled in by the
- parent process via B<Apache::RegistryLoader> and PerlFreshRestart is On
-
-=head1 END blocks
-
-As L<perlmod> explains, an C<END> subroutine is executed as late as
-possible, that is, when the interpreter is being exited. In the
-mod_perl environment, the interpreter does not exit until the server
-is shutdown. However, mod_perl does make a special case for
-B<Apache::Registry> scripts.
-
-Normally, C<END> blocks are executed by Perl during it's C<perl_run()>
-function, which is called once each time the Perl program is executed,
-e.g. once per (mod_cgi) CGI scripts. However, mod_perl only calls
-C<perl_run()> once, during server startup. Any C<END> blocks
-encountered during main server startup, i.e. those pulled in by the
-B<PerlRequire> or by any B<PerlModule> are suspended and run at server
-shutdown, aka C<child_exit> (requires apache 1.3.0+). Any C<END>
-blocks that are encountered during compilation of Apache::Registry
-scripts are called after the script done is running, including
-subsequent invocations when the script is cached in memory.
-All other C<END> blocks encountered during other Perl*Handler callbacks,
-e.g. B<PerlChildInitHandler>, will be suspended while the process is
-running and called during C<child_exit> when the process is shutting down.
-Module authors may be wish to use C<$r-E<gt>register_cleanup> as an
-alternative to C<END> blocks if this behavior is not desirable.
-
-=head1 MEMORY CONSUMPTION
-
-Don't be alarmed by the size of your httpd after you've linked with
-mod_perl. No matter what, your httpd will be larger than normal to start,
-simply because you've linked with perl's runtime.
-
-Here's I'm just running
-
- % /usr/bin/perl -e '1 while 1'
-
- PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
- 10214 dougm 67 0 668K 212K run 0:04 71.55% 21.13% perl
-
-Now with a few random modules:
-
- % /usr/bin/perl -MDBI -MDBD::mSQL -MLWP::UserAgent -MFileHandle -MIO -MPOSIX -e '1 while 1'
-
- 10545 dougm 49 0 3732K 3340K run 0:05 54.59% 21.48% perl
-
-Here's my httpd linked with libperl.a, not having served a single request:
-
- 10386 dougm 5 0 1032K 324K sleep 0:00 0.12% 0.11% httpd-a
-
-You can reduce this if you configure perl 5.004+ with -Duseshrplib.
-Here's my httpd linked with libperl.sl, not having served a single request:
-
- 10393 dougm 5 0 476K 368K sleep 0:00 0.12% 0.10% httpd-s
-
-Now, once the server starts receiving requests, the embedded
-interpreter will compile code for each 'require' file it has not seen
-yet, each new Apache::Registry subroutine that's compiled, along with
-whatever modules it's use'ing or require'ing. Not to mention
-AUTOLOADing. (Modules that you 'use' will be compiled when the server
-starts unless they are inside an eval block.) httpd will grow just as
-big as our /usr/bin/perl would, or a CGI process for that matter, it
-all depends on your setup. The L<mod_perl_tuning> document gives
-advice on how to best setup your mod_perl server environment.
-
-The mod_perl INSTALL document explains how to build the Apache::
-extensions as shared libraries (with 'perl Makefile.PL DYNAMIC=1').
-This may save you some memory, however, it doesn't work on a few
-systems such as aix and unixware.
-
-However, on most systems, this strategy will only make the httpd
-I<look> smaller. When in fact, an httpd with Perl linked static with
-take up less real memory and preform faster than shared libraries at
-the same time. See the L<mod_perl_tuning> document for details.
-
-=head2 MEMORY TIPS
-
-=over 4
-
-=item Leaks
-
-If you are using a module that leaks or have code of their own that leaks, in
-any case using the apache configuration directive 'MaxRequestsPerChild' is
-your best bet to keep the size down.
-
-=item Perl Options
-
-Newer Perl versions also have other options to reduce runtime memory
-consumption. See Perl's INSTALL file for details on C<-DPACK_MALLOC>
-and C<-DTWO_POT_OPTIMIZE>. With these options, my httpd shrinks down
-~150K.
-
-=item Server Startup
-
-Use the B<PerlRequire> and B<PerlModule> directives to load commonly
-used modules such as CGI.pm, DBI, etc., when the server is started.
-On most systems, server children will be able to share this space.
-
-=item Importing Functions
-
-When possible, avoid importing of a module functions into your
-namespace. The aliases which are created can take up quite a bit of
-space. Try to use method interfaces and fully qualified
-Package::function names instead.
-Here's a freshly started httpd who's served one request for a script
-using the CGI.pm method interface:
-
- TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
- p4 5016 dougm 154 20 3808K 2636K sleep 0:01 9.62 4.07 httpd
-
-Here's a freshly started httpd who's served one request for the same
-script using the CGI.pm function interface:
-
- TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
- p4 5036 dougm 154 20 3900K 2708K sleep 0:01 3.19 2.18 httpd
-
-Now do the math: take that difference, figure in how many other
-scripts import the same functions and how many children you have
-running. It adds up!
-
-=item Global Variables
-
-It's always a good idea to stay away from global variables when
-possible. Some variables must be global so Perl can see them, such as
-a module's B<@ISA> or B<$VERSION> variables. In common practice, a
-combination of C<use strict> and C<use vars> keeps modules clean and
-reduces a bit of noise. However, B<use vars> also creates aliases as
-the B<Exporter> does, which eat up more space. When possible, try to
-use fully qualified names instead of B<use vars>. Example:
-
- package MyPackage;
- use strict;
- @MyPackage::ISA = qw(...);
- $MyPackage::VERSION = "1.00";
-
-vs.
-
- package MyPackage;
- use strict;
- use vars qw(@ISA $VERSION);
- @ISA = qw(...);
- $VERSION = "1.00";
-
-=item Further Reading
-
-In case I forgot to mention, read Vivek Khera's L<mod_perl_tuning>
-document for more tips on improving Apache/mod_perl performance.
-
-=back
-
-=head1 SWITCHES
-
-Normally when you run perl from the command line or have the shell
-invoke it with `#!', you may choose to pass perl switch arguments
-such as C<-w> or C<-T>. Since the command line is only parsed once,
-when the server starts, these switches are unavailable to mod_perl
-scripts. However, most command line arguments have a perl special
-variable equivilant. For example, the C<$^W> variable coresponds
-to the C<-w> switch. Consult L<perlvar> for more details. With
-mod_perl it is also possible to turn on warnings globaly via the
-B<PerlWarn> directive:
-
- PerlWarn On
-
-The switch which enables taint checks does not have a special
-variable, so mod_perl provides the B<PerlTaintCheck> directive to turn
-on taint checks. In httpd.conf, enable with:
-
- PerlTaintCheck On
-
-Now, any and all code compiled inside httpd will be checked.
-
-The environment variable B<PERL5OPT> can be used to set additional
-perl startup flags such as B<-d> and B<-D>. See L<perlrun>.
-
-=head1 PERSISTENT DATABASE CONNECTIONS
-
-Another popular use of mod_perl is to take advantage of it's
-persistance to maintain open database connections. The basic idea
-goes like so:
-
- #Apache::Registry script
- use strict;
- use vars qw($dbh);
-
- $dbh ||= SomeDbPackage->connect(...);
-
-Since C<$dbh> is a global variable, it will not go out of scope,
-keeping the connection open for the lifetime of a server process,
-establishing it during the script's first request for that process.
-
-It's recommended that you use one of the Apache::* database connection
-wrappers. Currently for DBI users there is C<Apache::DBI> and for
-Sybase users C<Apache::Sybase::DBlib>. These modules hide the
-peculiar code example above. In addition, different scripts may share
-a connection, minimizing resource consumption. Example:
-
- #httpd.conf has
- # PerlModule Apache::DBI
- #DBI scripts look exactly as they do under CGI
- use strict;
- my $dbh = DBI->connect(...);
-
-Although B<$dbh> shown here will go out of scope when the script ends,
-the Apache::DBI module's reference to it does not, keep the connection
-open.
-
-B<WARNING:> Do not attempt to open a persistent database connection in
-the parent process (via PerlRequire or PerlModule). If you do,
-children will get a copy of this handle, causing clashes when the
-handle is used by two processes at the same time. Each child must
-have it's own unique connection handle.
-
-=head1 STACKED HANDLERS
-
-With the mod_perl stacked handlers mechanism, it is possible for more
-than one Perl*Handler to be defined and run during each stage of a
-request.
-
-Perl*Handler directives can define any number of subroutines,
-e.g. (in config files)
-
- PerlTransHandler OneTrans TwoTrans RedTrans BlueTrans
-
-With the method, Apache-E<gt>push_handlers, callbacks can be added to
-the stack by scripts at runtime by mod_perl scripts.
-
-Apache-E<gt>push_handlers takes the callback hook name as it's first
-argument and a subroutine name or reference as it's second. e.g.:
-
- Apache->push_handlers("PerlLogHandler", \&first_one);
-
- $r->push_handlers("PerlLogHandler", sub {
- print STDERR "__ANON__ called\n";
- return 0;
- });
-
-After each request, this stack is cleared out.
-
-All handlers will be called unless a handler returns a status other than
-OK or DECLINED, this needs to be considered more. Post apache-1.2 will
-have a DONE return code to signal termiation of a stage, which Rob and
-I came up with while back when first discussing the idea of stacked
-handlers. 2.0 won't come for quite sometime, so mod_perl will most
-likely handle this before then.
-
-example uses:
-
-CGI.pm maintains a global object for it's plain function interface.
-Since the object is global, it does not go out of scope, DESTROY is
-never called. CGI-E<gt>new can call:
-
- Apache->push_handlers("PerlCleanupHandler", \&CGI::_reset_globals);
-
-This function will be called during the final stage of a request,
-refreshing CGI.pm's globals before the next request comes in.
-
-Apache::DCELogin establishes a DCE login context which must exist for
-the lifetime of a request, so the DCE::Login object is stored in a
-global variable. Without stacked handlers, users must set
-
- PerlCleanupHandler Apache::DCELogin::purge
-
-in the configuration files to destroy the context. This is not
-"user-friendly". Now, Apache::DCELogin::handler can call:
-
- Apache->push_handlers("PerlCleanupHandler", \&purge);
-
-Persistent database connection modules such as Apache::DBI could push
-a PerlCleanupHandler handler that iterates over %Connected, refreshing
-connections or just checking that ones have not gone stale. Remember,
-by the time we get to PerlCleanupHandler, the client has what it wants
-and has gone away, we can spend as much time as we want here without
-slowing down response time to the client.
-
-PerlTransHandlers may decide, based or uri or other condition, whether
-or not to handle a request, e.g. Apache::MsqlProxy. Without stacked
-handlers, users must configure:
-
- PerlTransHandler Apache::MsqlProxy::translate
- PerlHandler Apache::MsqlProxy
-
-PerlHandler is never actually invoked unless translate() sees the
-request is a proxy request ($r-E<gt>proxyreq), if it is a proxy request,
-translate() set $r-E<gt>handler("perl-script"), only then will PerlHandler
-handle the request. Now, users do not have to specify 'PerlHandler
-Apache::MsqlProxy', the translate() function can set it with
-push_handlers().
-
-Includes, footers, headers, etc., piecing together a document,
-imagine (no need for SSI parsing!):
-
- PerlHandler My::Header Some::Body A::Footer
-
-This was my first test:
-
- #My.pm
- package My;
-
- sub header {
- my $r = shift;
- $r->content_type("text/plain");
- $r->send_http_header;
- $r->print("header text\n");
- }
- sub body { shift->print("body text\n") }
- sub footer { shift->print("footer text\n") }
- 1;
- __END__
- #in config
- <Location /foo>
- SetHandler "perl-script"
- PerlHandler My::header My::body My::footer
- </Location>
-
-Parsing the output of another PerlHandler? this is a little more
-tricky, but consider:
-
- <Location /foo>
- SetHandler "perl-script"
- PerlHandler OutputParser SomeApp
- </Location>
- <Location /bar>
- SetHandler "perl-script"
- PerlHandler OutputParser AnotherApp
- </Location>
-
-Now, OutputParser goes first, but it untie's *STDOUT and re-tie's to
-it's own package like so:
-
- package OutputParser;
-
- sub handler {
- my $r = shift;
- untie *STDOUT;
- tie *STDOUT => 'OutputParser', $r;
- }
-
- sub TIEHANDLE {
- my($class, $r) = @_;
- bless { r => $r}, $class;
- }
-
- sub PRINT {
- my $self = shift;
- for (@_) {
- #do whatever you want to $_
- $self->{r}->print($_ . "[insert stuff]");
- }
- }
-
- 1;
- __END__
-
-To build in this feature, configure with:
-
- % perl Makefile.PL PERL_STACKED_HANDLERS=1 [PERL_FOO_HOOK=1,etc]
-
-Another method 'Apache-E<gt>can_stack_handlers' will return TRUE if
-mod_perl was configured with PERL_STACKED_HANDLERS=1, FALSE
-otherwise.
-
-=head1 PERL METHOD HANDLERS
-
-See L<mod_perl_method_handlers>.
-
-=head1 PERL SECTIONS
-
-With E<lt>PerlE<gt>E<lt>/PerlE<gt> sections, it is possible to
-configure your server entirely in Perl.
-
-E<lt>PerlE<gt> sections can contain *any* and as much Perl code as you
-wish. These sections are compiled into a special package who's symbol
-table mod_perl can then walk and grind the names and values of Perl
-variables/structures through the Apache core config gears. Most of
-the configurations directives can be represented as C<$Scalars> or
-C<@Lists>. A C<@List> inside these sections is simply converted into
-a single-space delimited string for you inside. Here's an example:
-
- #httpd.conf
- <Perl>
- @PerlModule = qw(Mail::Send Devel::Peek);
-
- #run the server as whoever starts it
- $User = getpwuid($>) || $>;
- $Group = getgrgid($)) || $);
-
- $ServerAdmin = $User;
-
- </Perl>
-
-Block sections such as E<lt>LocationE<gt>E<lt>/LocationE<gt> are
-represented in a C<%Hash>, e.g.:
-
- $Location{"/~dougm/"} = {
- AuthUserFile => '/tmp/htpasswd',
- AuthType => 'Basic',
- AuthName => 'test',
- DirectoryIndex => [qw(index.html index.htm)],
- Limit => {
- METHODS => 'GET POST',
- require => 'user dougm',
- },
- };
-
- #If a Directive can take say, two *or* three arguments
- #you may push strings and the lowest number of arguments
- #will be shifted off the @List
- #or use array reference to handle any number greater than
- #the minimum for that directive
-
- push @Redirect, "/foo", "http://www.foo.com/";
-
- push @Redirect, "/imdb", "http://www.imdb.com/";
-
- push @Redirect, [qw(temp "/here" "http://www.there.com")];
-
-Other section counterparts include C<%VirtualHost>, C<%Directory> and
-C<%Files>.
-
-These are somewhat boring examples, but they should give you the basic
-idea. You can mix in any Perl code your heart desires.
-See eg/httpd.conf.pl and eg/perl_sections.txt for some examples.
-
-A tip for syntax checking outside of httpd:
-
- <Perl>
- #!perl
-
- #... code here ...
-
- __END__
- </Perl>
-
-Now you may run C<perl -cx httpd.conf>.
-
-It may be the case that E<lt>PerlE<gt> sections are not completed or
-an oversight was made in an certain area. If they do not behave as
-you expect, please send a report to the modperl mailing list.
-
-To configure this feature build with
- 'perl Makefile.PL PERL_SECTIONS=1'
-
-=head1 mod_perl and mod_include integration
-
-As of apache 1.2.0, mod_include can handle Perl callbacks.
-
-A `sub' key value may be anything a Perl*Handler can be:
-subroutine name, package name (defaults to package::handler),
-Class-E<gt>method call or anonymous sub {}
-
-Example:
-
- Child <!--#perl sub="sub {print $$}" --> accessed
- <!--#perl sub="sub {print ++$Access::Cnt }" --> times. <br>
-
- <!--#perl sub="Package::handler" arg="one" arg="two" -->
-
- #don't forget to escape double quotes!
- Perl is
- <!--#perl sub="sub {for (0..10) {print \"very \"}}"-->
- fun to use!
-
-The B<Apache::Include> module makes it simple to include
-B<Apache::Registry> scripts with the mod_include perl directive.
-
-Example:
-
- <!--#perl sub="Apache::Include" arg="/perl/ssi.pl" -->
-
-You can also use 'virtual include' to include Apache::Registry scripts
-of course. However, using #perl will save the overhead of making
-Apache go through the motions of creating/destroying a subrequest and
-making all the necessary access checks to see that the request would
-be allowed outside of a 'virtual include' context.
-
-To enable perl in mod_include parsed files, when building apache the
-following must be present in the Configuration file:
-
- EXTRA_CFLAGS=-DUSE_PERL_SSI -I. `perl -MExtUtils::Embed -ccopts`
-
-mod_perl's Makefile.PL script can take care of this for you as well:
-
- perl Makefile.PL PERL_SSI=1
-
-If you're interested in sprinkling Perl code inside your HTML
-documents, you'll also want to look at the Apache::Embperl
-(http://perl.apache.org/embperl/), Apache::ePerl and Apache::SSI modules.
-
-=head1 DEBUGGING
-
-=over 4
-
-=item MOD_PERL_TRACE
-
-To enable mod_perl debug tracing configure mod_perl with the
-PERL_TRACE option:
-
- perl Makefile.PL PERL_TRACE=1
-
-The trace levels can then be enabled via the B<MOD_PERL_TRACE>
-environment variable which can contain any combination of:
-
- d - Trace directive handling during configuration read
- s - Trace processing of perl sections
- h - Trace Perl*Handler callbacks
- g - Trace global variable handling, intepreter construction, END blocks, etc.
- all - all of the above
-
-=item spinning httpds
-
-To see where an httpd is "spinning", try adding this to your script or a
-startup file:
-
- use Carp ();
- $SIG{'USR1'} = sub {
- Carp::confess("caught SIGUSR1!");
- };
-
-Then issue the command line:
-
- kill -USR1 <spinning_httpd_pid>
-
-=back
-
-=head1 PROFILING
-
-It is possible to profile code run under mod_perl with the
-B<Devel::DProf> module available on CPAN. However, you must have
-apache version 1.3.0 or higher and the C<PerlChildExitHandler>
-enabled. When the server is started, B<Devel::DProf> installs an
-C<END> block to write the I<tmon.out> file, which will be run when the
-server is shutdown. Here's how to start and stop a server with the
-profiler enabled:
-
- % setenv PERL5OPT -d:DProf
- % httpd -X -d `pwd` &
- ... make some requests to the server here ...
- % kill `cat logs/httpd.pid`
- % unsetenv PERL5OPT
- % dprofpp
-
-See also: B<Apache::DProf>
-
-=head1 BENCHMARKING
-
-How much faster is mod_perl that CGI? There are many ways to
-benchmark the two, see the C<benchmark/> directory for some examples.
-
-See also: B<Apache::Timeit>
-
-=head1 WARNINGS
-
-See L<mod_perl_traps>.
-
-=head1 SUPPORT
-
-See the L<SUPPORT> file.
-
-=head1 Win32
-
-See L<INSTALL.win32> for building from sources.
-
-Info about win32 binary distributions of mod_perl are available
-from:
-
- http://perl.apache.org/distributions/
-
-=head1 REVISION
-
-$Id$
-
-=head1 AUTHOR
-
-Doug MacEachern
-
-
-
diff --git a/tags/v1_29/mod_perl_cvs.pod b/tags/v1_29/mod_perl_cvs.pod
deleted file mode 100644
index a84dd0a..0000000
--- a/tags/v1_29/mod_perl_cvs.pod
+++ /dev/null
@@ -1,95 +0,0 @@
-=head1 NAME
-
-mod_perl_cvs - Access to the mod_perl CVS development tree
-
-=head1 DESCRIPTION
-
-The mod_perl development tree lives on cvs.apache.org. This tree
-contains the latest mod_perl bug fixes and developments that have not
-made it to CPAN yet. Welcome to the bleeding edge.
-
-=head1 SYNOPSIS
-
-Just as cvs access to the Apache development tree, the mod_perl code
-pulled from cvs is not guaranteed to do anything, especially not
-compile or work. But, that's exactly why we are using cvs, so
-everyone has access the latest version and can help see to it that
-mod_perl does compile and work on all platforms, with the various
-versions and configurations of Perl and Apache. Patches are always
-welcome, simply testing the latest snapshots is just as, if not more
-helpful.
-
-It's recommended to subscribe to the I<modperl-cvs@perl.apache.org> list,
-which is the place cvs commit logs and diffs are mailed to; at least
-if you're going to work on the code.
-
-Here are the several ways to access the cvs tree.
-
-=over 4
-
-=item cvsup
-
-Cvsup has come out of the FreeBSD group. It's a client/server
-beast that offers an efficient way to sync collections of files over
-the net, and it is very CVS aware, allowing syncronisation of repositories
-or checked out files using the cvs deltas to bring the client side
-files up to date with minimal data transfer.
-
-For a FreeBSD cvsup client see:
-
-http://www.freebsd.org/cgi/ports.cgi?query=cvsup&stype=all
-
-Others (SunOS, alpha.osf, linux, Solaris2.4, HPAA 10.2, irix)
-ftp://ftp.postgresql.org/pub/CVSup/
-
-Here's a config file for the client (cvsup) to sync modperl sources.
-
- *default tag=.
- # comment out the above if you want the raw cvs files
-
- *default host=cvs.apache.org
- *default prefix=/path/on/this/machine/to/install/
- # a subdir for modperl will appear here ^^^
-
- *default base=/path/on/this/machine/where/cvsup/will/keep/status/info
- # you'll never need to look in the 'base' dir.
-
- *default release=cvs delete use-rel-suffix compress
-
- modperl
- #apache-src
- #apache-docs
- #uncomment these two for the latest apache src and/or docs if you want them
-
-=item anoncvs
-
-To checkout a fresh copy from anoncvs use
-
- cvs -d ":pserver:anoncvs@cvs.apache.org:/home/cvspublic" login
-
-with the password "anoncvs".
-
- cvs -d ":pserver:anoncvs@cvs.apache.org:/home/cvspublic" co modperl
-
-
-For a basic introduction to anoncvs see http://dev.apache.org/anoncvs.txt
-
-
-=item from-cvs
-
-A snapshot is rolled of the modperl tree every 6 hours and placed
-here:
-
-http://cvs.apache.org/snapshots/modperl/
-
-A snapshot of the Apache development tree is also rolled every 6 hours
-and placed here:
-
-http://cvs.apache.org/snapshots/
-
-=back
-
-=head1 SEE ALSO
-
-cvs(1)
-
diff --git a/tags/v1_29/mod_perl_method_handlers.pod b/tags/v1_29/mod_perl_method_handlers.pod
deleted file mode 100644
index 5143ecf..0000000
--- a/tags/v1_29/mod_perl_method_handlers.pod
+++ /dev/null
@@ -1,198 +0,0 @@
-
-=head1 NAME
-
-mod_perl_method_handlers - How to use mod_perl's MethodHandlers
-
-=head1 DESCRIPTION
-
-Described here are a few examples and hints how to use MethodHandlers
-with modperl.
-
-This document assumes familiarity with at least L<perltoot> and
-"normal" usage of the Perl*Handlers.
-
-It isn't strictly modperl related, more like "what I use objects for
-in my modperl environment".
-
-=head1 SYNOPSIS
-
-If a Perl*Handler is prototyped with '$$', this handler will be
-invoked as method, being passed a class name or blessed object as its
-first argument and the blessed I<request_rec> as the second argument,
-e.g.
-
- package My;
- @ISA = qw(BaseClass);
-
- sub handler ($$) {
- my($class, $r) = @_;
- ...;
- }
-
- package BaseClass;
-
- sub method ($$) {
- my($class, $r) = @_;
- ...;
- }
-
- __END__
-
-Configuration:
-
- PerlHandler My
-
-or
-
- PerlHandler My->handler
-
-Since the handler is invoked as a method, it may inherit from other
-classes:
-
- PerlHandler My->method
-
-In this case, the 'My' class inherits this method from 'BaseClass'.
-
-In Perl 5.6.0 or later, you can use subroutine attributes in place
-of subroutine prototypes:
-
- package My;
- @ISA = qw(BaseClass);
-
- sub handler : method {
- my($class, $r) = @_;
- ...;
- }
-
-see the L<attributes> manpage for additional information on
-subroutine attributes.
-
-To build in the ability to specify Perl*Handlers as method handlers,
-configure mod_perl with:
-
- % perl Makefile.PL PERL_METHOD_HANDLERS=1 [PERL_FOO_HOOK=1,etc]
-
-=head1 WHY?
-
-The short version: For pretty much the same reasons we're using OO
-perl everywhere else. :-) See L<perltoot>.
-
-The slightly longer version would include some about code reusage and
-more clean interface between modules.
-
-=head1 SIMPLE EXAMPLE
-
-Let's start with a simple example.
-
-In httpd.conf:
-
- <Location /obj-handler>
- SetHandler perl-script
- PerlHandler $My::Obj->method
- </Location>
-
-In startup.pl or another PerlRequire'd file:
-
- package This::Class;
-
- $My::Obj = bless {};
-
- sub method ($$) {
- my($obj, $r) = @_;
- $r->send_http_header("text/plain");
- print "$obj isa ", ref($obj);
- 0;
- }
-
-which displays:
-
- This::Class=HASH(0x8411edc) isa This::Class
-
-=head1 A LITTLE MORE ADVANCED
-
-That wasn't really useful, so let's try something little more advanced.
-
-I've a little module which creates a graphical 'datebar' for a client.
-(See C<http://www.hip.dk/date_bar>). It's reading a lot of small gifs
-with numbers and weekdays, and keeping them in memory in GD.pm's native
-format, ready to be copied together and served as gifs.
-
-Now I wanted to use it at another site too, but with a different
-look. Obviously something to do with a object. Hence I changed the
-module to a object, and can now do a
-
- $Client1::Datebar = new Datebar(
- -imagepath => '/home/client1/datebar/',
- -size => [131,18],
- -elements => 'wday mday mon year hour min',
- );
-
- $Client2::Datebar = new Datebar
- -imagepath => '/home/client2/datebar/',
- -size => [90,14],
- -elements => 'wday hour min',
- );
-
-And then use $Client1::Datebar and $Client2::Datebar as PerlHandlers in my
-Apache configuration. Remember to pass them in literal quotes ('') and not
-"" which will be interpolated!
-
-I've a webinterface system to our content-database. I've created
-objects to handle the administration of articles, banners, images and
-other content. It's then very easy (a few lines of code) to enable
-certain modules for each client, depending on their needs.
-
-Another area where I use objects with great success in my modperl
-configurations is database abstraction. All our clients using the
-webinterface to handle f.x. articles will use a simple module to
-handle everything related to the database. Each client have
-
- $Client::Article = new WebAjour::Article(-host => 'www.client.com');
-
-in a module what will be run at server startup.
-
-I can then use some simple methods from the $Client::Article object in
-my embperl documents, like:
-
- [- $c = $Client::Article->GetCursor(-layout=>'Frontpage') -]
- [$ while($c->Fetch) $]
- <h2>[+ $c->f('header') +]</h2>
- [+ $c->f('textfield') +]
- [$ endwhile $]
-
-Very very useful!
-
-=head1 TRAPS
-
-mod_perl expects object handlers to be in the form of a string, which it
-will thaw for you. That means that something like
-
- $r->push_handlers(PerlHandler => '$self->perl_handler_method');
-
-This doesn't work as you might expect, since Perl isn't able to see
-$self once it goes to PerlHandler.
-
-The best solution to this is to use an anonymous subroutine and pass it $r
-yourself, like this:
-
- $r->push_handlers(PerlHandler =>
- sub {
- my $r = shift;
- $self->perl_handler_method($r);
- }
- );
-
-=head1 AUTHOR
-
-This document is written by Ask Bjoern Hansen E<lt>ask@netcetera.dkE<gt> or
-E<lt>ask@apache.orgE<gt>. Corrections and suggestions are most
-welcome. In particular would more examples be appreciated, most of my
-own code is way too integrated with our system, which isn't suitable
-for public release.
-
-Some codesnippets is from Doug MacEachern.
-
-=head1 SEE ALSO
-
-L<mod_perl>, L<Apache>, L<perltoot> (also available at
-C<http://www.perl.com/CPAN/doc/FMTEYEWTK/perltoot.html>)
diff --git a/tags/v1_29/mod_perl_traps.pod b/tags/v1_29/mod_perl_traps.pod
deleted file mode 100644
index 267d74c..0000000
--- a/tags/v1_29/mod_perl_traps.pod
+++ /dev/null
@@ -1,374 +0,0 @@
-=head1 NAME
-
-mod_perl_traps - common/known mod_perl traps
-
-=head1 DESCRIPTION
-
-In the CGI environment, the server starts a single external process
-(Perl interpreter) per HTTP request which runs single script in that
-process space. When the request is over, the process goes away
-everything is cleaned up and a fresh script is started for the next
-request. mod_perl brings Perl inside of the HTTP server not only for
-speedup of CGI scripts, but also for access to server functionality
-that CGI scripts do not and/or cannot have. Now that we're inside the
-server, each process will likely handle more than one Perl script and
-keep it "compiled" in memory for longer than a single HTTP request.
-This new location and longer lifetime of Perl execution brings with it
-some common traps. This document is here to tell you what they are
-and how to prevent them. The descriptions here are short, please
-consult the mod_perl FAQ for more detail. If you trip over something
-not documented here, please send a message to the mod_perl list.
-
-=head2 Migrating from CGI
-
-=over 4
-
-=item *
-
-Be sure to have read L<cgi_to_mod_perl>
-
-=item *
-
-Scripts under Apache::Registry are not run in package B<main>, they
-are run in a unique namespace based on the requested uri.
-
-=item *
-
-Apache::Registry scripts cannot contain __END__ or __DATA__ tokens
-
-=item *
-
-Output of C<system>, C<exec> and C<open PIPE, "|program"> calls will
-not be sent to the browser unless you Perl was configured with sfio.
-
-=item *
-
-Perl's exit() built-in function cannot be used in mod_perl scripts.
-The Apache::exit() function should be used instead. Apache::exit()
-automatically overrides the built-in exit() for Apache::Registry
-and Apache::PerlRun scripts.
-
-=item *
-
-Your script *will not* run from the command line if your script makes
-any direct calls to Apache-E<gt>methods. See Apache::FakeRequest.
-
-=back
-
-=head2 Apache::Registry
-
-=over 4
-
-=item undefined subroutine &Apache::Registry::handler
-
-Interaction with certain modules causes the shortcut configuration to
-break, if you see this message change your configuration from this:
-
- <Location /perl>
- PerlHandler Apache::Registry
- ...
- </Location>
-
-To this:
-
- PerlModule Apache::Registry
- <Location /perl>
- PerlHandler Apache::Registry::handler
- ...
- </Location>
-
-=back
-
-=head2 Using CGI.pm and CGI::*
-
-=over 4
-
-=item *
-
-CGI.pm users B<must> have version B<2.39> of the package or higher,
-earlier versions will not work under mod_perl.
-
-=item *
-
-If you use the C<SendHeaders()> function, be sure to call
-$req_obj-E<gt>cgi-E<gt>done when you are done with a request, just as you
-would under I<CGI::MiniSrv>.
-
-=back
-
-
-=head2 Perl Modules and Extensions
-
-=over 4
-
-=item *
-
-Files pulled in via C<use> or C<require> statements are not
-automatically reloaded when changed on disk. See the Apache::StatINC
-or the Apache::Reload module to add this functionality.
-
-=item Undefined subroutines
-
-A common trap with required files may result in an error message
-similar to this in the error_log:
-
- [Thu Sep 11 11:03:06 1997] Undefined subroutine
- &Apache::ROOT::perl::test_2epl::some_function called at
- /opt/www/apache/perl/test.pl line 79.
-
-As the above items explains, a file pulled in via C<require> will only
-happen once per-process (unless %INC is modified). If the file does
-not contain a C<package> declaration, the file's subroutines and
-variables will be created in the current package. Under CGI, this is
-commonly package C<main>. However, B<Apache::Registry> scripts are
-compiled into a unique package name (base on the uri). So, if
-multiple scripts in the same process try to require the same file,
-which does not declare a package, only one script will actually be
-able to see the subroutines. The solution is to read L<perlmodlib>,
-L<perlmod> and related perl documentation and re-work your required
-file into a module which exports functions or defines a method
-interface.
-Or something more simple, along these lines:
-
- #required_file.pl
- package Test;
-
- sub some_function {...}
-
- ...
-
- __END__
-
-Now, have your scripts say:
-
- require "required_file.pl";
-
- Test::some_function();
-
-=item Undefined subroutine &Foo::Bar::handler called at PerlHandler subroutine `Foo::Bar' line 1.
-
-You mistyped the module name in the 'package' line in your module.
-
-=item "Use of uninitialized value"
-
-Because of eval context, you may see warnings with useless
-filename/line, example:
-
- Use of uninitialized value at (eval 80) line 12.
- Use of uninitialized value at (eval 80) line 43.
- Use of uninitialized value at (eval 80) line 44.
-
-To track down where this eval is really happening, try using a
-B<__WARN__> handler to give you a stack trace:
-
- use Carp ();
- local $SIG{__WARN__} = \&Carp::cluck;
-
-=item "Callback called exit"
-
-=item "Out of memory!"
-
-If something goes really wrong with your code, Perl may die with an
-"Out of memory!" message and or "Callback called exit". A common
-cause of this are never-ending loops, deep recursion or calling an
-undefined subroutine. Here's one way to catch the problem:
-See Perl's INSTALL document for this item:
-
-=item -DPERL_EMERGENCY_SBRK
-
-If PERL_EMERGENCY_SBRK is defined, running out of memory need not be a
-fatal error: a memory pool can allocated by assigning to the special
-variable $^M. See perlvar(1) for more details.
-
-If you compile with that option and add 'use Apache::Debug level =E<gt> 4;'
-to your PerlScript, it will allocate the $^M emergency pool and the
-$SIG{__DIE__} handler will call Carp::confess, giving you a stack
-trace which should reveal where the problem is.
-
-See the B<Apache::Resource> module for prevention of spinning httpds.
-
-=item *
-
-If you wish to use a module that is normally linked static with your
-Perl, it must be listed in static_ext in Perl's Config.pm to be linked
-with httpd during the mod_perl build.
-
-=item Can't load '$Config{sitearchexp}/auto/Foo/Foo.so' for module Foo...
-
-When starting httpd some people have reported seeing an error along
-the lines of:
-
- [Thu Jul 9 17:33:42 1998] [error] Can't load
- '/usr/local/ap/lib/perl5/site_perl/sun4-solaris/auto/DBI/DBI.so' for
- module DBI: ld.so.1: src/httpd: fatal: relocation error: file
- /usr/local/ap/lib/perl5/site_perl/sun4-solaris/auto/DBI/DBI.so: symbol
- Perl_sv_undef: referenced symbol not found at
- /usr/local/ap/lib/perl5/sun4-solaris/5.00404/DynaLoader.pm line 166.
-
-Or similar for the IO module or whatever dynamic module mod_perl tries
-to pull in first. The solution is to re-configure, re-build and
-re-install Perl and dynamic modules with the following flags when
-Configure asks for "additional LD flags":
-
- -Xlinker --export-dynamic
-
-or
-
- -Xlinker -E
-
-This problem is only known to be caused by installing gnu ld under Solaris.
-
-Other known causes of this problem:
-
-OS distributions that ship with a (broken) binary Perl installation.
-
-The `perl' program and `libperl.a' library are somehow built with
-different binary compatiblity flags.
-
-The solution to these problems is to rebuild Perl and extension
-modules from a fresh source tree. Tip for running Perl's Configure
-script, use the `C<-des>' flags to accepts defaults and `C<-D>' flag to
-override certain attributes:
-
- % ./Configure -des -Dcc=gcc ... && make test && make install
-
-Read Perl's INSTALL doc for more details.
-
-=back
-
-=head2 Clashes with other Apache C modules
-
-=over 4
-
-=item mod_auth_dbm
-
-If you are a user of B<mod_auth_dbm> or B<mod_auth_db>, you may need
-to edit Perl's C<Config> module. When Perl is configured it attempts
-to find libraries for ndbm, gdbm, db, etc., for the *DBM*_File
-modules. By default, these libraries are linked with Perl and
-remembered by the B<Config> module. When mod_perl is configured with
-apache, the B<ExtUtils::Embed> module returns these libraries to be
-linked with httpd so Perl extensions will work under mod_perl.
-However, the order in which these libraries are stored in
-B<Config.pm>, may confuse C<mod_auth_db*>. If C<mod_auth_db*> does
-not work with mod_perl, take a look at this order with the following
-command:
-
- % perl -V:libs
-
-If C<-lgdbm> or C<-ldb> is before C<-lndbm>, example:
-
- libs='-lnet -lnsl_s -lgdbm -lndbm -ldb -ldld -lm -lc -lndir -lcrypt';
-
-Edit B<Config.pm> and move C<-lgdbm> and C<-ldb> to the end of the
-list. Here's how to find B<Config.pm>:
-
- % perl -MConfig -e 'print "$Config{archlibexp}/Config.pm\n"'
-
-Another solution for building Apache/mod_perl+mod_auth_dbm under Solaris
-is to remove the DBM and NDBM "emulation" from libgdbm.a. Seems
-Solaris already provides its own DBM and NDBM, and there's no reason
-to build GDBM with them (for us anyway).
-
-In our Makefile for GDBM, we changed
-
- OBJS = $(DBM_OF) $(NDBM_OF) $(GDBM_OF)
-
-to
-
- OBJS = $(GDBM_OF)
-
-Rebuild libgdbm, then Apache/mod_perl.
-
-=back
-
-=head1 REGULAR EXPRESSIONS
-
-=head2 COMPILED REGULAR EXPRESSIONS
-
-When using a regular expression that contains an interpolated Perl variable,
-if it is known that the variable (or variables) will not vary during the
-execution of the program, a standard optimization technique consists of
-adding the C<o> modifier to the regexp pattern, to direct the compiler to
-build the internal table once, for the entire lifetime of the script, rather
-than every time the pattern is executed. Consider:
-
- my $pat = '^foo$'; # likely to be input from an HTML form field
- foreach( @list ) {
- print if /$pat/o;
- }
-
-This is usually a big win in loops over lists, or when using C<grep> or
-C<map>.
-
-In long-lived C<mod_perl> scripts, however, this can pose a problem if the
-variable changes according to the invocation. The first invocation of a
-fresh httpd child will compile the table and perform the search correctly,
-however, all subsequent uses by the httpd child will continue to match the
-original pattern, regardless of the current contents of the Perl variables
-the pattern is dependent on. Your script will appear broken.
-
-There are two solutions to this problem.
-
-The first is to use C<eval q//>, to force the code to be evaluated each
-time. Just make sure that the C<eval> block covers the entire loop of
-processing, and not just the pattern match itself.
-
-The above code fragment would be rewritten as:
-
- my $pat = '^foo$';
- eval q{
- foreach( @list ) {
- print if /$pat/o;
- }
- }
-
-Just saying
-
- eval q{ print if /$pat/o; };
-
-is going to be a horribly expensive proposition.
-
-You use this approach if you require more than one pattern match operator in
-a given section of code. If the section contains only one operator (be it an
-C<m//> or C<s///>), you can rely on the property of the null pattern, that
-reuses the last pattern seen. This leads to the second solution, which also
-eliminates the use of C<eval>.
-
-The above code fragment becomes:
-
- my $pat = '^foo$';
- "something" =~ /$pat/; # dummy match (MUST NOT FAIL!)
- foreach( @list ) {
- print if //;
- }
-
-The only gotcha is that the dummy match that boots the regular expression
-engine must absolutely, positively succeed, otherwise the pattern will not
-be cached, and the // will match everything. If you can't count on fixed
-text to ensure the match succeeds, you have two possibilities.
-
-If you can guaranteee that the pattern variable contains no meta-characters
-(things like C<*>, C<+>, C<^>, C<$>...), you can use the dummy match:
-
- "$pat" =~ /\Q$pat\E/; # guaranteed if no meta-characters present
-
-If there is a possibility that the pattern can contain meta-characters, you
-should search for the pattern or the unsearchable C<\377> character as
-follows:
-
- "\377" =~ /$pat|^[\377]$/; # guarenteed if meta-characters present
-
-=head2 References
-
- The Camel Book, 2nd edition, p. 538 (p. 356 in the 1st edition).
-
-=head1 AUTHORS
-
-Doug MacEachern, with contributions from
-Jens Heunemann E<lt>heunemann2@janet.deE<gt>,
-David Landgren E<lt>david@landgren.netE<gt>,
-Mark Mills E<lt>mark@ntr.netE<gt>,
-Randal Schwartz E<lt>merlyn@stonehenge.comE<gt> and
-Ask Bjoern Hansen E<lt>ask@develooper.comE<gt>
-
diff --git a/tags/v1_29/mod_perl_tuning.pod b/tags/v1_29/mod_perl_tuning.pod
deleted file mode 100644
index 20eb0d7..0000000
--- a/tags/v1_29/mod_perl_tuning.pod
+++ /dev/null
@@ -1,423 +0,0 @@
-=head1 NAME
-
-mod_perl_tuning - mod_perl performance tuning
-
-=head1 DESCRIPTION
-
-Described here are examples and hints on how to configure a mod_perl
-enabled Apache server, concentrating on tips for configuration for
-high-speed performance. The primary way to achieve maximal
-performance is to reduce the resources consumed by the mod_perl
-enabled HTTPD processes.
-
-This document assumes familiarity with Apache configuration directives
-some familiarity with the mod_perl configuration directives, and that
-you have already built and installed a mod_perl enabled Apache server.
-Please also read the mod_perl documentation that comes with mod_perl
-for programming tips. Some configurations below use features from
-mod_perl version 1.03 which were not present in earlier versions.
-
-These performance tuning hints are collected from my experiences in
-setting up and running servers for handling large promotional sites,
-such as The Weather Channel's "Blimp Site-ings" game, the MSIE 4.0
-"Subscribe to Win" game, and the MSN Million Dollar Madness game.
-
-=head1 BASIC CONFIGURATION
-
-The basic configuration for mod_perl is as follows. In the
-F<httpd.conf> file, I add configuration parameters to make the
-C<http://www.domain.com/programs> URL be the base location for all
-mod_perl programs. Thus, access to
-C<http://www.domain.com/programs/printenv> will run the printenv
-script, as we'll see below. Also, any *.perl file will be interpreted
-as a mod_perl program just as if it were in the programs directory,
-and *.rperl will be mod_perl, but I<without> any HTTP headers
-automatically sent; you must do this explicitly. If you don't want
-these last two, just leave it out of your configuration.
-
-In the configuration files, I use F</var/www> as the C<ServerRoot>
-directory, and F</var/www/docs> as the C<DocumentRoot>. You will need
-to change it to match your particular setup. The network address below
-in the access to perl-status should also be changed to match yours.
-
-Additions to F<httpd.conf>:
-
- # put mod_perl programs here
- # startup.perl loads all functions that we want to use within mod_perl
- Perlrequire /var/www/perllib/startup.perl
- <Directory /var/www/docs/programs>
- AllowOverride None
- Options ExecCGI
- SetHandler perl-script
- PerlHandler Apache::Registry
- PerlSendHeader On
- </Directory>
-
- # like above, but no PerlSendHeaders
- <Directory /var/www/docs/rprograms>
- AllowOverride None
- Options ExecCGI
- SetHandler perl-script
- PerlHandler Apache::Registry
- PerlSendHeader Off
- </Directory>
-
- # allow arbitrary *.perl files to be scattered throughout the site.
- <Files *.perl>
- SetHandler perl-script
- PerlHandler Apache::Registry
- PerlSendHeader On
- Options +ExecCGI
- </Files>
-
- # like *.perl, but do not send HTTP headers
- <Files *.rperl>
- SetHandler perl-script
- PerlHandler Apache::Registry
- PerlSendHeader Off
- Options +ExecCGI
- </Files>
-
- <Location /perl-status>
- SetHandler perl-script
- PerlHandler Apache::Status
- order deny,allow
- deny from all
- allow from 204.117.82.
- </Location>
-
-Now, you'll notice that I use a C<PerlRequire> directive to load in the
-file F<startup.perl>. In that file, I include all of the C<use>
-statements that occur in any of my mod_perl programs (either from the
-programs directory, or the *.perl files). Here is an example:
-
- #! /usr/local/bin/perl
- use strict;
-
- # load up necessary perl function modules to be able to call from Perl-SSI
- # files. These objects are reloaded upon server restart (SIGHUP or SIGUSR1)
- # if PerlFreshRestart is "On" in httpd.conf (as of mod_perl 1.03).
-
- # only library-type routines should go in this directory.
-
- use lib "/var/www/perllib";
-
- # make sure we are in a sane environment.
- $ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not Perl!";
-
- use Apache::Registry (); # for things in the "/programs" URL
-
- # pull in things we will use in most requests so it is read and compiled
- # exactly once
- use CGI (); CGI->compile(':all');
- use CGI::Carp ();
- use DBI ();
- use DBD::mysql ();
-
- 1;
-
-What this does is pull in all of the code used by the programs (but
-does not C<import> any of the module methods) into the main HTTPD
-process, which then creates the child processes with the code already
-in place. You can also put any new modules you like into the
-F</var/www/perllib> directory and simply C<use> them in your
-programs. There is no need to put C<use lib "/var/www/perllib";> in
-all of your programs. You do, however, still need to C<use> the
-modules in your programs. Perl is smart enough to know it doesn't
-need to recompile the code, but it does need to C<import> the module
-methods into your program's name space.
-
-If you only have a few modules to load, you can use the PerlModule
-directive to pre-load them with the same effect.
-
-The biggest benefit here is that the child process never needs to
-recompile the code, so it is faster to start, and the child process
-actually shares the same physical copy of the code in memory due to
-the way the virtual memory system in modern operating systems works.
-
-You will want to replace the C<use> lines above with modules you
-actually need.
-
-=head2 Simple Test Program
-
-Here's a sample script called F<printenv> that you can stick in the
-F<programs> directory to test the functionality of the configuration.
-
- #! /usr/local/bin/perl
- use strict;
- # print the environment in a mod_perl program under Apache::Registry
-
- print "Content-type: text/html\n\n";
-
- print "<HEAD><TITLE>Apache::Registry Environment</TITLE></HEAD>\n";
-
- print "<BODY><PRE>\n";
- print map { "$_ = $ENV{$_}\n" } sort keys %ENV;
- print "</PRE></BODY>\n";
-
-When you run this, check the value of the GATEWAY_INTERFACE variable
-to see that you are indeed running mod_perl.
-
-=head1 REDUCING MEMORY USE
-
-As a side effect of using mod_perl, your HTTPD processes will be
-larger than without it. There is just no way around it, as you have
-this extra code to support your added functionality.
-
-On a very busy site, the number of HTTPD processes can grow to be
-quite large. For example, on one large site, the typical HTTPD was
-about 5Mb large. With 30 of these, all of RAM was exhausted, and we
-started to go to swap. With 60 of these, swapping turned into
-thrashing, and the whole machine slowed to a crawl.
-
-To reduce thrashing, limiting the maximum number of HTTPD processes to
-a number that is just larger than what will fit into RAM (in this
-case, 45) is necessary. The drawback is that when the server is
-serving 45 requests, new requests will queue up and wait; however, if
-you let the maximum number of processes grow, the new requests will
-start to get served right away, I<but> they will take much longer to
-complete.
-
-One way to reduce the amount of real memory taken up by each process
-is to pre-load commonly used modules into the primary HTTPD process so
-that the code is shared by all processes. This is accomplished by
-inserting the C<use Foo ();> lines into the F<startup.perl> file for
-any C<use Foo;> statement in any commonly used Registry program. The
-idea is that the operating system's VM subsystem will share the data
-across the processes.
-
-You can also pre-load Apache::Registry programs using the
-C<Apache::RegistryLoader> module so that the code for these programs
-is shared by all HTTPD processes as well.
-
-B<NOTE>: When you pre-load modules in the startup script, you may
-need to kill and restart HTTPD for changes to take effect. A simple
-C<kill -HUP> or C<kill -USR1> will not reload that code unless you
-have set the C<PerlFreshRestart> configuration parameter in
-F<httpd.conf> to be "On".
-
-=head1 REDUCING THE NUMBER OF LARGE PROCESSES
-
-Unfortunately, simply reducing the size of each HTTPD process is not
-enough on a very busy site. You also need to reduce the quantity of
-these processes. This reduces memory consumption even more, and
-results in fewer processes fighting for the attention of the CPU. If
-you can reduce the quantity of processes to fit into RAM, your
-response time is increased even more.
-
-The idea of the techniques outlined below is to offload the normal
-document delivery (such as static HTML and GIF files) from the
-mod_perl HTTPD, and let it only handle the mod_perl requests. This
-way, your large mod_perl HTTPD processes are not tied up delivering
-simple content when a smaller process could perform the same job more
-efficiently.
-
-In the techniques below where there are two HTTPD configurations, the
-same httpd executable can be used for both configurations; there is no
-need to build HTTPD both with and without mod_perl compiled into it.
-With Apache 1.3 this can be done with the DSO configuration -- just
-configure one httpd invocation to dynamically load mod_perl and the
-other not to do so.
-
-These approaches work best when most of the requests are for static
-content rather than mod_perl programs. Log file analysis become a bit
-of a challenge when you have multiple servers running on the same
-host, since you must log to different files.
-
-=head2 TWO MACHINES
-
-The simplest way is to put all static content on one machine, and all
-mod_perl programs on another. The only trick is to make sure all
-links are properly coded to refer to the proper host. The static
-content will be served up by lots of small HTTPD processes (configured
-I<not> to use mod_perl), and the relatively few mod_perl requests
-can be handled by the smaller number of large HTTPD processes on the
-other machine.
-
-The drawback is that you must maintain two machines, and this can get
-expensive. For extremely large projects, this is the best way to go.
-
-=head2 TWO IP ADDRESSES
-
-Similar to above, but one HTTPD runs bound to one IP address, while
-the other runs bound to another IP address. The only difference is
-that one machine runs both servers. Total memory usage is reduced
-because the majority of files are served by the smaller HTTPD
-processes, so there are fewer large mod_perl HTTPD processes sitting
-around.
-
-This is accomplished using the F<httpd.conf> directive C<BindAddress>
-to make each HTTPD respond only to one IP address on this host. One
-will have mod_perl enabled, and the other will not.
-
-=head2 TWO PORT NUMBERS
-
-If you cannot get two IP addresses, you can also split the HTTPD
-processes as above by putting one on the standard port 80, and the
-other on some other port, such as 8042. The only configuration
-changes will be the C<Port> and log file directives in the httpd.conf
-file (and also one of them does not have any mod_perl directives).
-
-The major flaw with this scheme is that some firewalls will not allow
-access to the server running on the alternate port, so some people
-will not be able to access all of your pages.
-
-If you use this approach or the one above with dual IP addresses, you
-probably do not want to have the *.perl and *.rperl sections from the
-sample configuration above, as this would require that your primary
-HTTPD server be mod_perl enabled as well.
-
-Thanks to Gerd Knops for this idea.
-
-=head2 USING ProxyPass WITH TWO SERVERS
-
-To overcome the limitation of the alternate port above, you can use
-dual Apache HTTPD servers with just slight difference in
-configuration. Essentially, you set up two servers just as you would
-with the two port on same IP address method above. However, in your
-primary HTTPD configuration you add a line like this:
-
- ProxyPass /programs http://localhost:8042/programs
-
-Where your mod_perl enabled HTTPD is running on port 8042, and has
-only the directory F<programs> within its DocumentRoot. This assumes
-that you have included the mod_proxy module in your server when it was
-built.
-
-Now, when you access http://www.domain.com/programs/printenv it will
-internally be passed through to your HTTPD running on port 8042 as the
-URL http://localhost:8042/programs/printenv and the result relayed
-back transparently. To the client, it all seems as if it is just one
-server running. This can also be used on the dual-host version to
-hide the second server from view if desired.
-
-=begin html
-<P>
-A complete configuration example of this technique is provided by
-two HTTPD configuration files.
-<A HREF="httpd.conf.txt">httpd.conf</A> is for the main server for all
-regular pages, and <A HREF="httpd%2bperl.conf.txt">httpd+perl.conf</A> is
-for the mod_perl programs accessed in the <CODE>/programs</CODE> URL.
-</P>
-
-The directory structure assumes that F</var/www/documents> is the
-C<DocumentRoot> directory, and the the mod_perl programs are in
-F</var/www/programs> and F</var/www/rprograms>. I start them as
-follows:
-
- daemon httpd
- daemon httpd -f conf/httpd+perl.conf
-
-=end html
-
-Thanks to Bowen Dwelle for this idea.
-
-=head2 SQUID ACCELERATOR
-
-Another approach to reducing the number of large HTTPD processes on
-one machine is to use an accelerator such as Squid (which can be found
-at http://squid.nlanr.net/Squid/ on the web) between the clients and
-your large mod_perl HTTPD processes. The idea here is that squid will
-handle the static objects from its cache while the HTTPD processes
-will handle mostly just the mod_perl requests once the cache is
-primed. This reduces the number of HTTPD processes and thus reduces
-the amount of memory used.
-
-To set this up, just install the current version of Squid (at this
-writing, this is version 1.1.22) and use the RunAccel script to start
-it. You will need to reconfigure your HTTPD to use an alternate port,
-such as 8042, rather than its default port 80. To do this, you can
-either change the F<httpd.conf> line C<Port> or add a C<Listen>
-directive to match the port specified in the F<squid.conf> file.
-Your URLs do not need to change. The benefit of using the C<Listen>
-directive is that redirected URLs will still use the default port 80
-rather than your alternate port, which might reveal your real server
-location to the outside world and bypass the accelerator.
-
-In the F<squid.conf> file, you will probably want to add C<programs>
-and C<perl> to the C<cache_stoplist> parameter so that these are
-always passed through to the HTTPD server under the assumption that
-they always produce different results.
-
-This is very similar to the two port, ProxyPass version above, but the
-Squid cache may be more flexible to fine tune for dynamic documents
-that do not change on every view. The Squid proxy server also seems
-to be more stable and robust than the Apache 1.2.4 proxy module.
-
-One drawback to using this accelerator is that the logfiles will
-always report access from IP address 127.0.0.1, which is the local
-host loopback address. Also, any access permissions or other user
-tracking that requires the remote IP address will always see the local
-address. The following code uses a feature of recent mod_perl
-versions (tested with mod_perl 1.16 and Apache 1.3.3) to trick Apache
-into logging the real client address and giving that information to
-mod_perl programs for their purposes.
-
-First, in your F<startup.perl> file add the following code:
-
- use Apache::Constants qw(OK);
-
- sub My::SquidRemoteAddr ($) {
- my $r = shift;
-
- if (my ($ip) = $r->header_in('X-Forwarded-For') =~ /([^,\s]+)$/) {
- $r->connection->remote_ip($ip);
- }
-
- return OK;
- }
-
-Next, add this to your F<httpd.conf> file:
-
- PerlPostReadRequestHandler My::SquidRemoteAddr
-
-This will cause every request to have its C<remote_ip> address
-overridden by the value set in the C<X-Forwarded-For> header added by
-Squid. Note that if you have multiple proxies between the client and
-the server, you want the IP address of the last machine before your
-accelerator. This will be the right-most address in the
-X-Forwarded-For header (assuming the other proxies append their
-addresses to this same header, like Squid does.)
-
-If you use apache with mod_proxy at your frontend, you can use Ask
-Bjørn Hansen's mod_proxy_add_forward module from
-ftp://ftp.netcetera.dk/pub/apache/ to make it insert the
-C<X-Forwarded-For> header.
-
-=head1 SUMMARY
-
-To gain maximal performance of mod_perl on a busy site, one must
-reduce the amount of resources used by the HTTPD to fit within what
-the machine has available. The best way to do this is to reduce
-memory usage. If your mod_perl requests are fewer than your static
-page requests, then splitting the servers into mod_perl and
-non-mod_perl versions further allows you to tune the amount of
-resources used by each type of request. Using the C<ProxyPass>
-directive allows these multiple servers to appear as one to the
-users. Using the Squid accelerator also achieves this effect, but
-Squid takes care of deciding when to acccess the large server
-automatically.
-
-If all of your requests require processing by mod_perl, then the only
-thing you can really do is throw a I<lot> of memory on your machine
-and try to tweak the perl code to be as small and lean as possible,
-and to share the virtual memory pages by pre-loading the code.
-
-=head1 AUTHOR
-
-This document is written by Vivek Khera. If you need to contact me,
-just send email to the mod_perl mailing list.
-
-This document is copyright (c) 1997-1998 by Vivek Khera.
-
-If you have contributions for this document, please post them to the
-mailing list. Perl POD format is best, but plain text will do, too.
-
-If you need assistance, contact the mod_perl mailing list at
-modperl@perl.apache.org first (send 'subscribe' to modperl-request@apache.org
-to subscribe). There are lots of people there that can help. Also,
-check the web pages http://perl.apache.org/ and http://www.apache.org/
-for explanations of the configuration options.
-
-$Revision$
-$Date$
diff --git a/tags/v1_29/src/.cvsignore b/tags/v1_29/src/.cvsignore
deleted file mode 100644
index d491f14..0000000
--- a/tags/v1_29/src/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Configuration
-ap_config_auto.h
diff --git a/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.def b/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.def
deleted file mode 100644
index d9b9963..0000000
--- a/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.def
+++ /dev/null
@@ -1,14 +0,0 @@
-LIBRARY
-
-EXPORTS
-
- sv2request_rec
- perl_request_rec
- mod_perl_tie_table
- perl_cmd_perl_FLAG
- perl_cmd_perl_TAKE2
- perl_cmd_perl_TAKE1
- perl_cmd_perl_TAKE123
- perl_perl_cmd_cleanup
-
-
diff --git a/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.dsp b/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.dsp
deleted file mode 100644
index 6812975..0000000
--- a/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.dsp
+++ /dev/null
@@ -1,171 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModulePerl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModulePerl - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModulePerl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModulePerl.mak" CFG="ApacheModulePerl - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModulePerl - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModulePerl - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINSOCK2API_" /D "_MSWSOCK_" /D "_WINDOWS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINSOCK2API_" /D "_MSWSOCK_" /D "_WINDOWS" /FR /YX /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModulePerl - Win32 Release"
-# Name "ApacheModulePerl - Win32 Debug"
-# Begin Source File
-
-SOURCE=..\perl\Apache.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ApacheModulePerl.def
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\..\Apache\ApacheCore.lib
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Constants.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Connection.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\File.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Log.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\URI.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Util.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Table.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Server.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\dirent.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\mod_perl.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\mod_perl_opmask.c
-# End Source File
-
-# Begin Source File
-
-SOURCE=..\perl\mod_perl.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\..\perl\lib\CORE\perl.lib
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\perl_config.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\perl_util.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\perlio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\perlxsi.c
-# End Source File
-# End Target
-# End Project
diff --git a/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.mak b/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.mak
deleted file mode 100644
index 8ecda38..0000000
--- a/tags/v1_29/src/modules/ApacheModulePerl/ApacheModulePerl.mak
+++ /dev/null
@@ -1,926 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on ApacheModulePerl.dsp
-!IF "$(CFG)" == ""
-CFG=ApacheModulePerl - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to ApacheModulePerl - Win32\
- Debug.
-!ENDIF
-
-!IF "$(CFG)" != "ApacheModulePerl - Win32 Release" && "$(CFG)" !=\
- "ApacheModulePerl - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModulePerl.mak" CFG="ApacheModulePerl - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModulePerl - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModulePerl - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-OUTDIR=.\Release
-INTDIR=.\Release
-# Begin Custom Macros
-OutDir=.\Release
-# End Custom Macros
-
-!IF "$(RECURSE)" == "0"
-
-ALL : "$(OUTDIR)\ApacheModulePerl.dll"
-
-!ELSE
-
-ALL : "$(OUTDIR)\ApacheModulePerl.dll"
-
-!ENDIF
-
-CLEAN :
- -@erase "$(INTDIR)\Apache.obj"
- -@erase "$(INTDIR)\Constants.obj"
- -@erase "$(INTDIR)\mod_perl.obj"
- -@erase "$(INTDIR)\perl_config.obj"
- -@erase "$(INTDIR)\perl_util.obj"
- -@erase "$(INTDIR)\perlio.obj"
- -@erase "$(INTDIR)\perlxsi.obj"
- -@erase "$(INTDIR)\vc50.idb"
- -@erase "$(OUTDIR)\ApacheModulePerl.dll"
- -@erase "$(OUTDIR)\ApacheModulePerl.exp"
- -@erase "$(OUTDIR)\ApacheModulePerl.lib"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP_PROJ=/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
- /Fp"$(INTDIR)\ApacheModulePerl.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD\
- /c
-CPP_OBJS=.\Release/
-CPP_SBRS=.
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheModulePerl.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /subsystem:windows /dll /incremental:no\
- /pdb:"$(OUTDIR)\ApacheModulePerl.pdb" /machine:I386\
- /out:"$(OUTDIR)\ApacheModulePerl.dll" /implib:"$(OUTDIR)\ApacheModulePerl.lib"
-LINK32_OBJS= \
- "$(INTDIR)\Apache.obj" \
- "$(INTDIR)\Constants.obj" \
- "$(INTDIR)\mod_perl.obj" \
- "$(INTDIR)\perl_config.obj" \
- "$(INTDIR)\perl_util.obj" \
- "$(INTDIR)\perlio.obj" \
- "$(INTDIR)\perlxsi.obj" \
- "..\..\..\..\..\Apache\ApacheCore.lib" \
- "..\..\..\..\..\perl\lib\CORE\perl.lib"
-
-"$(OUTDIR)\ApacheModulePerl.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-OUTDIR=.\Debug
-INTDIR=.\Debug
-# Begin Custom Macros
-OutDir=.\Debug
-# End Custom Macros
-
-!IF "$(RECURSE)" == "0"
-
-ALL : "$(OUTDIR)\ApacheModulePerl.dll" "$(OUTDIR)\ApacheModulePerl.bsc"
-
-!ELSE
-
-ALL : "$(OUTDIR)\ApacheModulePerl.dll" "$(OUTDIR)\ApacheModulePerl.bsc"
-
-!ENDIF
-
-CLEAN :
- -@erase "$(INTDIR)\Apache.obj"
- -@erase "$(INTDIR)\Apache.sbr"
- -@erase "$(INTDIR)\Constants.obj"
- -@erase "$(INTDIR)\Constants.sbr"
- -@erase "$(INTDIR)\mod_perl.obj"
- -@erase "$(INTDIR)\mod_perl.sbr"
- -@erase "$(INTDIR)\perl_config.obj"
- -@erase "$(INTDIR)\perl_config.sbr"
- -@erase "$(INTDIR)\perl_util.obj"
- -@erase "$(INTDIR)\perl_util.sbr"
- -@erase "$(INTDIR)\perlio.obj"
- -@erase "$(INTDIR)\perlio.sbr"
- -@erase "$(INTDIR)\perlxsi.obj"
- -@erase "$(INTDIR)\perlxsi.sbr"
- -@erase "$(INTDIR)\vc50.idb"
- -@erase "$(INTDIR)\vc50.pdb"
- -@erase "$(OUTDIR)\ApacheModulePerl.bsc"
- -@erase "$(OUTDIR)\ApacheModulePerl.dll"
- -@erase "$(OUTDIR)\ApacheModulePerl.exp"
- -@erase "$(OUTDIR)\ApacheModulePerl.ilk"
- -@erase "$(OUTDIR)\ApacheModulePerl.lib"
- -@erase "$(OUTDIR)\ApacheModulePerl.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP_PROJ=/nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
- /FR"$(INTDIR)\\" /Fp"$(INTDIR)\ApacheModulePerl.pch" /YX /Fo"$(INTDIR)\\"\
- /Fd"$(INTDIR)\\" /FD /c
-CPP_OBJS=.\Debug/
-CPP_SBRS=.\Debug/
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheModulePerl.bsc"
-BSC32_SBRS= \
- "$(INTDIR)\Apache.sbr" \
- "$(INTDIR)\Constants.sbr" \
- "$(INTDIR)\mod_perl.sbr" \
- "$(INTDIR)\perl_config.sbr" \
- "$(INTDIR)\perl_util.sbr" \
- "$(INTDIR)\perlio.sbr" \
- "$(INTDIR)\perlxsi.sbr"
-
-"$(OUTDIR)\ApacheModulePerl.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
- $(BSC32) @<<
- $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib /nologo /subsystem:windows /dll /incremental:yes\
- /pdb:"$(OUTDIR)\ApacheModulePerl.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)\ApacheModulePerl.dll" /implib:"$(OUTDIR)\ApacheModulePerl.lib"\
- /pdbtype:sept
-LINK32_OBJS= \
- "$(INTDIR)\Apache.obj" \
- "$(INTDIR)\Constants.obj" \
- "$(INTDIR)\mod_perl.obj" \
- "$(INTDIR)\perl_config.obj" \
- "$(INTDIR)\perl_util.obj" \
- "$(INTDIR)\perlio.obj" \
- "$(INTDIR)\perlxsi.obj" \
- "..\..\..\..\..\Apache\ApacheCore.lib" \
- "..\..\..\..\..\perl\lib\CORE\perl.lib"
-
-"$(OUTDIR)\ApacheModulePerl.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-.c{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release" || "$(CFG)" ==\
- "ApacheModulePerl - Win32 Debug"
-SOURCE=..\perl\Apache.c
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-DEP_CPP_APACH=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\Apache.obj" : $(SOURCE) $(DEP_CPP_APACH) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-DEP_CPP_APACH=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\Apache.obj" "$(INTDIR)\Apache.sbr" : $(SOURCE) $(DEP_CPP_APACH)\
- "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\perl\Constants.c
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-DEP_CPP_CONST=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
-
-
-"$(INTDIR)\Constants.obj" : $(SOURCE) $(DEP_CPP_CONST) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-DEP_CPP_CONST=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
-
-
-"$(INTDIR)\Constants.obj" "$(INTDIR)\Constants.sbr" : $(SOURCE)\
- $(DEP_CPP_CONST) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\perl\mod_perl.c
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-DEP_CPP_MOD_P=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\mod_perl.obj" : $(SOURCE) $(DEP_CPP_MOD_P) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-DEP_CPP_MOD_P=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\mod_perl.obj" "$(INTDIR)\mod_perl.sbr" : $(SOURCE) $(DEP_CPP_MOD_P)\
- "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\perl\perl_config.c
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-DEP_CPP_PERL_=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\perl_config.obj" : $(SOURCE) $(DEP_CPP_PERL_) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-DEP_CPP_PERL_=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\perl_config.obj" "$(INTDIR)\perl_config.sbr" : $(SOURCE)\
- $(DEP_CPP_PERL_) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\perl\perl_util.c
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-DEP_CPP_PERL_U=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\perl_util.obj" : $(SOURCE) $(DEP_CPP_PERL_U) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-DEP_CPP_PERL_U=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\perl_util.obj" "$(INTDIR)\perl_util.sbr" : $(SOURCE)\
- $(DEP_CPP_PERL_U) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\perl\perlio.c
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-DEP_CPP_PERLI=\
- "..\..\..\..\..\apache\src\main\alloc.h"\
- "..\..\..\..\..\apache\src\main\buff.h"\
- "..\..\..\..\..\apache\src\main\conf.h"\
- "..\..\..\..\..\apache\src\main\http_conf_globals.h"\
- "..\..\..\..\..\apache\src\main\http_config.h"\
- "..\..\..\..\..\apache\src\main\http_core.h"\
- "..\..\..\..\..\apache\src\main\http_log.h"\
- "..\..\..\..\..\apache\src\main\http_main.h"\
- "..\..\..\..\..\apache\src\main\http_protocol.h"\
- "..\..\..\..\..\apache\src\main\http_request.h"\
- "..\..\..\..\..\apache\src\main\httpd.h"\
- "..\..\..\..\..\apache\src\main\multithread.h"\
- "..\..\..\..\..\apache\src\main\util_script.h"\
- "..\..\..\..\..\apache\src\os\win32\os.h"\
- "..\..\..\..\..\apache\src\os\win32\readdir.h"\
- "..\..\..\..\..\apache\src\regex\regex.h"\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\..\..\..\..\perl\lib\core\xsub.h"\
- "..\perl\dirent.h"\
- "..\perl\mod_perl.h"\
-
-
-"$(INTDIR)\perlio.obj" : $(SOURCE) $(DEP_CPP_PERLI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-
-"$(INTDIR)\perlio.obj" "$(INTDIR)\perlio.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\perl\perlxsi.c
-
-!IF "$(CFG)" == "ApacheModulePerl - Win32 Release"
-
-DEP_CPP_PERLX=\
- "..\..\..\..\..\perl\lib\core\av.h"\
- "..\..\..\..\..\perl\lib\core\config.h"\
- "..\..\..\..\..\perl\lib\core\cop.h"\
- "..\..\..\..\..\perl\lib\core\cv.h"\
- "..\..\..\..\..\perl\lib\core\dosish.h"\
- "..\..\..\..\..\perl\lib\core\embed.h"\
- "..\..\..\..\..\perl\lib\core\extern.h"\
- "..\..\..\..\..\perl\lib\core\form.h"\
- "..\..\..\..\..\perl\lib\core\gv.h"\
- "..\..\..\..\..\perl\lib\core\handy.h"\
- "..\..\..\..\..\perl\lib\core\hv.h"\
- "..\..\..\..\..\perl\lib\core\mg.h"\
- "..\..\..\..\..\perl\lib\core\netdb.h"\
- "..\..\..\..\..\perl\lib\core\op.h"\
- "..\..\..\..\..\perl\lib\core\opcode.h"\
- "..\..\..\..\..\perl\lib\core\perl.h"\
- "..\..\..\..\..\perl\lib\core\perlio.h"\
- "..\..\..\..\..\perl\lib\core\perlsdio.h"\
- "..\..\..\..\..\perl\lib\core\perly.h"\
- "..\..\..\..\..\perl\lib\core\pp.h"\
- "..\..\..\..\..\perl\lib\core\proto.h"\
- "..\..\..\..\..\perl\lib\core\regexp.h"\
- "..\..\..\..\..\perl\lib\core\scope.h"\
- "..\..\..\..\..\perl\lib\core\sv.h"\
- "..\..\..\..\..\perl\lib\core\sys\socket.h"\
- "..\..\..\..\..\perl\lib\core\util.h"\
- "..\..\..\..\..\perl\lib\core\win32.h"\
- "..\..\..\..\..\perl\lib\core\win32io.h"\
- "..\..\..\..\..\perl\lib\core\win32iop.h"\
- "..\perl\dirent.h"\
-
-
-"$(INTDIR)\perlxsi.obj" : $(SOURCE) $(DEP_CPP_PERLX) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "ApacheModulePerl - Win32 Debug"
-
-
-"$(INTDIR)\perlxsi.obj" "$(INTDIR)\perlxsi.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-
-!ENDIF
-
diff --git a/tags/v1_29/src/modules/perl/.cvsignore b/tags/v1_29/src/modules/perl/.cvsignore
deleted file mode 100644
index 1aaa7ba..0000000
--- a/tags/v1_29/src/modules/perl/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-
-mod_perl_version.h
diff --git a/tags/v1_29/src/modules/perl/Apache.xs b/tags/v1_29/src/modules/perl/Apache.xs
deleted file mode 100644
index d151e98..0000000
--- a/tags/v1_29/src/modules/perl/Apache.xs
+++ /dev/null
@@ -1,2162 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1996-2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
-
-#define CORE_PRIVATE
-#include "mod_perl.h"
-#include "mod_perl_xs.h"
-
-
-#ifdef USE_SFIO
-#undef send_fd_length
-static long send_fd_length(FILE *f, request_rec *r, long length)
-{
- croak("Apache::send_fd() not supported with sfio");
- return 0;
-}
-#endif
-
-#if defined(PERL_STACKED_HANDLERS) && defined(PERL_GET_SET_HANDLERS)
-
-#define PER_DIR_CONFIG 1
-#define PER_SRV_CONFIG 2
-
-typedef struct {
- int type;
- char *name;
- void *offset;
- void (*set_func) (void *, void *, SV *);
-} perl_handler_table;
-
-typedef struct {
- I32 fill;
- AV *av;
- AV **ptr;
-} perl_save_av;
-
-static void set_handler_dir (perl_handler_table *tab, request_rec *r, SV *sv);
-static void set_handler_srv (perl_handler_table *tab, request_rec *r, SV *sv);
-
-#define HandlerDirEntry(name,member) \
-PER_DIR_CONFIG, name, (void*)XtOffsetOf(perl_dir_config,member), \
-(void(*)(void *, void *, SV *)) set_handler_dir
-
-#define HandlerSrvEntry(name,member) \
-PER_SRV_CONFIG, name, (void*)XtOffsetOf(perl_server_config,member), \
-(void(*)(void *, void *, SV *)) set_handler_srv
-
-static perl_handler_table handler_table[] = {
- {HandlerSrvEntry("PerlPostReadRequestHandler", PerlPostReadRequestHandler)},
- {HandlerSrvEntry("PerlTransHandler", PerlTransHandler)},
- {HandlerDirEntry("PerlHeaderParserHandler", PerlHeaderParserHandler)},
- {HandlerDirEntry("PerlAccessHandler", PerlAccessHandler)},
- {HandlerDirEntry("PerlAuthenHandler", PerlAuthenHandler)},
- {HandlerDirEntry("PerlAuthzHandler", PerlAuthzHandler)},
- {HandlerDirEntry("PerlTypeHandler", PerlTypeHandler)},
- {HandlerDirEntry("PerlFixupHandler", PerlFixupHandler)},
- {HandlerDirEntry("PerlHandler", PerlHandler)},
- {HandlerDirEntry("PerlLogHandler", PerlLogHandler)},
- {HandlerDirEntry("PerlCleanupHandler", PerlCleanupHandler)},
- { FALSE, NULL }
-};
-
-static void perl_restore_av(void *data)
-{
- perl_save_av *save_av = (perl_save_av *)data;
-
- if(save_av->fill != DONE) {
- AvFILLp(*save_av->ptr) = save_av->fill;
- }
- else if(save_av->av != Nullav) {
- *save_av->ptr = save_av->av;
- }
-}
-
-static void perl_handler_merge_avs(char *hook, AV **dest)
-{
- int i = 0;
- HV *hv = perl_get_hv("Apache::PerlStackedHandlers", FALSE);
- SV **svp = hv_fetch(hv, hook, strlen(hook), FALSE);
- AV *base;
-
- if(!(svp && SvROK(*svp)))
- return;
-
- base = (AV*)SvRV(*svp);
- for(i=0; i<=AvFILL(base); i++) {
- SV *sv = *av_fetch(base, i, FALSE);
- av_push(*dest, SvREFCNT_inc(sv));
- }
-}
-
-static void set_handler_base(void *ptr, perl_handler_table *tab, pool *p, SV *sv)
-{
- AV **av = (AV **)((char *)ptr + (int)(long)tab->offset);
-
- perl_save_av *save_av =
- (perl_save_av *)palloc(p, sizeof(perl_save_av));
-
- save_av->fill = DONE;
- save_av->av = Nullav;
-
- if((sv == &sv_undef) || (SvIOK(sv) && SvIV(sv) == DONE)) {
- if(AvTRUE(*av)) {
- save_av->fill = AvFILL(*av);
- AvFILLp(*av) = -1;
- }
- }
- else if(SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVAV) {
- if(AvTRUE(*av))
- save_av->av = av_copy_array(*av);
- *av = (AV*)SvRV(sv);
- ++SvREFCNT(*av);
- }
- else {
- croak("Can't set_handler with that value");
- }
- save_av->ptr = av;
- register_cleanup(p, save_av, perl_restore_av, mod_perl_noop);
-}
-
-static void set_handler_dir(perl_handler_table *tab, request_rec *r, SV *sv)
-{
- dPPDIR;
- set_handler_base((void*)cld, tab, r->pool, sv);
-}
-
-static void set_handler_srv(perl_handler_table *tab, request_rec *r, SV *sv)
-{
- dPSRV(r->server);
- set_handler_base((void*)cls, tab, r->pool, sv);
-}
-
-static perl_handler_table *perl_handler_lookup(char *name)
-{
- int i;
- for (i=0; handler_table[i].name; i++) {
- perl_handler_table *tab = &handler_table[i];
- if(strEQ(name, tab->name))
- return tab;
- }
- return NULL;
-}
-
-
-static SV *get_handlers(request_rec *r, char *hook)
-{
- AV *avcopy;
- AV **av;
- dPPDIR;
- dPSRV(r->server);
- void *ptr;
- perl_handler_table *tab = perl_handler_lookup(hook);
-
- if(!tab) return Nullsv;
-
- if(tab->type == PER_DIR_CONFIG)
- ptr = (void*)cld;
- else
- ptr = (void*)cls;
-
- av = (AV **)((char *)ptr + (int)(long)tab->offset);
-
- if(*av)
- avcopy = av_copy_array(*av);
- else
- avcopy = newAV();
-
- perl_handler_merge_avs(hook, &avcopy);
-
- return newRV_noinc((SV*)avcopy);
-}
-
-static void set_handlers(request_rec *r, SV *hook, SV *sv)
-{
- dTHR;
- perl_handler_table *tab = perl_handler_lookup(SvPV(hook,na));
- if(tab && tab->set_func)
- (*tab->set_func)(tab, r, sv);
-
- (void)hv_delete_ent(perl_get_hv("Apache::PerlStackedHandlers", FALSE),
- hook, G_DISCARD, FALSE);
-}
-#endif
-
-#if MODULE_MAGIC_NUMBER < 19970909
-static void
-child_terminate(request_rec *r)
-{
-#ifndef WIN32
- log_transaction(r);
-#endif
- exit(0);
-}
-#endif
-
-static char *custom_response(request_rec *r, int status, char *string, int reset)
-{
- core_dir_config *conf = (core_dir_config *)
- get_module_config(r->per_dir_config, &core_module);
- int idx;
- char *retval = NULL;
-
- if(conf->response_code_strings == NULL) {
- conf->response_code_strings = (char **)
- pcalloc(perl_get_startup_pool(),
- sizeof(*conf->response_code_strings) *
- RESPONSE_CODES);
- }
-
- idx = index_of_response(status);
- retval = conf->response_code_strings[idx];
- if (reset) {
- conf->response_code_strings[idx] = NULL;
- }
- else if (string) {
- conf->response_code_strings[idx] =
- ((is_url(string) || (*string == '/')) && (*string != '"')) ?
- pstrdup(r->pool, string) : pstrcat(r->pool, "\"", string, NULL);
- }
-
- return retval;
-}
-
-static void Apache_terminate_if_done(request_rec *r, int sts)
-{
-#ifndef WIN32
- if(Apache_exit_is_done(sts)) child_terminate(r);
-#endif
-}
-
-#if MODULE_MAGIC_NUMBER < 19980317
-int basic_http_header(request_rec *r);
-#endif
-
-#if MODULE_MAGIC_NUMBER < 19980201
-unsigned get_server_port(const request_rec *r)
-{
- unsigned port = r->server->port ? r->server->port : 80;
-
- return r->hostname ? ntohs(r->connection->local_addr.sin_port)
- : port;
-}
-#define get_server_name(r) \
- (r->hostname ? r->hostname : r->server->server_hostname)
-#endif
-
-#if MODULE_MAGIC_AT_LEAST(19981108, 1)
-#define mod_perl_define(sv,name) ap_exists_config_define(name)
-#elif(MODULE_MAGIC_NUMBER >= MMN_131) && !defined(WIN32)
-static int mod_perl_define(SV *sv, char *name)
-{
- char **defines;
- int i;
-
- defines = (char **)ap_server_config_defines->elts;
- for (i = 0; i < ap_server_config_defines->nelts; i++) {
- if (strcmp(defines[i], name) == 0) {
- return 1;
- }
- }
- return 0;
-}
-#else
-#define mod_perl_define(sv,name) 0
-#endif
-
-static int sv_str_header(void *arg, const char *k, const char *v)
-{
- SV *sv = (SV*)arg;
- sv_catpvf(sv, "%s: %s\n", k, v);
- return 1;
-}
-
-#if MODULE_MAGIC_NUMBER >= 19980806
-/*
- * ap_scan_script_header_err_core(r, buffer, getsfunc_SV, sv)
- */
-#if 0
-static int getsfunc_SV(char *buf, int bufsiz, void *param)
-{
- SV *sv = (SV*)param;
- STRLEN len;
- char *tmp = SvPV(sv,len);
- int i;
-
- if(!SvTRUE(sv))
- return 0;
-
- for(i=0; i<=len; i++) {
- if(tmp[i] == LF) break;
- }
-
- Move(tmp, buf, i, char);
- buf[i] = '\0';
-
- if(len < i) {
- sv_setpv(sv, "");
- }
- else {
- tmp += i+1;
- sv_setpv(sv, tmp);
- }
- return 1;
-}
-#endif /*0*/
-#endif /*MODULE_MAGIC_NUMBER*/
-
-static void rwrite_neg_trace(request_rec *r)
-{
-#if HAS_MMN_130
- ap_log_error(APLOG_MARK, APLOG_DEBUG, r->server,
-#else
- fprintf(stderr,
-#endif
- "mod_perl: rwrite returned -1 (fd=%d, B_EOUT=%d)\n",
- ap_bfileno(r->connection->client, B_WR),
- r->connection->client->flags & B_EOUT);
-}
-
-#define check_auth_type(r) \
- if (!auth_type(r)) { \
- (void)mod_perl_auth_type(r, "Basic"); \
- }
-
-MODULE = Apache PACKAGE = Apache PREFIX = mod_perl_
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-void
-add_version_component(name)
- const char *name
-
- CODE:
- ap_add_version_component(name);
-
-const char *
-current_callback(r)
- Apache r
-
- CODE:
- RETVAL = PERL_GET_CUR_HOOK;
-
- OUTPUT:
- RETVAL
-
-int
-mod_perl_sent_header(r, val=0)
- Apache r
- int val
-
-int
-mod_perl_seqno(self, inc=0)
- SV *self
- int inc
-
-int
-perl_hook(name)
- char *name
-
-#if defined(PERL_GET_SET_HANDLERS)
-SV *
-get_handlers(r, hook)
- Apache r
- char *hook
-
- CODE:
-#ifdef get_handlers
- get_handlers(r,hook);
-#else
- RETVAL = get_handlers(r,hook);
-#endif
-
- OUTPUT:
- RETVAL
-
-void
-set_handlers(r, hook, sv)
- Apache r
- SV *hook
- SV *sv
-
-#endif
-
-int
-mod_perl_push_handlers(self, hook, cv)
- SV *self
- char *hook
- SV *cv;
-
- CODE:
- RETVAL = mod_perl_push_handlers(self, hook, cv, Nullav);
-
- OUTPUT:
- RETVAL
-
-int
-mod_perl_can_stack_handlers(self)
- SV *self
-
-void
-mod_perl_register_cleanup(r, sv)
- Apache r
- SV *sv
-
- ALIAS:
- Apache::post_connection = 1
-
- PREINIT:
- ix = ix; /* avoid -Wall warning */
-
-#define APACHE_REGISTRY_CURSTASH perl_get_sv("Apache::Registry::curstash", TRUE)
-
-void
-mod_perl_clear_rgy_endav(r, sv=APACHE_REGISTRY_CURSTASH)
- Apache r
- SV *sv
-
-void
-mod_perl_stash_rgy_endav(r, sv=APACHE_REGISTRY_CURSTASH)
- Apache r
- SV *sv
-
- CODE:
- perl_stash_rgy_endav(r->uri, sv);
-
-I32
-mod_perl_define(sv, name)
- SV *sv
- char *name
-
- CLEANUP:
- sv = sv; /*-Wall*/
-
-I32
-module(sv, name)
- SV *sv
- SV *name
-
- CODE:
- if((*(SvEND(name) - 2) == '.') && (*(SvEND(name) - 1) == 'c'))
- RETVAL = find_linked_module(SvPVX(name)) ? 1 : 0;
- else
- RETVAL = (sv && perl_module_is_loaded(SvPVX(name)));
-
- OUTPUT:
- RETVAL
-
-char *
-mod_perl_set_opmask(r, sv)
- Apache r
- SV *sv
-
-void
-untaint(...)
-
- PREINIT:
- int i;
-
- CODE:
- if(!tainting) XSRETURN_EMPTY;
- for(i=1; i<items; i++)
- mod_perl_untaint(ST(i));
-
-void
-taint(...)
-
- PREINIT:
- int i;
-
- CODE:
- if(!tainting) XSRETURN_EMPTY;
- for(i=1; i<items; i++)
- sv_magic(ST(i), Nullsv, 't', Nullch, 0);
-
-#ifndef WIN32
-
-void
-child_terminate(r)
- Apache r
-
-#endif
-
-#CORE::exit only causes trouble when we're embedded
-void
-exit(...)
-
- PREINIT:
- int sts = 0;
- request_rec *r = NULL;
-
- CODE:
- /* $r->exit */
- r = sv2request_rec(ST(0), "Apache", cv);
-
- if(items > 1) {
- sts = (int)SvIV(ST(1));
- }
- else { /* Apache::exit() */
- if(SvTRUE(ST(0)) && SvIOK(ST(0)))
- sts = (int)SvIV(ST(0));
- }
-
- MP_CHECK_REQ(r, "Apache::exit");
-
- if(!r->connection->aborted)
- rflush(r);
- Apache_terminate_if_done(r,sts);
- perl_call_halt(sts);
-
-#in case you need Apache::fork
-# INCLUDE: fork.xs
-
-void
-CLOSE(...)
-
- ALIAS:
- BINMODE = 1
-
- CODE:
- items = items;
- ix = ix;
- /*NOOP*/
-
-Apache
-TIEHANDLE(classname, r=NULL)
- SV *classname
- Apache r
-
- CODE:
- RETVAL = (r && classname) ? r : perl_request_rec(NULL);
-
- OUTPUT:
- RETVAL
-
-int
-OPEN(self, arg1, arg2=Nullsv)
- SV *self
- SV *arg1
- SV *arg2
-
- PREINIT:
- char *name;
- STRLEN len;
- GV *gv = gv_fetchpv("STDOUT", TRUE, SVt_PVIO);
- SV *arg;
-
- CODE:
- sv_unmagic((SV*)gv, 'q'); /* untie *STDOUT */
- if (arg2 && self) {
- arg = newSVsv(arg1);
- sv_catsv(arg, arg2);
- }
- else {
- arg = arg1;
- }
-
- name = SvPV(arg, len);
- RETVAL = do_open(gv, name, len, FALSE, O_RDONLY, 0, Nullfp);
-
- OUTPUT:
- RETVAL
-
-int
-FILENO(r)
- Apache r
-
- CODE:
- RETVAL = fileno(stdout);
-
- OUTPUT:
- RETVAL
-
-SV *
-as_string(r)
- Apache r
-
- CODE:
- RETVAL = newSVpv(r->the_request,0);
- sv_catpvn(RETVAL, "\n", 1);
-
- table_do(sv_str_header, (void*)RETVAL, r->headers_in, NULL);
- sv_catpvf(RETVAL, "\n%s %s\n", r->protocol, r->status_line);
-
- table_do(sv_str_header, (void*)RETVAL, r->headers_out, NULL);
- table_do(sv_str_header, (void*)RETVAL, r->err_headers_out, NULL);
- sv_catpvn(RETVAL, "\n", 1);
-
- OUTPUT:
- RETVAL
-
-#httpd.h
-
-void
-chdir_file(r, file=r->filename)
- Apache r
- const char *file
-
- CODE:
- chdir_file(file);
-
-SV *
-mod_perl_gensym(pack="Apache::Symbol")
- char *pack
-
-SV *
-mod_perl_slurp_filename(r)
- Apache r
-
-char *
-unescape_url(sv)
-SV *sv
-
- INIT:
- char *string = SvPV_force(sv, PL_na);
-
- CODE:
- unescape_url(string);
- RETVAL = string;
-
- OUTPUT:
- RETVAL
-
-#
-# Doing our own unscape_url for the query info part of an url
-#
-
-char *
-unescape_url_info(url)
- char * url
-
- CODE:
- register char * trans = url ;
- char digit ;
-
- if (!url || !*url) {
- XSRETURN_UNDEF;
- }
-
- RETVAL = url;
-
- while (*url != '\0') {
- if (*url == '+')
- *trans = ' ';
- else if (*url != '%')
- *trans = *url;
- else if (!isxdigit(url[1]) || !isxdigit(url[2]))
- *trans = '%';
- else {
- url++ ;
- digit = ((*url >= 'A') ? ((*url & 0xdf) - 'A')+10 : (*url - '0'));
- url++ ;
- *trans = (digit << 4) +
- (*url >= 'A' ? ((*url & 0xdf) - 'A')+10 : (*url - '0'));
- }
- url++, trans++ ;
- }
- *trans = '\0';
-
- OUTPUT:
- RETVAL
-
-#functions from http_main.c
-
-void
-hard_timeout(r, string)
- Apache r
- char *string
-
- CODE:
-#ifndef USE_THREADS
- hard_timeout(string, r);
-#endif
-
-void
-soft_timeout(r, string)
- Apache r
- char *string
-
- CODE:
- soft_timeout(string, r);
-
-void
-kill_timeout(r)
- Apache r
-
- CODE:
-#ifndef USE_THREADS
- kill_timeout(r);
-#endif
-
-void
-reset_timeout(r)
- Apache r
-
-#functions from http_config.c
-
-int
-translate_name(r)
- Apache r
-
- CODE:
-#ifdef WIN32
- croak("Apache->translate_name not supported under Win32");
- RETVAL = DECLINED;
-#else
- RETVAL = translate_name(r);
-#endif
-
- OUTPUT:
- RETVAL
-
-#functions from http_core.c
-
-char *
-custom_response(r, status, string=NULL)
- Apache r
- int status
- char *string
-
- CODE:
- RETVAL = custom_response(r, status, string, ST(2) == &sv_undef);
-
- OUTPUT:
- RETVAL
-
-int
-satisfies(r)
- Apache r
-
-int
-some_auth_required(r)
- Apache r
-
-void
-requires(r)
- Apache r
-
- PREINIT:
- AV *av;
- HV *hv;
- register int x;
- int m;
- char *t;
- MP_CONST_ARRAY_HEADER *reqs_arr;
- require_line *reqs;
-
- CODE:
- m = r->method_number;
- reqs_arr = requires (r);
-
- if (!reqs_arr)
- ST(0) = &sv_undef;
- else {
- reqs = (require_line *)reqs_arr->elts;
- iniAV(av);
- for(x=0; x < reqs_arr->nelts; x++) {
- /* XXX should we do this or let PerlAuthzHandler? */
- if (! (reqs[x].method_mask & (1 << m))) continue;
- t = reqs[x].requirement;
- iniHV(hv);
- hv_store(hv, "method_mask", 11,
- newSViv((IV)reqs[x].method_mask), 0);
- hv_store(hv, "requirement", 11,
- newSVpv(reqs[x].requirement,0), 0);
- av_push(av, newRV((SV*)hv));
- }
- ST(0) = newRV_noinc((SV*)av);
- }
-
-int
-allow_options(r)
- Apache r
-
-unsigned
-get_server_port(r)
- Apache r
-
-const char *
-get_server_name(r)
- Apache r
-
-char *
-get_remote_host(r, type=REMOTE_NAME)
- Apache r
- int type
-
- CODE:
- RETVAL = (char *)get_remote_host(r->connection,
- r->per_dir_config, type);
-
- OUTPUT:
- RETVAL
-
-const char *
-get_remote_logname(r)
- Apache r
-
-char *
-mod_perl_auth_name(r, val=NULL)
- Apache r
- char *val
-
-const char *
-mod_perl_auth_type(r, val=NULL)
- Apache r
- char *val
-
-const char *
-document_root(r, ...)
- Apache r
-
- PREINIT:
- core_server_config *conf;
-
- CODE:
- conf = (core_server_config *)
- get_module_config(r->server->module_config, &core_module);
-
- RETVAL = conf->ap_document_root;
-
- if (items > 1) {
- SV *doc_root = perl_get_sv("Apache::Server::DocumentRoot", TRUE);
- sv_setsv(doc_root, ST(1));
- conf->ap_document_root = SvPVX(doc_root);
- }
-
- OUTPUT:
- RETVAL
-
-char *
-server_root_relative(rsv, name="")
- SV *rsv
- char *name
-
- PREINIT:
- pool *p;
- request_rec *r;
-
- CODE:
- if (SvROK(rsv) && (r = sv2request_rec(rsv, "Apache", cv))) {
- p = r->pool;
- }
- else {
- if(!(p = perl_get_startup_pool()))
- croak("Apache::server_root_relative: no startup pool available");
- }
-
- RETVAL = (char *)server_root_relative(p, name);
-
- OUTPUT:
- RETVAL
-
-#functions from http_protocol.c
-
-void
-note_basic_auth_failure(r)
- Apache r
-
- CODE:
- check_auth_type(r);
- note_basic_auth_failure(r);
-
-void
-get_basic_auth_pw(r)
- Apache r
-
- PREINIT:
- MP_CONST_CHAR *sent_pw = NULL;
- int ret;
-
- PPCODE:
- check_auth_type(r);
- ret = get_basic_auth_pw(r, &sent_pw);
- XPUSHs(sv_2mortal((SV*)newSViv(ret)));
- if(ret == OK)
- XPUSHs(sv_2mortal((SV*)newSVpv((char *)sent_pw, 0)));
- else
- XPUSHs(&sv_undef);
-
-char *
-user(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->connection->user,r->pool);
-
- OUTPUT:
- RETVAL
-
-void
-basic_http_header(r)
- Apache r
-
- CODE:
-#ifdef WIN32
- croak("Apache->basic_http_header() not supported under Win32!");
-#else
- basic_http_header(r);
-#endif
-
-void
-send_http_header(r, type=NULL)
- Apache r
- char *type
-
- CODE:
- if(type)
- r->content_type = pstrdup(r->pool, type);
- send_http_header(r);
- mod_perl_sent_header(r, 1);
-
-#ifndef PERL_OBJECT
-
-int
-send_fd(r, f, length=-1)
- Apache r
- FILE *f
- long length
-
- CODE:
- if (!f) {
- croak("send_fd: NULL filehandle "
- "(hint: did you check the return value of open?)");
- }
- RETVAL = send_fd_length(f, r, length);
-
- OUTPUT:
- RETVAL
-
-#endif
-
-int
-rflush(r)
- Apache r
-
-void
-read_client_block(r, buffer, bufsiz)
- Apache r
- SV *buffer
- STRLEN bufsiz
-
- PREINIT:
- long nrd = 0, old_read_length;
- int rc;
-
- PPCODE:
- if (!r->read_length) {
- if ((rc = setup_client_block(r, REQUEST_CHUNKED_ERROR)) != OK) {
- aplog_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r->server,
- "mod_perl: setup_client_block failed: %d", rc);
- XSRETURN_UNDEF;
- }
- }
-
- old_read_length = r->read_length;
- r->read_length = 0;
-
- if (should_client_block(r)) {
- (void)SvUPGRADE(buffer, SVt_PV);
- SvGROW(buffer, bufsiz+1);
- nrd = get_client_block(r, SvPVX(buffer), bufsiz);
- }
- r->read_length += old_read_length;
-
- if (nrd > 0) {
- XPUSHs(sv_2mortal(newSViv((long)nrd)));
-#ifdef PERL_STASH_POST_DATA
- table_set(r->subprocess_env, "POST_DATA", SvPVX(buffer));
-#endif
- SvCUR_set(buffer, nrd);
- *SvEND(buffer) = '\0';
- SvPOK_only(buffer);
- SvTAINTED_on(buffer);
- }
- else {
- sv_setsv(buffer, &sv_undef);
- }
-
-int
-setup_client_block(r, policy=REQUEST_CHUNKED_ERROR)
- Apache r
- int policy
-
-int
-should_client_block(r)
- Apache r
-
-void
-get_client_block(r, buffer, bufsiz)
- Apache r
- SV *buffer
- STRLEN bufsiz
-
- PREINIT:
- long nrd = 0;
-
- PPCODE:
- (void)SvUPGRADE(buffer, SVt_PV);
- SvGROW(buffer, bufsiz+1);
- nrd = get_client_block(r, SvPVX(buffer), bufsiz);
- if ( nrd > 0 ) {
- XPUSHs(sv_2mortal(newSViv((long)nrd)));
- SvCUR_set(buffer, nrd);
- *SvEND(buffer) = '\0';
- SvPOK_only(buffer);
- SvTAINTED_on(buffer);
- }
- else {
- sv_setsv(ST(1), &sv_undef);
- }
-
-int
-write(r, sv_buffer, sv_length=-1, offset=0)
- Apache r
- SV *sv_buffer
- int sv_length
- int offset
-
- ALIAS:
- Apache::WRITE = 1
-
- PREINIT:
- STRLEN len;
- char *buffer;
- int sent = 0;
-
- CODE:
- ix = ix; /* avoid -Wall warning */
- RETVAL = 0;
-
- if (r->connection->aborted) {
- XSRETURN_UNDEF;
- }
-
- buffer = SvPV(sv_buffer, len);
- if (sv_length != -1) {
- len = sv_length;
- }
-
- if (offset) {
- buffer += offset;
- }
-
- while (len > 0) {
- sent = rwrite(buffer,
- len < HUGE_STRING_LEN ? len : HUGE_STRING_LEN,
- r);
- if (sent < 0) {
- rwrite_neg_trace(r);
- break;
- }
- buffer += sent;
- len -= sent;
- RETVAL += sent;
- }
-
- OUTPUT:
- RETVAL
-
-int
-print(r, ...)
- Apache r
-
- ALIAS:
- Apache::PRINT = 1
-
- CODE:
- ix = ix; /* avoid -Wall warning */
-
- if(!mod_perl_sent_header(r, 0)) {
- SV *sv = sv_newmortal();
- SV *rp = ST(0);
- SV *sendh = perl_get_sv("Apache::__SendHeader", TRUE);
-
- if(items > 2)
- do_join(sv, &sv_no, MARK+1, SP); /* $sv = join '', @_[1..$#_] */
- else
- sv_setsv(sv, ST(1));
-
- PUSHMARK(sp);
- XPUSHs(rp);
- XPUSHs(sv);
- PUTBACK;
- sv_setiv(sendh, 1);
- perl_call_pv("Apache::send_cgi_header", G_SCALAR);
- sv_setiv(sendh, 0);
- }
- else {
- /* should exist already */
- CV *cv = GvCV(gv_fetchpv("Apache::write_client", GV_ADDWARN, SVt_PVCV));
- soft_timeout("mod_perl: Apache->print", r);
- PUSHMARK(mark);
-#ifdef PERL_OBJECT
- (void)(*CvXSUB(cv))(cv, pPerl); /* &Apache::write_client; */
-#else
- (void)(*CvXSUB(cv))(aTHXo_ cv); /* &Apache::write_client; */
-#endif
-
- if(IoFLAGS(GvIOp(defoutgv)) & IOf_FLUSH) /* if $| != 0; */
-#if MODULE_MAGIC_NUMBER >= 19970103
- rflush(r);
-#else
- bflush(r->connection->client);
-#endif
- kill_timeout(r);
- }
-
- RETVAL = !r->connection->aborted;
-
- OUTPUT:
- RETVAL
-
-int
-write_client(r, ...)
- Apache r
-
- PREINIT:
- int i;
- char * buffer;
- STRLEN len;
-
- CODE:
- RETVAL = 0;
-
- if (r->connection->aborted)
- XSRETURN_IV(0);
-
- for(i = 1; i <= items - 1; i++) {
- int sent = 0;
- SV *sv = SvROK(ST(i)) && (SvTYPE(SvRV(ST(i))) == SVt_PV) ?
- (SV*)SvRV(ST(i)) : ST(i);
- buffer = SvPV(sv, len);
-#ifdef APACHE_SSL
- while(len > 0) {
- sent = rwrite(buffer,
- len < HUGE_STRING_LEN ? len : HUGE_STRING_LEN,
- r);
- if(sent < 0) {
- rwrite_neg_trace(r);
- /* break out of outer loop too */
- i = items;
- break;
- }
- buffer += sent;
- len -= sent;
- RETVAL += sent;
- }
-#else
- if((sent = rwrite(buffer, len, r)) < 0) {
- rwrite_neg_trace(r);
- break;
- }
- RETVAL += sent;
-#endif
- }
-
- OUTPUT:
- RETVAL
-
-#functions from http_request.c
-void
-internal_redirect_handler(r, location)
- Apache r
- char * location
-
- ALIAS:
- Apache::internal_redirect = 1
-
- CODE:
- switch((ix = XSANY.any_i32)) {
- case 0:
- internal_redirect_handler(location, r);
- break;
- case 1:
- internal_redirect(location, r);
- break;
- }
-
-#functions from http_log.c
-
-void
-mod_perl_log_reason(r, reason, filename=NULL)
- Apache r
- char * reason
- char * filename
-
- CODE:
- if(filename == NULL)
- filename = r->uri;
- mod_perl_log_reason(reason, filename, r);
-
-void
-log_error(...)
-
- ALIAS:
- Apache::warn = 1
- Apache::Server::log_error = 2
- Apache::Server::warn = 3
-
- PREINIT:
- server_rec *s = NULL;
- request_rec *r = NULL;
- int i=0;
- char *errstr = NULL;
- SV *sv = Nullsv;
-
- CODE:
- if((items > 1) && (r = sv2request_rec(ST(0), "Apache", cv))) {
- s = r->server;
- i=1;
- }
- else if((items > 1) && sv_derived_from(ST(0), "Apache::Server")) {
- IV tmp = SvIV((SV*)SvRV(ST(0)));
- s = (Apache__Server )tmp;
- i=1;
-
- /* if below is true, delay log_error */
- if(PERL_RUNNING() < PERL_DONE_STARTUP) {
- MP_TRACE_g(fprintf(stderr, "error_log not open yet\n"));
- XSRETURN_UNDEF;
- }
- }
- else {
- if(r)
- s = r->server;
- else
- s = perl_get_startup_server();
- }
-
- if(!s) croak("Apache::warn: no server_rec!");
-
- if(items > 1+i) {
- sv = newSV(0);
- do_join(sv, &sv_no, MARK+i, SP); /* $sv = join '', @_[1..$#_] */
- errstr = SvPV(sv,na);
- }
- else
- errstr = SvPV(ST(i),na);
-
- switch((ix = XSANY.any_i32)) {
- case 0:
- case 2:
- mod_perl_error(s, errstr);
- break;
-
- case 1:
- case 3:
- mod_perl_warn(s, errstr);
- break;
-
- default:
- mod_perl_error(s, errstr);
- break;
- }
-
- if(sv) SvREFCNT_dec(sv);
-
-#methods for creating a CGI environment
-
-SV *
-subprocess_env(r, key=NULL, ...)
- Apache r
- char *key
-
- ALIAS:
- Apache::cgi_env = 1
- Apache::cgi_var = 2
-
- PREINIT:
- I32 gimme = GIMME_V;
-
- CODE:
- if(((ix = XSANY.any_i32) == 1) && (gimme == G_ARRAY)) {
- /* backwards compat */
- int i;
- array_header *arr = perl_cgi_env_init(r);
- table_entry *elts = (table_entry *)arr->elts;
- SP -= items;
- for (i = 0; i < arr->nelts; ++i) {
- if (!elts[i].key) continue;
- PUSHelt(elts[i].key, elts[i].val, 0);
- }
- PUTBACK;
- return;
- }
- if((items == 1) && (gimme == G_VOID)) {
- (void)perl_cgi_env_init(r);
- XSRETURN_UNDEF;
- }
- TABLE_GET_SET(r->subprocess_env, FALSE);
-
- OUTPUT:
- RETVAL
-
-
-#see httpd.h
-#struct request_rec {
-
-void
-request(self, r=NULL)
- SV *self
- Apache r
-
- PPCODE:
- self = self;
- if(items > 1) perl_request_rec(r);
- XPUSHs(perl_bless_request_rec(perl_request_rec(NULL)));
-
-# pool *pool;
-# conn_rec *connection;
-# server_rec *server;
-
-Apache::Connection
-connection(r)
- Apache r
-
- CODE:
- RETVAL = r->connection;
-
- OUTPUT:
- RETVAL
-
-Apache::Server
-server(rsv)
- SV *rsv
-
- PREINIT:
- server_rec *s;
- request_rec *r;
-
- CODE:
- if (SvROK(rsv) && (r = sv2request_rec(rsv, "Apache", cv))) {
- s = r->server;
- }
- else {
- if(!(s = perl_get_startup_server()))
- croak("Apache->server: no startup server_rec available");
- }
-
- RETVAL = s;
-
- OUTPUT:
- RETVAL
-
-# request_rec *next; /* If we wind up getting redirected,
-# * pointer to the request we redirected to.
-# */
-# request_rec *prev; /* If this is an internal redirect,
-# * pointer to where we redirected *from*.
-# */
-
-# request_rec *main; /* If this is a sub_request (see request.h)
-# * pointer back to the main request.
-# */
-
-# ...
-# /* Info about the request itself... we begin with stuff that only
-# * protocol.c should ever touch...
-# */
-
-# char *the_request; /* First line of request, so we can log it */
-# int assbackwards; /* HTTP/0.9, "simple" request */
-# int proxyreq; /* A proxy request */
-# int header_only; /* HEAD request, as opposed to GET */
-
-# char *protocol; /* Protocol, as given to us, or HTTP/0.9 */
-# char *hostname; /* Host, as set by full URI or Host: */
-# int hostlen; /* Length of http://host:port in full URI */
-
-# char *status_line; /* Status line, if set by script */
-# int status; /* In any case */
-
-void
-main(r)
- Apache r
-
- CODE:
- if(r->main != NULL)
- ST(0) = perl_bless_request_rec((request_rec *)r->main);
- else
- ST(0) = &sv_undef;
-
-void
-prev(r)
- Apache r
-
- CODE:
- if(r->prev != NULL)
- ST(0) = perl_bless_request_rec((request_rec *)r->prev);
- else
- ST(0) = &sv_undef;
-
-void
-next(r)
- Apache r
-
- CODE:
- if(r->next != NULL)
- ST(0) = perl_bless_request_rec((request_rec *)r->next);
- else
- ST(0) = &sv_undef;
-
-Apache
-last(r)
- Apache r
-
- CODE:
- for(RETVAL=r; RETVAL->next; RETVAL=RETVAL->next)
- continue;
-
- OUTPUT:
- RETVAL
-
-int
-is_initial_req(r)
- Apache r
-
-int
-is_main(r)
- Apache r
-
- CODE:
- if(r->main != NULL) RETVAL = 0;
- else RETVAL = 1;
-
- OUTPUT:
- RETVAL
-
-char *
-the_request(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->the_request,r->pool);
-
- OUTPUT:
- RETVAL
-
-int
-proxyreq(r, ...)
- Apache r
-
- CODE:
- get_set_IV(r->proxyreq);
-
- OUTPUT:
- RETVAL
-
-int
-header_only(r)
- Apache r
-
- CODE:
- RETVAL = r->header_only;
-
- OUTPUT:
- RETVAL
-
-char *
-protocol(r)
- Apache r
-
- CODE:
- RETVAL = r->protocol;
-
- OUTPUT:
- RETVAL
-
-char *
-hostname(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->hostname,r->pool);
-
- OUTPUT:
- RETVAL
-
-int
-status(r, ...)
- Apache r
-
- CODE:
- get_set_IV(r->status);
-
- OUTPUT:
- RETVAL
-
-int
-allowed(r, ...)
- Apache r
-
- CODE:
- get_set_IV(r->allowed);
-
- OUTPUT:
- RETVAL
-
-time_t
-request_time(r)
- Apache r
-
- CODE:
- RETVAL = r->request_time;
-
- OUTPUT:
- RETVAL
-
-char *
-status_line(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->status_line,r->pool);
-
- OUTPUT:
- RETVAL
-
-# /* Request method, two ways; also, protocol, etc.. Outside of protocol.c,
-# * look, but don't touch.
-# */
-
-# char *method; /* GET, HEAD, POST, etc. */
-# int method_number; /* M_GET, M_POST, etc. */
-
-# int sent_bodyct; /* byte count in stream is for body */
-# long bytes_sent; /* body byte count, for easy access */
-
-char *
-method(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->method,r->pool);
-
- OUTPUT:
- RETVAL
-
-int
-method_number(r, ...)
- Apache r
-
- CODE:
- get_set_IV(r->method_number);
-
- OUTPUT:
- RETVAL
-
-long
-bytes_sent(r, ...)
- Apache r
-
- PREINIT:
- request_rec *last;
-
- CODE:
-
- for(last=r; last->next; last=last->next)
- continue;
-
- if (last->sent_bodyct && !last->bytes_sent) {
- ap_bgetopt(last->connection->client, BO_BYTECT, &last->bytes_sent);
- }
-
- RETVAL = last->bytes_sent;
-
- if(items > 1) {
- long nbytes = last->bytes_sent = (long)SvIV(ST(1));
- ap_bsetopt(last->connection->client, BO_BYTECT, &nbytes);
- }
-
- OUTPUT:
- RETVAL
-
-# /* MIME header environments, in and out. Also, an array containing
-# * environment variables to be passed to subprocesses, so people can
-# * write modules to add to that environment.
-# *
-# * The difference between headers_out and err_headers_out is that the
-# * latter are printed even on error, and persist across internal redirects
-# * (so the headers printed for ErrorDocument handlers will have them).
-# *
-# * The 'notes' table is for notes from one module to another, with no
-# * other set purpose in mind...
-# */
-
-# table *headers_in;
-# table *headers_out;
-# table *err_headers_out;
-# table *subprocess_env;
-# table *notes;
-
-# char *content_type; /* Break these out --- we dispatch on 'em */
-# char *handler; /* What we *really* dispatch on */
-
-# char *content_encoding;
-# char *content_language;
-
-# int no_cache;
-
-SV *
-header_in(r, key, ...)
- Apache r
- char *key
-
- CODE:
- TABLE_GET_SET(r->headers_in, TRUE);
-
- OUTPUT:
- RETVAL
-
-void
-headers_in(r)
- Apache r
-
- PREINIT:
-
- int i;
- array_header *hdrs_arr;
- table_entry *hdrs;
-
- PPCODE:
- if(GIMME == G_SCALAR) {
- ST(0) = mod_perl_tie_table(r->headers_in);
- XSRETURN(1);
- }
- hdrs_arr = table_elts (r->headers_in);
- hdrs = (table_entry *)hdrs_arr->elts;
-
- for (i = 0; i < hdrs_arr->nelts; ++i) {
- if (!hdrs[i].key) continue;
- PUSHelt(hdrs[i].key, hdrs[i].val, 0);
- }
-
-SV *
-header_out(r, key, ...)
- Apache r
- char *key
-
- CODE:
- TABLE_GET_SET(r->headers_out, TRUE);
-
- OUTPUT:
- RETVAL
-
-SV *
-cgi_header_out(r, key, ...)
- Apache r
- char *key
-
- PREINIT:
- char *val;
-
- CODE:
- if((val = (char *)table_get(r->headers_out, key)))
- RETVAL = newSVpv(val, 0);
- else
- RETVAL = newSV(0);
-
- SvTAINTED_on(RETVAL);
-
- if(items > 2) {
- int status = 302;
- val = SvPV(ST(2),na);
- if(!strncasecmp(key, "Content-type", 12)) {
- r->content_type = pstrdup (r->pool, val);
- }
- else if(!strncasecmp(key, "Status", 6)) {
- sscanf(val, "%d", &r->status);
- r->status_line = pstrdup(r->pool, val);
- }
- else if(!strncasecmp(key, "Location", 8)) {
- if (val && val[0] == '/' && r->status == 200) {
- /* not sure if this is quite right yet */
- /* set $Apache::DoInternalRedirect++ to test */
- if(DO_INTERNAL_REDIRECT) {
- r->method = pstrdup(r->pool, "GET");
- r->method_number = M_GET;
-
- table_unset(r->headers_in, "Content-Length");
-
- status = 200;
- perl_soak_script_output(r);
- internal_redirect_handler(val, r);
- }
- }
- table_set (r->headers_out, key, val);
- r->status = status;
- }
- else if(!strncasecmp(key, "Content-Length", 14)) {
- table_set (r->headers_out, key, val);
- }
- else if(!strncasecmp(key, "Transfer-Encoding", 17)) {
- table_set (r->headers_out, key, val);
- }
-
-#The HTTP specification says that it is legal to merge duplicate
-#headers into one. Some browsers that support Cookies don't like
-#merged headers and prefer that each Set-Cookie header is sent
-#separately. Lets humour those browsers.
-
- else if(!strncasecmp(key, "Set-Cookie", 10)) {
- table_add(r->err_headers_out, key, val);
- }
- else {
- table_merge (r->err_headers_out, key, val);
- }
- }
-
-void
-headers_out(r)
- Apache r
-
- PREINIT:
- int i;
- array_header *hdrs_arr;
- table_entry *hdrs;
-
- PPCODE:
- if(GIMME == G_SCALAR) {
- ST(0) = mod_perl_tie_table(r->headers_out);
- XSRETURN(1);
- }
- hdrs_arr = table_elts (r->headers_out);
- hdrs = (table_entry *)hdrs_arr->elts;
- for (i = 0; i < hdrs_arr->nelts; ++i) {
- if (!hdrs[i].key) continue;
- PUSHelt(hdrs[i].key, hdrs[i].val, 0);
- }
-
-SV *
-err_header_out(r, key, ...)
- Apache r
- char *key
-
- CODE:
- TABLE_GET_SET(r->err_headers_out, TRUE);
-
- OUTPUT:
- RETVAL
-
-void
-err_headers_out(r, ...)
- Apache r
-
- PREINIT:
- int i;
- array_header *hdrs_arr;
- table_entry *hdrs;
-
- PPCODE:
- if(GIMME == G_SCALAR) {
- ST(0) = mod_perl_tie_table(r->err_headers_out);
- XSRETURN(1);
- }
- hdrs_arr = table_elts (r->err_headers_out);
- hdrs = (table_entry *)hdrs_arr->elts;
-
- for (i = 0; i < hdrs_arr->nelts; ++i) {
- if (!hdrs[i].key) continue;
- PUSHelt(hdrs[i].key, hdrs[i].val, 0);
- }
-
-SV *
-notes(r, key=NULL, ...)
- Apache r
- char *key
-
- CODE:
- TABLE_GET_SET(r->notes, FALSE);
-
- OUTPUT:
- RETVAL
-
-void
-pnotes(r, k=Nullsv, val=Nullsv)
- Apache r
- SV *k
- SV *val
-
- PREINIT:
- perl_request_config *cfg = NULL;
- char *key = NULL;
- STRLEN len;
-
- CODE:
- if(k) {
- key = SvPV(k,len);
- }
- cfg = (perl_request_config *)
- get_module_config(r->request_config, &perl_module);
- if (!cfg) {
- XSRETURN_UNDEF;
- }
-
- if(!cfg->pnotes) cfg->pnotes = newHV();
- if(key) {
- if(hv_exists(cfg->pnotes, key, len)) {
- ST(0) = SvREFCNT_inc(*hv_fetch(cfg->pnotes, key, len, FALSE));
- sv_2mortal(ST(0));
- }
- else {
- ST(0) = &sv_undef;
- }
- if(val) {
- hv_store(cfg->pnotes, key, len, SvREFCNT_inc(val), FALSE);
- }
- }
- else {
- ST(0) = newRV_inc((SV*)cfg->pnotes);
- sv_2mortal(ST(0));
- }
-
-char *
-content_type(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->content_type,r->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-handler(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->handler,r->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-content_encoding(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->content_encoding,r->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-content_language(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->content_language,r->pool);
-
- OUTPUT:
- RETVAL
-
-void
-content_languages(r, avrv=Nullsv)
- Apache r
- SV *avrv
-
- PREINIT:
- I32 gimme = GIMME_V;
-
- CODE:
- if(avrv && SvROK(avrv))
- r->content_languages = avrv2array_header(avrv, r->pool);
-
- if(gimme != G_VOID)
- ST(0) = array_header2avrv(r->content_languages);
-
-int
-no_cache(r, ...)
- Apache r
-
- CODE:
- get_set_IV(r->no_cache);
- if (r->no_cache) {
- ap_table_setn(r->headers_out, "Pragma", "no-cache");
- ap_table_setn(r->headers_out, "Cache-control", "no-cache");
- }
- else if (items > 1) { /* $r->no_cache(0) */
- ap_table_unset(r->headers_out, "Pragma");
- ap_table_unset(r->headers_out, "Cache-control");
- }
-
- OUTPUT:
- RETVAL
-
-# /* What object is being requested (either directly, or via include
-# * or content-negotiation mapping).
-# */
-
-# char *uri; /* complete URI for a proxy req, or
-# URL path for a non-proxy req */
-# char *filename;
-# char *path_info;
-# char *args; /* QUERY_ARGS, if any */
-# struct stat finfo; /* ST_MODE set to zero if no such file */
-
-SV *
-finfo(r, sv_statbuf=Nullsv)
- Apache r
- SV *sv_statbuf
-
- CODE:
- if (sv_statbuf) {
- if (SvROK(sv_statbuf) && SvOBJECT(SvRV(sv_statbuf))) {
- STRLEN sz;
- char *buf = SvPV((SV*)SvRV(sv_statbuf), sz);
- if (sz != sizeof(r->finfo)) {
- croak("statbuf size mismatch, got %d, wanted %d",
- sz, sizeof(r->finfo));
- }
- memcpy(&r->finfo, buf, sz);
- }
- else {
- croak("statbuf is not an object");
- }
- }
-/* workaround for USE_LARGE_FILES on WIN32 ActivePerl 8xx */
-#if defined(WIN32) && defined(USE_LARGE_FILES)
- statcache.st_dev = r->finfo.st_dev;
- statcache.st_ino = r->finfo.st_ino;
- statcache.st_mode = r->finfo.st_mode;
- statcache.st_nlink = r->finfo.st_nlink;
- statcache.st_uid = r->finfo.st_uid;
- statcache.st_gid = r->finfo.st_gid;
- statcache.st_rdev = r->finfo.st_rdev;
- statcache.st_size = (__int64) r->finfo.st_size;
- statcache.st_atime = r->finfo.st_atime;
- statcache.st_mtime = r->finfo.st_mtime;
- statcache.st_ctime = r->finfo.st_ctime;
-#else
- statcache = r->finfo;
-#endif
- if (r->finfo.st_mode) {
- laststatval = 0;
- sv_setpv(statname, r->filename);
- }
- else {
- laststatval = -1;
- sv_setpv(statname, "");
- }
- if(GIMME_V == G_VOID) XSRETURN_UNDEF;
- RETVAL = newRV_noinc((SV*)gv_fetchpv("_", TRUE, SVt_PVIO));
-
- OUTPUT:
- RETVAL
-
-char *
-uri(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->uri,r->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-filename(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->filename,r->pool);
-#ifndef WIN32
- if(items > 1)
- if ((laststatval = stat(r->filename, &r->finfo)) < 0) {
- r->finfo.st_mode = 0;
- }
-#endif
-
- OUTPUT:
- RETVAL
-
-char *
-path_info(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->path_info,r->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-query_string(r, ...)
- Apache r
-
- CODE:
- get_set_PVp(r->args,r->pool);
-
- OUTPUT:
- RETVAL
-
- CLEANUP:
- if (ST(0) != &sv_undef) SvTAINTED_on(ST(0));
-
-# /* Various other config info which may change with .htaccess files
-# * These are config vectors, with one void* pointer for each module
-# * (the thing pointed to being the module's business).
-# */
-
-# void *per_dir_config; /* Options set in config files, etc. */
-
-char *
-location(r)
- Apache r
-
- CODE:
- if(r->per_dir_config) {
- dPPDIR;
- RETVAL = cld->location;
- }
- else XSRETURN_UNDEF;
-
- OUTPUT:
- RETVAL
-
-SV *
-dir_config(r, key=NULL, ...)
- Apache r
- char *key
-
- ALIAS:
- Apache::Server::dir_config = 1
-
- PREINIT:
- perl_dir_config *c;
- perl_server_config *cs;
- server_rec *s;
-
- CODE:
- ix = ix; /*-Wall*/
- RETVAL = Nullsv;
- if(r && r->per_dir_config) {
- c = (perl_dir_config *)get_module_config(r->per_dir_config,
- &perl_module);
- TABLE_GET_SET(c->vars, FALSE);
- }
- if (!SvTRUE(RETVAL)) {
- s = r && r->server ? r->server : perl_get_startup_server();
- if (s && s->module_config) {
- SvREFCNT_dec(RETVAL); /* in case above did newSV(0) */
- cs = (perl_server_config *)get_module_config(s->module_config,
- &perl_module);
- TABLE_GET_SET(cs->vars, FALSE);
- }
- else XSRETURN_UNDEF;
- }
-
- OUTPUT:
- RETVAL
-
-# void *request_config; /* Notes on *this* request */
-
-#/*
-# * a linked list of the configuration directives in the .htaccess files
-# * accessed by this request.
-# * N.B. always add to the head of the list, _never_ to the end.
-# * that way, a sub request's list can (temporarily) point to a parent's list
-# */
-# const struct htaccess_result *htaccess;
-#};
-
-Apache::SubRequest
-lookup_uri(r, uri)
- Apache r
- char *uri
-
- CODE:
- RETVAL = sub_req_lookup_uri(uri,r);
-
- OUTPUT:
- RETVAL
-
-Apache::SubRequest
-lookup_file(r, file)
- Apache r
- char *file
-
- CODE:
- RETVAL = sub_req_lookup_file(file,r);
-
- OUTPUT:
- RETVAL
-
-MODULE = Apache PACKAGE = Apache::SubRequest
-
-BOOT:
- av_push(perl_get_av("Apache::SubRequest::ISA",TRUE), newSVpv("Apache",6));
-
-void
-DESTROY(r)
- Apache::SubRequest r
-
- CODE:
- destroy_sub_req(r);
- MP_TRACE_g(fprintf(stderr,
- "Apache::SubRequest::DESTROY(0x%lx)\n", (unsigned long)r));
-
-int
-run(r, allow_send_header=0)
- Apache::SubRequest r
- int allow_send_header
-
- CODE:
- if (allow_send_header) {
- r->assbackwards = 0;
- }
-
- RETVAL = run_sub_req(r);
-
- OUTPUT:
- RETVAL
-
diff --git a/tags/v1_29/src/modules/perl/Connection.xs b/tags/v1_29/src/modules/perl/Connection.xs
deleted file mode 100644
index 72624e0..0000000
--- a/tags/v1_29/src/modules/perl/Connection.xs
+++ /dev/null
@@ -1,178 +0,0 @@
-#define CORE_PRIVATE
-#include "mod_perl.h"
-
-MODULE = Apache::Connection PACKAGE = Apache::Connection
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-#/* Things which are per connection
-# */
-
-#struct conn_rec {
-
-# pool *pool;
-# server_rec *server;
-
-# /* Information about the connection itself */
-
-# BUFF *client; /* Connetion to the guy */
-# int aborted; /* Are we still talking? */
-
-# /* Who is the client? */
-
-# struct sockaddr_in local_addr; /* local address */
-# struct sockaddr_in remote_addr;/* remote address */
-# char *remote_ip; /* Client's IP address */
-# char *remote_host; /* Client's DNS name, if known.
-# * NULL if DNS hasn't been checked,
-# * "" if it has and no address was found.
-# * N.B. Only access this though
-# * get_remote_host() */
-
-int
-fileno(conn, ...)
- Apache::Connection conn
-
- PREINIT:
- int sts = 1; /* default is output fd */
-
- CODE:
- if(items > 1) {
- sts = (int)SvIV(ST(1));
- }
- RETVAL = ap_bfileno(conn->client, sts ? B_WR : B_RD);
-
- OUTPUT:
- RETVAL
-
-int
-aborted(conn)
- Apache::Connection conn
-
- CODE:
- RETVAL = conn->aborted;
-
- OUTPUT:
- RETVAL
-
-SV *
-local_addr(conn)
- Apache::Connection conn
-
- CODE:
- RETVAL = newSVpv((char *)&conn->local_addr,
- sizeof conn->local_addr);
-
- OUTPUT:
- RETVAL
-
-SV *
-remote_addr(conn, sv_addr=Nullsv)
- Apache::Connection conn
- SV *sv_addr
-
- CODE:
- RETVAL = newSVpv((char *)&conn->remote_addr,
- sizeof conn->remote_addr);
- if(sv_addr) {
- struct sockaddr_in addr;
- STRLEN sockaddrlen;
- char * new_addr = SvPV(sv_addr,sockaddrlen);
- if (sockaddrlen != sizeof(addr)) {
- croak("Bad arg length for remote_addr, length is %d, should be %d", sockaddrlen, sizeof(addr));
- }
- Copy(new_addr, &addr, sizeof addr, char);
- conn->remote_addr = addr;
- }
-
- OUTPUT:
- RETVAL
-
-char *
-remote_ip(conn, ...)
- Apache::Connection conn
-
- CODE:
- RETVAL = conn->remote_ip;
-
- if(items > 1) {
-#ifdef SGI_BOOST
- ap_cpystrn(conn->remote_ip, (char *)SvPV(ST(1),na),
- sizeof(conn->remote_ip));
- conn->remote_ip_len = strlen(conn->remote_ip);
-#else
- conn->remote_ip = pstrdup(conn->pool, (char *)SvPV(ST(1),na));
-#endif
- conn->remote_addr.sin_addr.s_addr = inet_addr(conn->remote_ip);
- }
-
- OUTPUT:
- RETVAL
-
-char *
-remote_host(conn, ...)
- Apache::Connection conn
-
- CODE:
- RETVAL = conn->remote_host;
-
- if(items > 1)
- conn->remote_host = pstrdup(conn->pool, (char *)SvPV(ST(1),na));
-
- OUTPUT:
- RETVAL
-
-# char *remote_logname; /* Only ever set if doing_rfc931
-# * N.B. Only access this through
-# * get_remote_logname() */
-# char *user; /* If an authentication check was made,
-# * this gets set to the user name. We assume
-# * that there's only one user per connection(!)
-# */
-# char *auth_type; /* Ditto. */
-
-char *
-remote_logname(conn)
- Apache::Connection conn
-
- CODE:
- RETVAL = conn->remote_logname;
-
- OUTPUT:
- RETVAL
-
-char *
-user(conn, ...)
- Apache::Connection conn
-
- CODE:
- RETVAL = conn->user;
-
- if(items > 1)
- conn->user = pstrdup(conn->pool, (char *)SvPV(ST(1),na));
-
- OUTPUT:
- RETVAL
-
-char *
-auth_type(conn, ...)
- Apache::Connection conn
-
- CODE:
- RETVAL = conn->auth_type;
-
- if(items > 1)
- conn->auth_type = pstrdup(conn->pool, (char *)SvPV(ST(1),na));
-
- OUTPUT:
- RETVAL
-
-# int keepalive; /* Are we using HTTP Keep-Alive? */
-# int keptalive; /* Did we use HTTP Keep-Alive? */
-# int keepalives; /* How many times have we used it? */
-#};
-
-
diff --git a/tags/v1_29/src/modules/perl/Constants.xs b/tags/v1_29/src/modules/perl/Constants.xs
deleted file mode 100644
index 96b052f..0000000
--- a/tags/v1_29/src/modules/perl/Constants.xs
+++ /dev/null
@@ -1,1001 +0,0 @@
-#define CORE_PRIVATE
-#include "mod_perl.h"
-
-#ifndef SERVER_BUILT
-#define SERVER_BUILT "unknown"
-#endif
-
-#ifndef MOD_PERL_STRING_VERSION
-#define MOD_PERL_STRING_VERSION "mod_perl/x.xx"
-#endif
-
-#ifdef XS_IMPORT
-#include "Exports.c"
-
-static void export_cv(SV *pclass, SV *caller, char *sub)
-{
- GV *gv;
-#if 0
- fprintf(stderr, "*%s::%s = \\&%s::%s\n",
- SvPVX(caller), sub, SvPVX(pclass), sub);
-#endif
- gv = gv_fetchpv(form("%_::%s", caller, sub), TRUE, SVt_PVCV);
- GvCV(gv) = perl_get_cv(form("%_::%s", pclass, sub), TRUE);
- GvIMPORTED_CV_on(gv);
-}
-
-static void my_import(SV *pclass, SV *caller, SV *sv)
-{
- char *sym = SvPV(sv,na), **tags;
- int i;
-
- switch (*sym) {
- case ':':
- ++sym;
- tags = export_tags(sym);
- for(i=0; tags[i]; i++) {
- export_cv(pclass, caller, tags[i]);
- }
- break;
- case '$':
- case '%':
- case '*':
- case '@':
- croak("\"%s\" is not exported by the Apache::Constants module", sym);
- case '&':
- ++sym;
- default:
- if(isALPHA(sym[0])) {
- export_cv(pclass, caller, sym);
- break;
- }
- else {
- croak("Can't export symbol: %s", sym);
- }
- }
-}
-#endif /*XS_IMPORT*/
-
-/* prevent prototype mismatch warnings */
-
-static void check_proto(HV *stash, char *name)
-{
- GV **gvp = (GV**)hv_fetch(stash, name, strlen(name), FALSE);
- CV *cv;
-
- if (!(gvp && *gvp && (cv = GvCVu(*gvp)))) {
- return;
- }
- if (CvROOT(cv)) {
- return;
- }
- if (!SvPOK(cv)) {
- sv_setsv((SV*)cv, &sv_no);
- }
-}
-
-#ifdef newCONSTSUB
-
-#define my_newCONSTSUB(stash, name, sv) \
- check_proto(stash, name); \
- newCONSTSUB(stash, name, sv)
-
-#else
-
-static void my_newCONSTSUB(HV *stash, char *name, SV *sv)
-{
-#ifdef dTHR
- dTHR;
-#endif
- I32 oldhints = hints;
- HV *old_cop_stash = curcop->cop_stash;
- HV *old_curstash = curstash;
- line_t oldline = curcop->cop_line;
-
- hints &= ~HINT_BLOCK_SCOPE;
-
- if(stash) {
- save_hptr(&curstash);
- save_hptr(&curcop->cop_stash);
- curstash = curcop->cop_stash = stash;
- }
-
- check_proto(stash, name);
-
- (void)newSUB(start_subparse(FALSE, 0),
- newSVOP(OP_CONST, 0, newSVpv(name,0)),
- newSVOP(OP_CONST, 0, &sv_no),
- newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)));
-
- hints = oldhints;
- curcop->cop_stash = old_cop_stash;
- curstash = old_curstash;
- curcop->cop_line = oldline;
-}
-
-#endif
-
-static enum cmd_how autoload_args_how(char *name) {
- if (strEQ(name, "FLAG"))
- return FLAG;
-
- if (strEQ(name, "ITERATE"))
- return ITERATE;
-
- if (strEQ(name, "ITERATE2"))
- return ITERATE2;
-
- if (strEQ(name, "NO_ARGS"))
- return NO_ARGS;
-
- if (strEQ(name, "RAW_ARGS"))
- return RAW_ARGS;
-
- if (strEQ(name, "TAKE1"))
- return TAKE1;
-
- if (strEQ(name, "TAKE12"))
- return TAKE12;
-
- if (strEQ(name, "TAKE123"))
- return TAKE123;
-
- if (strEQ(name, "TAKE2"))
- return TAKE2;
-
- if (strEQ(name, "TAKE23"))
- return TAKE23;
-
- if (strEQ(name, "TAKE3"))
- return TAKE3;
-
- return (enum cmd_how) -1;
-}
-
-static double
-constant(char *name)
-{
- errno = 0;
- switch (*name) {
- case 'A':
- if (strEQ(name, "AUTH_REQUIRED"))
-#ifdef AUTH_REQUIRED
- return AUTH_REQUIRED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "ACCESS_CONF"))
-#ifdef ACCESS_CONF
- return ACCESS_CONF;
-#else
- goto not_there;
-#endif
- break;
- case 'B':
- if (strEQ(name, "BAD_GATEWAY"))
-#ifdef BAD_GATEWAY
- return BAD_GATEWAY;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "BAD_REQUEST"))
-#ifdef BAD_REQUEST
- return BAD_REQUEST;
-#else
- goto not_there;
-#endif
- break;
- case 'C':
-if (strEQ(name, "CONTINUE"))
- return DECLINED;
- break;
- case 'D':
- if (strEQ(name, "DECLINED"))
-#ifdef DECLINED
- return DECLINED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "DOCUMENT_FOLLOWS"))
-#ifdef DOCUMENT_FOLLOWS
- return DOCUMENT_FOLLOWS;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "DONE"))
-#ifdef DONE
- return DONE;
-#else
- return -2;
-#endif
- if (strEQ(name, "DYNAMIC_MODULE_LIMIT"))
-#ifdef DYNAMIC_MODULE_LIMIT
- return DYNAMIC_MODULE_LIMIT;
-#else
- goto not_there;
-#endif
- break;
- case 'E':
- break;
- case 'F':
- if (strEQ(name, "FORBIDDEN"))
-#ifdef FORBIDDEN
- return FORBIDDEN;
-#else
- goto not_there;
-#endif
- break;
- case 'G':
- break;
- case 'H':
- if (strEQ(name, "HTTP_ACCEPTED"))
-#ifdef HTTP_ACCEPTED
- return HTTP_ACCEPTED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_BAD_GATEWAY"))
-#ifdef HTTP_BAD_GATEWAY
- return HTTP_BAD_GATEWAY;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_BAD_REQUEST"))
-#ifdef HTTP_BAD_REQUEST
- return HTTP_BAD_REQUEST;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_CONFLICT"))
-#ifdef HTTP_CONFLICT
- return HTTP_CONFLICT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_CONTINUE"))
-#ifdef HTTP_CONTINUE
- return HTTP_CONTINUE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_CREATED"))
-#ifdef HTTP_CREATED
- return HTTP_CREATED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_FORBIDDEN"))
-#ifdef HTTP_FORBIDDEN
- return HTTP_FORBIDDEN;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_GATEWAY_TIME_OUT"))
-#ifdef HTTP_GATEWAY_TIME_OUT
- return HTTP_GATEWAY_TIME_OUT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_GONE"))
-#ifdef HTTP_GONE
- return HTTP_GONE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_INTERNAL_SERVER_ERROR"))
-#ifdef HTTP_INTERNAL_SERVER_ERROR
- return HTTP_INTERNAL_SERVER_ERROR;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_LENGTH_REQUIRED"))
-#ifdef HTTP_LENGTH_REQUIRED
- return HTTP_LENGTH_REQUIRED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_METHOD_NOT_ALLOWED"))
-#ifdef HTTP_METHOD_NOT_ALLOWED
- return HTTP_METHOD_NOT_ALLOWED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_MOVED_PERMANENTLY"))
-#ifdef HTTP_MOVED_PERMANENTLY
- return HTTP_MOVED_PERMANENTLY;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_MOVED_TEMPORARILY"))
-#ifdef HTTP_MOVED_TEMPORARILY
- return HTTP_MOVED_TEMPORARILY;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_MULTIPLE_CHOICES"))
-#ifdef HTTP_MULTIPLE_CHOICES
- return HTTP_MULTIPLE_CHOICES;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_NON_AUTHORITATIVE"))
-#ifdef HTTP_NON_AUTHORITATIVE
- return HTTP_NON_AUTHORITATIVE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_NOT_ACCEPTABLE"))
-#ifdef HTTP_NOT_ACCEPTABLE
- return HTTP_NOT_ACCEPTABLE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_NOT_FOUND"))
-#ifdef HTTP_NOT_FOUND
- return HTTP_NOT_FOUND;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_NOT_IMPLEMENTED"))
-#ifdef HTTP_NOT_IMPLEMENTED
- return HTTP_NOT_IMPLEMENTED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_NOT_MODIFIED"))
-#ifdef HTTP_NOT_MODIFIED
- return HTTP_NOT_MODIFIED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_NO_CONTENT"))
-#ifdef HTTP_NO_CONTENT
- return HTTP_NO_CONTENT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_OK"))
-#ifdef HTTP_OK
- return HTTP_OK;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_PARTIAL_CONTENT"))
-#ifdef HTTP_PARTIAL_CONTENT
- return HTTP_PARTIAL_CONTENT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_PAYMENT_REQUIRED"))
-#ifdef HTTP_PAYMENT_REQUIRED
- return HTTP_PAYMENT_REQUIRED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_PRECONDITION_FAILED"))
-#ifdef HTTP_PRECONDITION_FAILED
- return HTTP_PRECONDITION_FAILED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_PROXY_AUTHENTICATION_REQUIRED"))
-#ifdef HTTP_PROXY_AUTHENTICATION_REQUIRED
- return HTTP_PROXY_AUTHENTICATION_REQUIRED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_REQUEST_ENTITY_TOO_LARGE"))
-#ifdef HTTP_REQUEST_ENTITY_TOO_LARGE
- return HTTP_REQUEST_ENTITY_TOO_LARGE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_REQUEST_TIME_OUT"))
-#ifdef HTTP_REQUEST_TIME_OUT
- return HTTP_REQUEST_TIME_OUT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_REQUEST_URI_TOO_LARGE"))
-#ifdef HTTP_REQUEST_URI_TOO_LARGE
- return HTTP_REQUEST_URI_TOO_LARGE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_RESET_CONTENT"))
-#ifdef HTTP_RESET_CONTENT
- return HTTP_RESET_CONTENT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_SEE_OTHER"))
-#ifdef HTTP_SEE_OTHER
- return HTTP_SEE_OTHER;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_SERVICE_UNAVAILABLE"))
-#ifdef HTTP_SERVICE_UNAVAILABLE
- return HTTP_SERVICE_UNAVAILABLE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_SWITCHING_PROTOCOLS"))
-#ifdef HTTP_SWITCHING_PROTOCOLS
- return HTTP_SWITCHING_PROTOCOLS;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_UNAUTHORIZED"))
-#ifdef HTTP_UNAUTHORIZED
- return HTTP_UNAUTHORIZED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_UNSUPPORTED_MEDIA_TYPE"))
-#ifdef HTTP_UNSUPPORTED_MEDIA_TYPE
- return HTTP_UNSUPPORTED_MEDIA_TYPE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_USE_PROXY"))
-#ifdef HTTP_USE_PROXY
- return HTTP_USE_PROXY;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_VARIANT_ALSO_VARIES"))
-#ifdef HTTP_VARIANT_ALSO_VARIES
- return HTTP_VARIANT_ALSO_VARIES;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HTTP_VERSION_NOT_SUPPORTED"))
-#ifdef HTTP_VERSION_NOT_SUPPORTED
- return HTTP_VERSION_NOT_SUPPORTED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "HUGE_STRING_LEN"))
-#ifdef HUGE_STRING_LEN
- return HUGE_STRING_LEN;
-#else
- goto not_there;
-#endif
- break;
- case 'I':
- break;
- case 'J':
- break;
- case 'K':
- break;
- case 'L':
- break;
- case 'M':
- if (strEQ(name, "MAX_HEADERS"))
-#ifdef MAX_HEADERS
- return MAX_HEADERS;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "MAX_STRING_LEN"))
-#ifdef MAX_STRING_LEN
- return MAX_STRING_LEN;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "METHODS"))
-#ifdef METHODS
- return METHODS;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "MOVED"))
-#ifdef MOVED
- return MOVED;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_CONNECT"))
-#ifdef M_CONNECT
- return M_CONNECT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "MODULE_MAGIC_NUMBER"))
-#ifdef MODULE_MAGIC_NUMBER
- return MODULE_MAGIC_NUMBER;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_DELETE"))
-#ifdef M_DELETE
- return M_DELETE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_GET"))
-#ifdef M_GET
- return M_GET;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_INVALID"))
-#ifdef M_INVALID
- return M_INVALID;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_OPTIONS"))
-#ifdef M_OPTIONS
- return M_OPTIONS;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_POST"))
-#ifdef M_POST
- return M_POST;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_PUT"))
-#ifdef M_PUT
- return M_PUT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_TRACE"))
-#ifdef M_TRACE
- return M_TRACE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_PATCH"))
-#ifdef M_PATCH
- return M_PATCH;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_PROPFIND"))
-#ifdef M_PROPFIND
- return M_PROPFIND;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_PROPPATCH"))
-#ifdef M_PROPPATCH
- return M_PROPPATCH;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_MKCOL"))
-#ifdef M_MKCOL
- return M_MKCOL;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_COPY"))
-#ifdef M_COPY
- return M_COPY;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_MOVE"))
-#ifdef M_MOVE
- return M_MOVE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_LOCK"))
-#ifdef M_LOCK
- return M_LOCK;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "M_UNLOCK"))
-#ifdef M_UNLOCK
- return M_UNLOCK;
-#else
- goto not_there;
-#endif
- break;
- case 'N':
- if (strEQ(name, "NOT_AUTHORITATIVE"))
-#ifdef NOT_AUTHORITATIVE
- return NOT_AUTHORITATIVE;
-#else
- return DECLINED;
-#endif
- if (strEQ(name, "NOT_FOUND"))
-#ifdef NOT_FOUND
- return NOT_FOUND;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "NOT_IMPLEMENTED"))
-#ifdef NOT_IMPLEMENTED
- return NOT_IMPLEMENTED;
-#else
- goto not_there;
-#endif
- break;
- case 'O':
- if (strEQ(name, "OK"))
-#ifdef OK
- return OK;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_ALL"))
-#ifdef OPT_ALL
- return OPT_ALL;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_EXECCGI"))
-#ifdef OPT_EXECCGI
- return OPT_EXECCGI;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_INCLUDES"))
-#ifdef OPT_INCLUDES
- return OPT_INCLUDES;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_INCNOEXEC"))
-#ifdef OPT_INCNOEXEC
- return OPT_INCNOEXEC;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_INDEXES"))
-#ifdef OPT_INDEXES
- return OPT_INDEXES;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_MULTI"))
-#ifdef OPT_MULTI
- return OPT_MULTI;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_NONE"))
-#ifdef OPT_NONE
- return OPT_NONE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_SYM_LINKS"))
-#ifdef OPT_SYM_LINKS
- return OPT_SYM_LINKS;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_SYM_OWNER"))
-#ifdef OPT_SYM_OWNER
- return OPT_SYM_OWNER;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OPT_UNSET"))
-#ifdef OPT_UNSET
- return OPT_UNSET;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OR_NONE"))
-#ifdef OR_NONE
- return OR_NONE;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OR_LIMIT"))
-#ifdef OR_LIMIT
- return OR_LIMIT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OR_OPTIONS"))
-#ifdef OR_OPTIONS
- return OR_OPTIONS;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OR_FILEINFO"))
-#ifdef OR_FILEINFO
- return OR_FILEINFO;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OR_AUTHCFG"))
-#ifdef OR_AUTHCFG
- return OR_AUTHCFG;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OR_INDEXES"))
-#ifdef OR_INDEXES
- return OR_INDEXES;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OR_UNSET"))
-#ifdef OR_UNSET
- return OR_UNSET;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "OR_ALL"))
-#ifdef OR_ALL
- return OR_ALL;
-#else
- goto not_there;
-#endif
- break;
- case 'P':
- break;
- case 'Q':
- break;
- case 'R':
- if (strEQ(name, "REDIRECT"))
-#ifdef REDIRECT
- return REDIRECT;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "RSRC_CONF"))
-#ifdef RSRC_CONF
- return RSRC_CONF;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "REMOTE_HOST"))
-#ifdef REMOTE_HOST
- return REMOTE_HOST;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "REMOTE_NAME"))
-#ifdef REMOTE_NAME
- return REMOTE_NAME;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "REMOTE_NOLOOKUP"))
-#ifdef REMOTE_NOLOOKUP
- return REMOTE_NOLOOKUP;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "REMOTE_DOUBLE_REV"))
-#ifdef REMOTE_DOUBLE_REV
- return REMOTE_DOUBLE_REV;
-#else
- goto not_there;
-#endif
-
- if (strEQ(name, "REQUEST_NO_BODY"))
-#ifdef REQUEST_NO_BODY
- return REQUEST_NO_BODY;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "REQUEST_CHUNKED_ERROR"))
-#ifdef REQUEST_CHUNKED_ERROR
- return REQUEST_CHUNKED_ERROR;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "REQUEST_CHUNKED_DECHUNK"))
-#ifdef REQUEST_CHUNKED_DECHUNK
- return REQUEST_CHUNKED_DECHUNK;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "REQUEST_CHUNKED_PASS"))
-#ifdef REQUEST_CHUNKED_PASS
- return REQUEST_CHUNKED_PASS;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "RESPONSE_CODES"))
-#ifdef RESPONSE_CODES
- return RESPONSE_CODES;
-#else
- goto not_there;
-#endif
- break;
- case 'S':
- if (strEQ(name, "SATISFY_ALL"))
-#ifdef SATISFY_ALL
- return SATISFY_ALL;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "SATISFY_ANY"))
-#ifdef SATISFY_ANY
- return SATISFY_ANY;
-#else
- goto not_there;
-#endif
- if(strEQ(name, "SATISFY_NOSPEC"))
-#ifdef SATISFY_NOSPEC
- return SATISFY_NOSPEC;
-#else
- goto not_there;
-#endif
-
- if (strEQ(name, "SERVER_ERROR"))
-#ifdef SERVER_ERROR
- return SERVER_ERROR;
-#else
- goto not_there;
-#endif
- if (strEQ(name, "SERVICE_UNAVAILABLE"))
-#ifdef SERVICE_UNAVAILABLE
- return SERVICE_UNAVAILABLE;
-#else
- goto not_there;
-#endif
- case 'T':
- break;
- case 'U':
- if (strEQ(name, "USE_LOCAL_COPY"))
-#ifdef USE_LOCAL_COPY
- return USE_LOCAL_COPY;
-#else
- goto not_there;
-#endif
- break;
- case 'V':
- break;
- case 'W':
- break;
- case 'X':
- break;
- case 'Y':
- break;
- case 'Z':
- break;
- default:
- errno = EINVAL;
- return 0;
- }
-
-not_there:
- {
- enum cmd_how args_how = autoload_args_how(name);
- if(((int)args_how) > -1)
- return (double)args_how;
- }
-
- errno = ENOENT;
- return 0;
-}
-
-#define __PACKAGE__ "Apache::Constants"
-#define __PACKAGE_LEN__ 17
-#define __AUTOLOAD__ "Apache::Constants::AUTOLOAD"
-
-/* this is kinda ugly, but wtf */
-static void boot_ConstSubs(char *tag)
-{
- dTHR;
- HV *stash = gv_stashpvn(__PACKAGE__, __PACKAGE_LEN__, FALSE);
- I32 i;
-#ifdef XS_IMPORT
- char **export = export_tags(tag);
-
- for (i=0; export[i]; i++) {
-#define EXP_NAME export[i]
-
-#else
- HV *exp_tags = perl_get_hv("Apache::Constants::EXPORT_TAGS", TRUE);
- SV **avrv = hv_fetch(exp_tags, tag, strlen(tag), FALSE);
- AV *export;
- if(avrv)
- export = (AV*)SvRV(*avrv);
- else
- return;
-#define EXP_NAME SvPV(*av_fetch(export, i, 0),na)
-
- for(i=0; i<=AvFILL(export); i++) {
-#endif
- char *name = EXP_NAME;
- double val = constant(name);
- my_newCONSTSUB(stash, name, newSViv( (I32) val));
- }
-}
-
-MODULE = Apache::Constants PACKAGE = Apache::Constants
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items;
-#ifndef XS_IMPORT
- perl_require_module("Apache::Constants::Exports", NULL);
-#endif
- boot_ConstSubs("common");
-
-#ifdef XS_IMPORT
-
-void
-import(pclass, ...)
- SV *pclass
-
- PREINIT:
- I32 i = 0;
- SV *caller = perl_eval_pv("scalar caller", TRUE);
-
- CODE:
- for(i=1; i<items; i++) {
- my_import(pclass, caller, ST(i));
- }
-
-#endif
-
-void
-__AUTOLOAD()
-
- PREINIT:
- HV *stash = gv_stashpvn(__PACKAGE__, __PACKAGE_LEN__, FALSE);
- SV *sv = GvSV(gv_fetchpv(__AUTOLOAD__, TRUE, SVt_PV));
- char *name = SvPV(sv,na);
- int len = __PACKAGE_LEN__+2;
- double val;
-
- CODE:
- while(len--) ++name;
-
- val = constant(name);
- if(errno != 0)
- croak("Your vendor has not defined Apache::Constants macro `%s'", name);
- else
- my_newCONSTSUB(stash, name, newSViv( (I32) val));
-
-const char *
-SERVER_VERSION()
- CODE:
-#if MODULE_MAGIC_NUMBER >= 19980413
- RETVAL = ap_get_server_version();
-#else
- RETVAL = SERVER_VERSION;
-#endif
- OUTPUT:
- RETVAL
-
-char *
-SERVER_BUILT()
- CODE:
-#if MODULE_MAGIC_NUMBER >= 19980413
- RETVAL = (char *)ap_get_server_built();
-#else
- RETVAL = SERVER_BUILT;
-#endif
-
- OUTPUT:
- RETVAL
-
-char *
-DECLINE_CMD()
- CODE:
-#ifdef DECLINE_CMD
- RETVAL = DECLINE_CMD;
-#else
- RETVAL = "\a\b";
-#endif
- OUTPUT:
- RETVAL
-
-char *
-DIR_MAGIC_TYPE()
-
- CODE:
- RETVAL = DIR_MAGIC_TYPE;
-
- OUTPUT:
- RETVAL
diff --git a/tags/v1_29/src/modules/perl/Exports.c b/tags/v1_29/src/modules/perl/Exports.c
deleted file mode 100644
index ed2ecf9..0000000
--- a/tags/v1_29/src/modules/perl/Exports.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Generated by Apache::Constants::Exports::gen_ctags, do not edit!!!
- */
-static char *ETAG_override[] = {
- "OR_NONE",
- "OR_LIMIT",
- "OR_OPTIONS",
- "OR_FILEINFO",
- "OR_AUTHCFG",
- "OR_INDEXES",
- "OR_UNSET",
- "OR_ALL",
- "ACCESS_CONF",
- "RSRC_CONF",
- NULL,
-};
-static char *ETAG_http[] = {
- "HTTP_OK",
- "HTTP_MOVED_TEMPORARILY",
- "HTTP_MOVED_PERMANENTLY",
- "HTTP_METHOD_NOT_ALLOWED",
- "HTTP_NOT_MODIFIED",
- "HTTP_UNAUTHORIZED",
- "HTTP_FORBIDDEN",
- "HTTP_NOT_FOUND",
- "HTTP_BAD_REQUEST",
- "HTTP_INTERNAL_SERVER_ERROR",
- "HTTP_NOT_ACCEPTABLE",
- "HTTP_NO_CONTENT",
- "HTTP_PRECONDITION_FAILED",
- "HTTP_SERVICE_UNAVAILABLE",
- "HTTP_VARIANT_ALSO_VARIES",
- NULL,
-};
-static char *ETAG_satisfy[] = {
- "SATISFY_ALL",
- "SATISFY_ANY",
- "SATISFY_NOSPEC",
- NULL,
-};
-static char *ETAG_methods[] = {
- "M_CONNECT",
- "M_DELETE",
- "M_GET",
- "M_INVALID",
- "M_OPTIONS",
- "M_POST",
- "M_PUT",
- "M_TRACE",
- "M_PATCH",
- "M_PROPFIND",
- "M_PROPPATCH",
- "M_MKCOL",
- "M_COPY",
- "M_MOVE",
- "M_LOCK",
- "M_UNLOCK",
- "METHODS",
- NULL,
-};
-static char *ETAG_types[] = {
- "DIR_MAGIC_TYPE",
- NULL,
-};
-static char *ETAG_config[] = {
- "DECLINE_CMD",
- NULL,
-};
-static char *ETAG_server[] = {
- "MODULE_MAGIC_NUMBER",
- "SERVER_VERSION",
- "SERVER_BUILT",
- NULL,
-};
-static char *ETAG_common[] = {
- "OK",
- "DECLINED",
- "DONE",
- "NOT_FOUND",
- "FORBIDDEN",
- "AUTH_REQUIRED",
- "SERVER_ERROR",
- NULL,
-};
-static char *ETAG_args_how[] = {
- "RAW_ARGS",
- "TAKE1",
- "TAKE2",
- "ITERATE",
- "ITERATE2",
- "FLAG",
- "NO_ARGS",
- "TAKE12",
- "TAKE3",
- "TAKE23",
- "TAKE123",
- NULL,
-};
-static char *ETAG_remotehost[] = {
- "REMOTE_HOST",
- "REMOTE_NAME",
- "REMOTE_NOLOOKUP",
- "REMOTE_DOUBLE_REV",
- NULL,
-};
-static char *ETAG_response_codes[] = {
- "OK",
- "DECLINED",
- "DONE",
- "NOT_FOUND",
- "FORBIDDEN",
- "AUTH_REQUIRED",
- "SERVER_ERROR",
- "DOCUMENT_FOLLOWS",
- "MOVED",
- "REDIRECT",
- "USE_LOCAL_COPY",
- "BAD_REQUEST",
- "BAD_GATEWAY",
- "RESPONSE_CODES",
- "NOT_IMPLEMENTED",
- "NOT_AUTHORITATIVE",
- "CONTINUE",
- NULL,
-};
-static char *ETAG_options[] = {
- "OPT_NONE",
- "OPT_INDEXES",
- "OPT_INCLUDES",
- "OPT_SYM_LINKS",
- "OPT_EXECCGI",
- "OPT_UNSET",
- "OPT_INCNOEXEC",
- "OPT_SYM_OWNER",
- "OPT_MULTI",
- "OPT_ALL",
- NULL,
-};
-static char *ETAG_response[] = {
- "OK",
- "DECLINED",
- "DONE",
- "NOT_FOUND",
- "FORBIDDEN",
- "AUTH_REQUIRED",
- "SERVER_ERROR",
- "DOCUMENT_FOLLOWS",
- "MOVED",
- "REDIRECT",
- "USE_LOCAL_COPY",
- "BAD_REQUEST",
- "BAD_GATEWAY",
- "RESPONSE_CODES",
- "NOT_IMPLEMENTED",
- "NOT_AUTHORITATIVE",
- "CONTINUE",
- NULL,
-};
-static char **export_tags(char *tag) {
- switch (*tag) {
- case 'a':
- if(strEQ("args_how", tag))
- return ETAG_args_how;
- case 'c':
- if(strEQ("config", tag))
- return ETAG_config;
- if(strEQ("common", tag))
- return ETAG_common;
- case 'h':
- if(strEQ("http", tag))
- return ETAG_http;
- case 'm':
- if(strEQ("methods", tag))
- return ETAG_methods;
- case 'o':
- if(strEQ("override", tag))
- return ETAG_override;
- if(strEQ("options", tag))
- return ETAG_options;
- case 'r':
- if(strEQ("remotehost", tag))
- return ETAG_remotehost;
- if(strEQ("response_codes", tag))
- return ETAG_response_codes;
- if(strEQ("response", tag))
- return ETAG_response;
- case 's':
- if(strEQ("satisfy", tag))
- return ETAG_satisfy;
- if(strEQ("server", tag))
- return ETAG_server;
- case 't':
- if(strEQ("types", tag))
- return ETAG_types;
- default:
- croak("unknown tag `%s'", tag);
- }
-}
diff --git a/tags/v1_29/src/modules/perl/File.xs b/tags/v1_29/src/modules/perl/File.xs
deleted file mode 100644
index cfab296..0000000
--- a/tags/v1_29/src/modules/perl/File.xs
+++ /dev/null
@@ -1,230 +0,0 @@
-
-#include "mod_perl.h"
-
-#define ap_fopen(r, name, mode) \
- ap_pfopen(r->pool, name, mode)
-#define ap_fclose(r, fd) \
- ap_pfclose(r->pool, fd)
-
-#define ap_mtime(r) r->mtime
-
-#ifndef SvCLASS
-#define SvCLASS(o) HvNAME(SvSTASH(SvRV(o)))
-#endif
-
-static bool ApacheFile_open(SV *obj, SV *sv)
-{
- PerlIO *IOp = Nullfp;
- GV *gv = (GV*)SvRV(obj);
- STRLEN len;
- char *filename = SvPV(sv,len);
-
- return do_open(gv, filename, len, FALSE, 0, 0, IOp);
-}
-
-static SV *ApacheFile_new(char *pclass)
-{
- SV *RETVAL = sv_newmortal();
- GV *gv = newGVgen(pclass);
- HV *stash = GvSTASH(gv);
-
- sv_setsv(RETVAL, sv_bless(sv_2mortal(newRV((SV*)gv)), stash));
- (void)hv_delete(stash, GvNAME(gv), GvNAMELEN(gv), G_DISCARD);
- return RETVAL;
-}
-
-#if 0
-
-static char *ApacheFile_basename(SV *self, const char *filename)
-{
- char *RETVAL = strrchr(filename, '/');
- ++RETVAL;
- return RETVAL;
-}
-
-static SV *ApacheFile_dirname(SV *self, const char *filename)
-{
- SV *RETVAL = newSVpv(ap_make_dirstr_parent(perl_get_util_pool(), filename), 0);
- *(SvEND(RETVAL) - 1) = '\0';
- --SvCUR(RETVAL);
- return RETVAL;
-}
-
-typedef struct {
- SV *base;
- SV *ext;
-} AFparsed;
-
-AFparsed *ApacheFile_parse(SV *fname, SV *pattern)
-{
- AFparsed *afp = (AFparsed *)safemalloc(sizeof(AFparsed));
- regexp *re;
- PMOP pm;
- STRLEN len;
- STRLEN slen;
- char *s = SvPV(pattern,len), *ptr = SvPV(fname,slen);
- Zero(&pm,1,PMOP);
- re = Perl_pregcomp(s, s+len, &pm);
- Perl_pregexec(re, ptr, ptr+slen, ptr, 0, Nullsv, 1);
- if (re->endp[1]) {
- afp->ext = sv_newmortal();
- afp->base = sv_newmortal();
- sv_setpvn(afp->ext, re->startp[1], re->endp[1] - re->startp[1]);
- sv_setpvn(afp->base, ptr, slen - SvCUR(afp->ext));
- }
- else {
- afp->ext = &sv_undef;
- afp->base = sv_2mortal(newSVsv(fname));
- }
- Perl_pregfree(re);
- return afp;
-}
-#endif
-
-MODULE = Apache::File PACKAGE = Apache::File PREFIX = ApacheFile_
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-void
-ApacheFile_new(pclass, filename=Nullsv)
- char *pclass
- SV *filename
-
- PREINIT:
- SV *RETVAL;
-
- PPCODE:
- RETVAL = ApacheFile_new(pclass);
- if(filename) {
- if(!ApacheFile_open(RETVAL, filename))
- XSRETURN_UNDEF;
- }
- XPUSHs(RETVAL);
-
-bool
-ApacheFile_open(self, filename)
- SV *self
- SV *filename
-
-#if 0
-
-void
-ApacheFile_tmp(self)
- SV *self
-
- PREINIT:
- PerlIO *fp = PerlIO_tmpfile();
- char *pclass = SvROK(self) ? SvCLASS(self) : SvPV(self,na);
- SV *RETVAL = ApacheFile_new(pclass);
-
- PPCODE:
- if(!do_open((GV*)SvRV(RETVAL), "+>&", 3, FALSE, 0, 0, fp))
- XSRETURN_UNDEF;
- else
- XPUSHs(RETVAL);
-
-#endif
-
-bool
-ApacheFile_close(self)
- SV *self
-
- CODE:
- RETVAL = do_close((GV*)SvRV(self), TRUE);
-
- OUTPUT:
- RETVAL
-
-#if 0
-
-SV *
-ApacheFile_dirname(self, filename)
- SV *self
- const char *filename
-
-char *
-ApacheFile_basename(self, filename)
- SV *self
- const char *filename
-
-void
-parse(self, filename, pattern)
- SV *self
- SV *filename
- SV *pattern
-
- PREINIT:
- SV *name, *path, *base, *par = newSVpv("",0);
- AFparsed *afp;
-
- PPCODE:
- path = ApacheFile_dirname(self, SvPVX(filename));
- sv_2mortal(path);
- base = newSVpv(ApacheFile_basename(self, SvPVX(filename)),0);
- sv_setpvf(par, "%c%_%c", '(', pattern, ')');
- afp = ApacheFile_parse(base, par);
- EXTEND(sp, 3); PUSHs(afp->base); PUSHs(path); PUSHs(afp->ext);
- safefree(afp); SvREFCNT_dec(base); SvREFCNT_dec(par);
-
-#endif
-
-MODULE = Apache::File PACKAGE = Apache PREFIX = ap_
-
-PROTOTYPES: DISABLE
-
-int
-ap_set_content_length(r, clength=r->finfo.st_size)
- Apache r
- long clength
-
-void
-ap_set_last_modified(r, mtime=0)
- Apache r
- time_t mtime
-
- CODE:
- if(mtime) ap_update_mtime(r, mtime);
- ap_set_last_modified(r);
-
-void
-ap_set_etag(r)
- Apache r
-
-int
-ap_meets_conditions(r)
- Apache r
-
-time_t
-ap_update_mtime(r, dependency_mtime=r->finfo.st_mtime)
- Apache r
- time_t dependency_mtime
-
-time_t
-ap_mtime(r)
- Apache r
-
-int
-ap_discard_request_body(r)
- Apache r
-
-int
-ap_set_byterange(r)
- Apache r
-
-void
-ap_each_byterange(r)
- Apache r
-
- PREINIT:
- long offset, length;
-
- PPCODE:
- if (!ap_each_byterange(r, &offset, &length)) {
- XSRETURN_EMPTY;
- }
- EXTEND(sp, 2);
- PUSHs(sv_2mortal(newSViv(offset)));
- PUSHs(sv_2mortal(newSViv(length)));
diff --git a/tags/v1_29/src/modules/perl/Log.xs b/tags/v1_29/src/modules/perl/Log.xs
deleted file mode 100644
index 9574c86..0000000
--- a/tags/v1_29/src/modules/perl/Log.xs
+++ /dev/null
@@ -1,221 +0,0 @@
-#include "mod_perl.h"
-#include "mod_perl_xs.h"
-
-#if MODULE_MAGIC_NUMBER >= MMN_132
-#define HAVE_LOG_RERROR 1
-#else
-#define HAVE_LOG_RERROR 0
-#endif
-
-static void perl_cv_alias(char *to, char *from)
-{
- GV *gp = gv_fetchpv(to, TRUE, SVt_PVCV);
- GvCV(gp) = perl_get_cv(from, TRUE);
-}
-
-static void ApacheLog(int level, SV *sv, SV *msg)
-{
- dTHR;
- char *file = NULL;
- int line = 0;
- char *str;
- SV *svstr = Nullsv;
- int lmask = level & APLOG_LEVELMASK;
- server_rec *s;
- request_rec *r = NULL;
-
- if(sv_isa(sv, "Apache::Log::Request") && SvROK(sv)) {
- r = (request_rec *) SvIV((SV*)SvRV(sv));
- s = r->server;
- }
- else if(sv_isa(sv, "Apache::Log::Server") && SvROK(sv)) {
- s = (server_rec *) SvIV((SV*)SvRV(sv));
- }
- else {
- croak("Argument is not an Apache or Apache::Server object");
- }
-
- if((lmask == APLOG_DEBUG) && (s->loglevel >= APLOG_DEBUG)) {
- SV *caller;
- bool old_T = tainting; tainting = FALSE;
- caller = perl_eval_pv("[ (caller)[1,2] ]", TRUE);
- tainting = old_T;
- file = SvPV(*av_fetch((AV *)SvRV(caller), 0, FALSE),na);
- line = (int)SvIV(*av_fetch((AV *)SvRV(caller), 1, FALSE));
- }
-
- if((s->loglevel >= lmask) &&
- SvROK(msg) && (SvTYPE(SvRV(msg)) == SVt_PVCV)) {
- dSP;
- ENTER;SAVETMPS;
- PUSHMARK(sp);
- (void)perl_call_sv(msg, G_SCALAR);
- SPAGAIN;
- svstr = POPs;
- ++SvREFCNT(svstr);
- PUTBACK;
- FREETMPS;LEAVE;
- str = SvPV(svstr,na);
- }
- else
- str = SvPV(msg,na);
-
- if(r && HAVE_LOG_RERROR) {
-#if HAVE_LOG_RERROR > 0
- ap_log_rerror(file, line, APLOG_NOERRNO|level, r, "%s", str);
-#endif
- }
- else {
- ap_log_error(file, line, APLOG_NOERRNO|level, s, "%s", str);
- }
-
- SvREFCNT_dec(msg);
- if(svstr) SvREFCNT_dec(svstr);
-}
-
-#define join_stack_msg \
-SV *msgstr; \
-if(items > 2) { \
- msgstr = newSV(0); \
- do_join(msgstr, &sv_no, MARK+1, SP); \
-} \
-else { \
- msgstr = ST(1); \
- ++SvREFCNT(msgstr); \
-}
-
-#define MP_AP_LOG(l,s) \
-{ \
-join_stack_msg; \
-ApacheLog(l, s, msgstr); \
-}
-
-#define Apache_log_emerg(s) \
-MP_AP_LOG(APLOG_EMERG, s)
-
-#define Apache_log_alert(s) \
-MP_AP_LOG(APLOG_ALERT, s)
-
-#define Apache_log_crit(s) \
-MP_AP_LOG(APLOG_CRIT, s)
-
-#define Apache_log_error(s) \
-MP_AP_LOG(APLOG_ERR, s)
-
-#define Apache_log_warn(s) \
-MP_AP_LOG(APLOG_WARNING, s)
-
-#define Apache_log_notice(s) \
-MP_AP_LOG(APLOG_NOTICE, s)
-
-#define Apache_log_info(s) \
-MP_AP_LOG(APLOG_INFO, s)
-
-#define Apache_log_debug(s) \
-MP_AP_LOG(APLOG_DEBUG, s)
-
-MODULE = Apache::Log PACKAGE = Apache
-
-PROTOTYPES: DISABLE
-
-BOOT:
- perl_cv_alias("Apache::log", "Apache::Log::log");
- perl_cv_alias("Apache::Server::log", "Apache::Log::log");
- perl_cv_alias("emergency", "emerg");
- perl_cv_alias("critical", "crit");
-
- av_push(perl_get_av("Apache::Log::Request::ISA",TRUE),
- newSVpv("Apache::Log",11));
- av_push(perl_get_av("Apache::Log::Server::ISA",TRUE),
- newSVpv("Apache::Log",11));
-
- items = items; /*avoid warning*/
-
-MODULE = Apache::Log PACKAGE = Apache::Log PREFIX=Apache_log_
-
-void
-Apache_log_log(sv)
- SV *sv
-
- PREINIT:
- void *retval;
- char *pclass = "Apache::Log::Request";
-
- CODE:
- if(!SvROK(sv))
- croak("Argument is not a reference");
-
- if(sv_derived_from(sv, "Apache")) {
- retval = (void*)sv2request_rec(sv, "Apache", cv);
- }
- else if(sv_derived_from(sv, "Apache::Server")) {
- pclass = "Apache::Log::Server";
- retval = (void *) SvIV((SV*)SvRV(sv));
- }
- else {
- croak("Argument is not an Apache or Apache::Server object");
- }
-
- ST(0) = sv_newmortal();
- sv_setref_pv(ST(0), pclass, (void*)retval);
-
-void
-Apache_log_emerg(s, ...)
- SV *s
-
-void
-Apache_log_alert(s, ...)
- SV *s
-
-void
-Apache_log_crit(s, ...)
- SV *s
-
-void
-Apache_log_error(s, ...)
- SV *s
-
-void
-Apache_log_warn(s, ...)
- SV *s
-
-void
-Apache_log_notice(s, ...)
- SV *s
-
-void
-Apache_log_info(s, ...)
- SV *s
-
-void
-Apache_log_debug(s, ...)
- SV *s
-
-MODULE = Apache::Log PACKAGE = Apache::Server
-
-PROTOTYPES: DISABLE
-
-BOOT:
-#ifdef newCONSTSUB
- {
- HV *stash = gv_stashpv("Apache::Log", TRUE);
- newCONSTSUB(stash, "EMERG", newSViv(APLOG_EMERG));
- newCONSTSUB(stash, "ALERT", newSViv(APLOG_ALERT));
- newCONSTSUB(stash, "CRIT", newSViv(APLOG_CRIT));
- newCONSTSUB(stash, "ERR", newSViv(APLOG_ERR));
- newCONSTSUB(stash, "WARNING", newSViv(APLOG_WARNING));
- newCONSTSUB(stash, "NOTICE", newSViv(APLOG_NOTICE));
- newCONSTSUB(stash, "INFO", newSViv(APLOG_INFO));
- newCONSTSUB(stash, "DEBUG", newSViv(APLOG_DEBUG));
- }
-#endif
-
-int
-loglevel(server, ...)
- Apache::Server server
-
- CODE:
- get_set_IV(server->loglevel);
-
- OUTPUT:
- RETVAL
diff --git a/tags/v1_29/src/modules/perl/Makefile b/tags/v1_29/src/modules/perl/Makefile
deleted file mode 100644
index 611394e..0000000
--- a/tags/v1_29/src/modules/perl/Makefile
+++ /dev/null
@@ -1,164 +0,0 @@
-# ====================================================================
-# Copyright (c) 1995-1997 The Apache Group. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#
-# 3. All advertising materials mentioning features or use of this
-# software must display the following acknowledgment:
-# "This product includes software developed by the Apache Group
-# for use in the Apache HTTP server project (http://www.apache.org/)."
-#
-# 4. The names "Apache Server" and "Apache Group" must not be used to
-# endorse or promote products derived from this software without
-# prior written permission.
-#
-# 5. Redistributions of any form whatsoever must retain the following
-# acknowledgment:
-# "This product includes software developed by the Apache Group
-# for use in the Apache HTTP server project (http://www.apache.org/)."
-#
-# THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
-# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
-# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-# OF THE POSSIBILITY OF SUCH DAMAGE.
-# ====================================================================
-#
-# This software consists of voluntary contributions made by many
-# individuals on behalf of the Apache Group and was originally based
-# on public domain software written at the National Center for
-# Supercomputing Applications, University of Illinois, Urbana-Champaign.
-# For more information on the Apache Group and the Apache HTTP server
-# project, please see <http://www.apache.org/>.
-#
-# Makefile for the Apache mod_perl library
-#
-# $Id$
-#
-
-#__ORIGINAL__
-
-
-INCLUDES=$(INCLUDES1) $(INCLUDES0) $(INCLUDES_DEPTH2) $(EXTRA_INCLUDES)
-
-SHELL = /bin/sh
-
-LIB=libperl.a
-
-#on/off switches for Perl API hooks
-#comment out to enable callbacks at a certain stage in the request
-PERL_DISPATCH = -DNO_PERL_DISPATCH
-PERL_CHILD_INIT = -DNO_PERL_CHILD_INIT
-PERL_CHILD_EXIT = -DNO_PERL_CHILD_EXIT
-PERL_RESTART = -DNO_PERL_RESTART
-PERL_POST_READ_REQUEST = -DNO_PERL_POST_READ_REQUEST
-PERL_TRANS = -DNO_PERL_TRANS
-PERL_HEADER_PARSER = -DNO_PERL_HEADER_PARSER
-PERL_ACCESS = -DNO_PERL_ACCESS
-PERL_AUTHEN = -DNO_PERL_AUTHEN
-PERL_AUTHZ = -DNO_PERL_AUTHZ
-PERL_TYPE = -DNO_PERL_TYPE
-PERL_FIXUP = -DNO_PERL_FIXUP
-PERL_LOG = -DNO_PERL_LOG
-PERL_INIT = -DNO_PERL_INIT
-PERL_CLEANUP = -DNO_PERL_CLEANUP
-
-PERL_STACKED_HANDLERS = -DNO_PERL_STACKED_HANDLERS
-PERL_SECTIONS = -DNO_PERL_SECTIONS
-PERL_METHOD_HANDLERS = -DNO_PERL_METHOD_HANDLERS
-PERL_DIRECTIVE_HANDLERS = -DNO_PERL_DIRECTIVE_HANDLERS
-PERL_SSI = -DNO_PERL_SSI
-
-PERL_HOOKS = $(PERL_DISPATCH) $(PERL_CHILD_INIT) $(PERL_CHILD_EXIT) \
- $(PERL_POST_READ_REQUEST) $(PERL_TRANS) $(PERL_HEADER_PARSER) \
- $(PERL_ACCESS) $(PERL_AUTHEN) $(PERL_AUTHZ) \
- $(PERL_TYPE) $(PERL_FIXUP) $(PERL_LOG) \
- $(PERL_INIT) $(PERL_CLEANUP) $(PERL_RESTART) \
- $(PERL_STACKED_HANDLERS) $(PERL_SECTIONS) $(PERL_METHOD_HANDLERS) \
- $(PERL_SSI) $(PERL_DIRECTIVE_HANDLERS)
-
-#STATIC_SRC = Apache.c Constants.c
-#STATIC_EXTS = Apache Apache::Constants
-
-#TRACE = -DPERL_TRACE
-#SSL_COMMON_INC = -I../../../ssl/include -I/usr/local/ssl/include
-#APACHE_SSL =
-PERL=/usr/bin/perl
-PERL_STATIC_EXTS =
-PRIVLIB=`$(PERL) -MConfig -e 'print $$Config{privlibexp}'`
-EXTUTILS_EMBED = $(PERL) -MExtUtils::Embed
-#CONFIG_PM=-MConfig
-CONFIG_PM='-MApache::ExtUtils=%Config'
-PERL_CFG_CCFLAGS = `$(PERL) $(CONFIG_PM) -e 'print $$Config{ccflags}'`
-PERL_CFG_ARCHLIB = `$(PERL) -MConfig -e 'print $$Config{archlibexp}'`
-
-PERL_CCFLAGS = -I$(PERL_CFG_ARCHLIB)/CORE $(PERL_CFG_CCFLAGS) $(PERL_HOOKS) $(TRACE)
-
-.SUFFIXES: .xs .c .o
-
-XS_INIT = `$(EXTUTILS_EMBED) -e xsinit -- -std $(PERL_STATIC_EXTS) $(STATIC_EXTS)`
-
-CC=`$(PERL) -MConfig -e 'print $$Config{cc}'`
-
-# AUX_CFLAGS comes from higher level Makefile
-CFLAGS=-I. -I$(INCDIR) -I$(INCDIR)/regex -I$(INCDIR)/../$(OSDIR) $(AUX_CFLAGS) \
- $(APACHE_SSL) $(PERL_CCFLAGS) \
- -DMOD_PERL_VERSION=\"$(MOD_PERL_VERSION)\" \
- $(INCLUDES)
-
-all: $(LIB)
-
-perlxsi.c:
- $(XS_INIT)
-
-.xs.c:
- $(PERL) $(PRIVLIB)/ExtUtils/xsubpp -nolinenumbers -typemap $(PRIVLIB)/ExtUtils/typemap $*.xs > $@
-
-PERLSRC=mod_perl_opmask.c mod_perl.c perlxsi.c perl_config.c perl_util.c perlio.c $(STATIC_SRC)
-
-OBJS=$(PERLSRC:.c=.o)
-
-.c.a:
- $(MAKE) $(CFLAGS) $<
-
-$(LIB): $(OBJS)
- rm -f $@
- ar crv $@ $(OBJS)
- $(RANLIB) $@
-
-# dependencies
-$(OBJS): mod_perl.h $(INCDIR)/httpd.h $(INCDIR)/http_config.h
-mod_perl.o: $(PERLSRC)
-
-# various forms of cleanup
-tidy:
- rm -f *.out
-
-clean: tidy
- rm -f *.o $(LIB) perlxsi.c Apache.c Constants.c
-
-
-
-
-
-
-
-
-
diff --git a/tags/v1_29/src/modules/perl/ModuleConfig.xs b/tags/v1_29/src/modules/perl/ModuleConfig.xs
deleted file mode 100644
index d5f5e52..0000000
--- a/tags/v1_29/src/modules/perl/ModuleConfig.xs
+++ /dev/null
@@ -1,235 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1996-2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
-
-#define CORE_PRIVATE
-#include "mod_perl.h"
-
-#define MP_TYPE_DIR 1
-#define MP_TYPE_SRV 2
-
-static void *vector_from_sv (SV *sv, int *type)
-{
-
- if(sv_derived_from(sv, "Apache") && SvROK(sv)) {
- request_rec *r = sv2request_rec(sv, "Apache", Nullcv);
- *type = MP_TYPE_DIR;
- return r->per_dir_config;
- }
- else if(sv_derived_from(sv, "Apache::Server") && SvROK(sv)) {
- server_rec *s = (server_rec *) SvIV((SV*)SvRV(sv));
- *type = MP_TYPE_SRV;
- return s->module_config;
- }
- else {
- croak("Argument is not an Apache or Apache::Server object");
- }
-}
-
-MODULE = Apache::ModuleConfig PACKAGE = Apache::ModuleConfig
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-SV *
-get(self=Nullsv, obj, svkey=Nullsv)
- SV *self
- SV *obj
- SV *svkey
-
- PREINIT:
- SV *caller = Nullsv;
-
- CODE:
- RETVAL = Nullsv;
- if(svkey && (gv_stashpv(SvPV(svkey,na), FALSE)))
- caller = svkey;
-
- if((svkey == Nullsv) || caller) {
- module *mod = NULL;
-
- if(!caller)
- caller = perl_eval_pv("scalar caller", TRUE);
-
- if(caller)
- mod = perl_get_module_ptr(SvPVX(caller), SvCUR(caller));
-
- if(mod) {
- int type = 0;
- void *ptr = vector_from_sv(obj, &type);
- mod_perl_perl_dir_config *data =
- get_module_config(ptr, mod);
- if(data && data->obj) {
- ++SvREFCNT(data->obj);
- RETVAL = data->obj;
- }
- else
- RETVAL = Nullsv;
- }
- }
- if(!RETVAL) XSRETURN_UNDEF;
-
- OUTPUT:
- RETVAL
-
-MODULE = Apache::ModuleConfig PACKAGE = Apache::CmdParms
-
-char *
-info(parms)
- Apache::CmdParms parms
-
- CODE:
- RETVAL = ((mod_perl_cmd_info *)parms->info)->info;
-
- OUTPUT:
- RETVAL
-
-int
-GETC(parms)
- Apache::CmdParms parms
-
- CODE:
-#if MODULE_MAGIC_NUMBER >= 19980413
- RETVAL = cfg_getc(cmd_infile);
-#else
- croak("httpd too old for getc");
-#endif
- OUTPUT:
- RETVAL
-
-SV *
-getline(parms, buff=Nullsv, len=MAX_STRING_LEN)
- Apache::CmdParms parms
- SV *buff
- int len
-
- ALIAS:
- Apache::CmdParms::READ = 1
- Apache::CmdParms::READLINE = 2
-
- PREINIT:
- char *l;
- int ret = 0;
-
- CODE:
- RETVAL = newSV(0);
- l = (char *)palloc(parms->temp_pool, len);
- ret = !cfg_getline(l, len, cmd_infile);
- if(!buff) buff = sv_newmortal();
-
- switch((ix = XSANY.any_i32)) {
- case 0:
- sv_setiv(RETVAL, ret);
- sv_setpv(buff, l);
- break;
-
- case 1:
- sv_setiv(RETVAL, SvCUR(buff));
- sv_setpv(buff, l);
- break;
-
- case 2:
- sv_setpv(RETVAL, l);
- break;
- }
-
- OUTPUT:
- buff
- RETVAL
-
-char *
-path(parms)
- Apache::CmdParms parms
-
- CODE:
- if(!(RETVAL = parms->path)) XSRETURN_UNDEF;
-
- OUTPUT:
- RETVAL
-
-Apache::Server
-server(parms)
- Apache::CmdParms parms
-
- CODE:
- RETVAL = parms->server;
-
- OUTPUT:
- RETVAL
-
-Apache::Command
-cmd(parms)
- Apache::CmdParms parms
-
- CODE:
- RETVAL = (Apache__Command)parms->cmd;
-
- OUTPUT:
- RETVAL
-
-int
-override(parms)
- Apache::CmdParms parms
-
- CODE:
- RETVAL = parms->override;
-
- OUTPUT:
- RETVAL
-
-int
-limited(parms)
- Apache::CmdParms parms
-
- CODE:
- RETVAL = parms->limited;
-
- OUTPUT:
- RETVAL
diff --git a/tags/v1_29/src/modules/perl/PerlRunXS.xs b/tags/v1_29/src/modules/perl/PerlRunXS.xs
deleted file mode 100755
index dade8a8..0000000
--- a/tags/v1_29/src/modules/perl/PerlRunXS.xs
+++ /dev/null
@@ -1,450 +0,0 @@
-/* ====================================================================
- * Copyright (c) 1995-1998 The Apache Group. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the Apache Group
- * for use in the Apache HTTP server project (http://www.apache.org/)."
- *
- * 4. The names "Apache Server" and "Apache Group" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the Apache Group
- * for use in the Apache HTTP server project (http://www.apache.org/)."
- *
- * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Group and was originally based
- * on public domain software written at the National Center for
- * Supercomputing Applications, University of Illinois, Urbana-Champaign.
- * For more information on the Apache Group and the Apache HTTP server
- * project, please see <http://www.apache.org/>.
- *
- */
-
-#include "mod_perl.h"
-
-static const char c2x_table[] = "0123456789abcdef";
-
-static unsigned char *c2x(unsigned what, unsigned char *where)
-{
- *where++ = '_';
- *where++ = c2x_table[what >> 4];
- *where++ = c2x_table[what & 0xf];
- return where;
-}
-
-/*
- * s/([^A-Za-z0-9\/])/sprintf("_%2x",unpack("C",$1))/eg;
- */
-static char *uri2perlish(char *segment, int slen) {
- register int x,y;
- char *copy = (char *)safemalloc(3 * slen + 1);
-
- for(x=0,y=0; segment[x]; x++,y++) {
- char c = segment[x];
- if((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c >'9')
- && c != '/')
- {
- c2x(c, ©[y]);
- y += 2;
- }
- else
- copy[y] = c;
- }
- copy[y] = '\0';
- return copy;
-}
-
-/*
- * s{
- * (/+) # directory
- * (\d?) # package's first character
- * }[
- * "::" . ($2 ? sprintf("_%2x",unpack("C",$2)) : "")
- * ]egx;
- */
-static SV *slash2stash(const char *segment) {
- register int x,y;
- SV *sv = newSV(3 * strlen(segment));
-
- for(x=0,y=0; segment[x]; x++,y++) {
- char c=segment[x];
- if(c == '/') {
- SvPVX(sv)[y] = ':';
- SvPVX(sv)[++y] = ':';
- if(isDIGIT(segment[x+1])) {
- char d = segment[++x];
- c2x(d, &SvPVX(sv)[++y]);
- y += 2;
- }
- }
- else
- SvPVX(sv)[y] = c;
- }
- SvPVX(sv)[y] = '\0';
- SvCUR_set(sv, y);
- SvPOK_on(sv);
- return sv;
-}
-
-#define ApachePerlRun_import_exit() \
- "use Apache 'exit';\n"
-
-#define ApachePerlRun_chdir_scwd() \
- chdir(SvPV(perl_get_sv("Apache::Server::CWD", TRUE),na))
-
-#ifndef ApachePerlRun_name_with_virtualhost
-#define ApachePerlRun_name_with_virtualhost() \
- perl_get_sv("Apache::Registry::NameWithVirtualHost", FALSE)
-#endif
-
-SV *ApachePerlRun_namespace(request_rec *r, char *root)
-{
- char *copy, *uri;
- int uri_len;
- SV *esc, *RETVAL;
-
- uri = (char *)pstrdup(r->pool, r->uri);
- uri_len = strlen(uri);
- if(r->path_info) {
- int n = strlen(r->path_info);
- int chop = (uri_len - n);
- uri[chop] = '\0';
- }
- if(r->server->is_virtual && ApachePerlRun_name_with_virtualhost()) {
- uri = pstrcat(r->pool, r->server->server_hostname, uri, NULL);
- uri_len += strlen(r->server->server_hostname);
- }
- copy = uri2perlish(uri, uri_len);
- RETVAL = newSVpv(root ? root : "Apache::ROOT",0);
- esc = slash2stash(copy);
- sv_setsv(perl_get_sv("Apache::Registry::curstash", TRUE), esc);
- sv_catsv(RETVAL, esc);
- safefree(copy);
- SvREFCNT_dec(esc);
- return RETVAL;
-}
-
-#define log_scripterror(r, rc, msg) \
- aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, \
- "%s: %s", msg, r->filename); \
- return rc
-
-int ApachePerlRun_can_compile(request_rec *r)
-{
- if (!(allow_options(r) & OPT_EXECCGI)) {
- log_scripterror(r, FORBIDDEN,
- "Options ExecCGI is off in this directory");
- }
- if (r->finfo.st_mode == 0) {
- log_scripterror(r, NOT_FOUND,
- "script not found or unable to stat");
- }
- if (S_ISDIR(r->finfo.st_mode)) {
- return DECLINED;
- }
- if (!can_exec(&r->finfo)) {
- log_scripterror(r, FORBIDDEN,
- "file permissions deny server execution");
- }
- return OK;
-}
-
-void ApachePerlRun_compile(request_rec *r, SV *code_ref)
-{
- SV *code;
-
- if(SvROK(code_ref))
- code = (SV*)SvRV(code_ref);
- else
- code = code_ref;
-
- perl_eval_sv(code, G_DISCARD|G_KEEPERR);
-}
-
-/*
- * {
- * local $/ = undef;
- * my $fh = gensym;
- * open $fh, $r->filename;
- * my $code = <$fh>;
- * close $fh;
- * return \$code;
- * }
- */
-
-#define ApachePerlRun_readscript mod_perl_slurp_filename
-
-SV *ApachePerlRun_parse_cmdline(request_rec *r, SV *code)
-{
- char *pos = (char *)strstr(SvPVX(code), "\n"), *shebang;
- int plen = pos - SvPVX(code);
- SV *sv;
-
- if(!pos) return Nullsv;
- sv = newSVpv("",0);
- shebang = (char*)safemalloc(sizeof(char)+plen);
- strncpy(shebang, SvPVX(code), plen);
-
- if(*shebang == '#') {
- if(strstr(shebang, "-w")) {
- sv_catpv(sv, "BEGIN {$^W = 1;}; $^W = 1;\n");
- }
- }
-
- safefree(shebang);
- return sv;
-}
-
-int ApachePerlRun_error_check(request_rec *r)
-{
- dTHR;
- if((perl_eval_ok(r->server) != 0) && !strnEQ(SvPVX(ERRSV), " at ", 4)) {
- hv_store(ERRHV, r->uri, strlen(r->uri), ERRSV, FALSE);
- sv_setpv(ERRSV, "");
- return SERVER_ERROR;
- }
- else
- return OK;
-}
-
-void ApachePerlRun_set_scriptname(request_rec *r)
-{
- SV *script_name = perl_get_sv("0", TRUE);
- /*save_item(script_name);*/
- sv_setpv(script_name, r->filename);
-}
-
-int handler(request_rec *r)
-{
- dTHR;
- int rc = ApachePerlRun_can_compile(r);
- SV *package, *code, *eval, *cmdline;
- if(rc != OK)
- return rc;
-
- ENTER;
- package = ApachePerlRun_namespace(r, NULL);
- SAVEFREESV(package);
- code = ApachePerlRun_readscript(r);
- SAVEFREESV(code);
- eval = newSV(0);
- SAVEFREESV(eval);
- if((cmdline = ApachePerlRun_parse_cmdline(r, (SV*)SvRV(code)))) {
- sv_catsv(eval, cmdline);
- SvREFCNT_dec(cmdline);
- }
- ApachePerlRun_set_scriptname(r);
- chdir_file(r->filename);
-
- SAVEI32(hints);
- hints = 0;
-
- sv_setpvf(eval, "package %_;\n", package);
- sv_catpv(eval, ApachePerlRun_import_exit());
- sv_catpvf(eval, "#line 1 %s\n", r->filename);
- sv_catsv(eval, (SV*)SvRV(code));
- sv_catpvn(eval, "\n", 1);
- ApachePerlRun_compile(r, eval);
-
- /*flush the namespace*/
- hv_clear(gv_stashpv(SvPVX(package), TRUE));
-
- ApachePerlRun_chdir_scwd();
- LEAVE;
- return ApachePerlRun_error_check(r);
-}
-
-static int registry_handler(request_rec *r)
-{
- dTHR;
- int rc = ApachePerlRun_can_compile(r);
- SV *code, *package;
- SV *rgy_cache_rv = perl_get_sv("Apache::Registry", TRUE);
- HV *rgy_cache, *pkg_ent = Nullhv;
- bool do_compile = FALSE;
- if(rc != OK)
- return rc;
-
- if(!SvTRUE(rgy_cache_rv))
- sv_setsv(rgy_cache_rv, newRV((SV*)newHV()));
-
- rgy_cache = (HV*)SvRV(rgy_cache_rv);
-
- ENTER;
- package = ApachePerlRun_namespace(r, NULL);
- SAVEFREESV(package);
-
- ApachePerlRun_set_scriptname(r);
- chdir_file(r->filename);
-
- SAVEI32(hints);
- hints = FALSE;
- SAVEI32(dowarn);
- dowarn = FALSE;
-
- chdir(SvPV(perl_get_sv("Apache::Server::CWD", TRUE),na));
- if(hv_exists(rgy_cache, SvPVX(package), SvCUR(package))) {
- SV **rv = hv_fetch(rgy_cache, SvPVX(package), SvCUR(package), FALSE);
- SV *mtime;
- pkg_ent = (HV*)SvRV(*rv);
- mtime = *hv_fetch(pkg_ent, "mtime", 5, FALSE);
- if(SvTRUE(mtime) && ((int)SvIV(mtime) <= r->finfo.st_mtime)) {
- /*we have compiled this subroutine already, nothing left to do*/
- }
- else
- do_compile = TRUE;
- }
- else
- do_compile = TRUE;
-
- if(do_compile) {
- int i = 0;
- SV *eval = newSVpv("",0), *cmdline;
- code = ApachePerlRun_readscript(r);
- SAVEFREESV(code);
-
- if((cmdline = ApachePerlRun_parse_cmdline(r, (SV*)SvRV(code)))) {
- sv_catsv(eval, cmdline);
- SvREFCNT_dec(cmdline);
- }
-
- sv_catpvf(eval, "package %_;\n", package);
- sv_catpv(eval, ApachePerlRun_import_exit());
- sv_catpv(eval, "sub handler {\n");
- sv_catpvf(eval, "#line 1 %s\n", r->filename);
- sv_catsv(eval, (SV*)SvRV(code));
- sv_catpvn(eval, "\n}", 2);
- ApachePerlRun_compile(r, eval);
- perl_stash_rgy_endav(r->uri,
- perl_get_sv("Apache::Registry::curstash", TRUE));
- SvREFCNT_dec(eval);
- rc = ApachePerlRun_error_check(r);
- if(rc != OK) {
- LEAVE;
- return rc;
- }
- mod_perl_clear_rgy_endav(r, package);
- while (!pkg_ent) {
- SV **svp = hv_fetch(rgy_cache,
- SvPVX(package), SvCUR(package), FALSE);
- if(svp) {
- pkg_ent = (HV*)SvRV(*svp);
- break;
- }
- hv_store(rgy_cache, SvPVX(package), SvCUR(package),
- newRV((SV*)newHV()), FALSE);
- if(++i > 10) {
- fprintf(stderr, "STUCK\n");
- break;
- }
- }
-
- hv_store(pkg_ent, "mtime", 5, newSViv(r->finfo.st_mtime), FALSE);
- }
-
- {
- dSP;
- int count;
- SV *sub = newSVsv(package);
- sv_catpvn(sub, "::handler", 9);
- ENTER;SAVETMPS;PUSHMARK(sp);
- XPUSHs((SV*)perl_bless_request_rec(r));
- PUTBACK;
- count = perl_call_sv(sub, G_EVAL | G_SCALAR);
- SvREFCNT_dec(sub);
- FREETMPS;LEAVE;
- }
-
- ApachePerlRun_chdir_scwd();
- LEAVE;
- if((rc = ApachePerlRun_error_check(r)) != OK)
- return rc;
-
- return r->status;
-}
-
-MODULE = Apache::PerlRunXS PACKAGE = Apache::RegistryXS PREFIX = registry_
-
-int
-registry_handler(r)
- Apache r
-
-MODULE = Apache::PerlRunXS PACKAGE = Apache::PerlRunXS PREFIX = ApachePerlRun_
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-int
-handler(r)
- Apache r
-
-SV *
-ApachePerlRun_namespace(r, root="Apache::ROOT")
- Apache r
- char *root
-
-void
-ApachePerlRun_can_compile(r)
- Apache r
-
- PREINIT:
- int retval = OK;
-
- PPCODE:
- retval = ApachePerlRun_can_compile(r);
- XPUSHs(sv_2mortal(newSViv(retval)));
- if(GIMME == G_ARRAY) {
- XPUSHs(sv_2mortal(newSViv(r->finfo.st_mtime)));
- }
-
-void
-ApachePerlRun_compile(r, code_ref)
- Apache r
- SV *code_ref
-
-SV *
-ApachePerlRun_readscript(r)
- Apache r
-
-int
-ApachePerlRun_error_check(r)
- Apache r
-
-
diff --git a/tags/v1_29/src/modules/perl/Server.xs b/tags/v1_29/src/modules/perl/Server.xs
deleted file mode 100644
index 72197df..0000000
--- a/tags/v1_29/src/modules/perl/Server.xs
+++ /dev/null
@@ -1,203 +0,0 @@
-#define CORE_PRIVATE
-#include "mod_perl.h"
-
-typedef struct {
- request_rec *r;
- SV *cv;
- int refcnt;
-} srv_cleanup_t;
-
-static void srv_cleanup_handler(void *data)
-{
- srv_cleanup_t *srv = (srv_cleanup_t*)data;
- (void)acquire_mutex(mod_perl_mutex);
- perl_call_handler(srv->cv, srv->r, Nullav);
- if(srv->refcnt) SvREFCNT_dec(srv->cv);
- (void)release_mutex(mod_perl_mutex);
-}
-
-static void ApacheServer_register_cleanup(SV *self, SV *cv)
-{
- pool *p = perl_get_startup_pool();
- server_rec *s;
- srv_cleanup_t *srv = (srv_cleanup_t *)palloc(p, sizeof(srv_cleanup_t));
-
- if(SvROK(self) && sv_derived_from(self, "Apache::Server"))
- s = (server_rec *)SvIV((SV*)SvRV(self));
- else
- s = perl_get_startup_server();
- srv->r = mp_fake_request_rec(s, p, "Apache::Server::register_cleanup");
- srv->cv = cv;
- if(SvREFCNT(srv->cv) == 1) {
- srv->refcnt = 1;
- SvREFCNT_inc(srv->cv);
- }
- else
- srv->refcnt = 0;
- register_cleanup(p, srv, srv_cleanup_handler, mod_perl_noop);
-}
-
-MODULE = Apache::Server PACKAGE = Apache::Server PREFIX = ApacheServer_
-
-void
-ApacheServer_register_cleanup(self, cv)
- SV *self
- SV *cv
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-#/* Per-vhost config... */
-
-#struct server_rec {
-
-# server_rec *next;
-
-# /* Full locations of server config info */
-
-# char *srm_confname;
-# char *access_confname;
-
-# /* Contact information */
-
-# char *server_admin;
-# char *server_hostname;
-# short port; /* for redirects, etc. */
-
-Apache::Server
-next(server)
- Apache::Server server
-
- CODE:
- if(!(RETVAL = server->next)) XSRETURN_UNDEF;
-
- OUTPUT:
- RETVAL
-
-char *
-server_admin(server, ...)
- Apache::Server server
-
- CODE:
- RETVAL = server->server_admin;
-
- OUTPUT:
- RETVAL
-
-char *
-server_hostname(server)
- Apache::Server server
-
- CODE:
- RETVAL = server->server_hostname;
-
- OUTPUT:
- RETVAL
-
-unsigned short
-port(server, ...)
- Apache::Server server
-
- CODE:
- RETVAL = server->port;
-
- if(items > 1)
- server->port = (unsigned short)SvIV(ST(1));
-
- OUTPUT:
- RETVAL
-
-# /* Log files --- note that transfer log is now in the modules... */
-
-# char *error_fname;
-# FILE *error_log;
-
-# /* Module-specific configuration for server, and defaults... */
-
-# int is_virtual; /* true if this is the virtual server */
-# void *module_config; /* Config vector containing pointers to
-# * modules' per-server config structures.
-# */
-# void *lookup_defaults; /* MIME type info, etc., before we start
-# * checking per-directory info.
-# */
-# /* Transaction handling */
-
-# struct in_addr host_addr; /* The bound address, for this server */
-# short host_port; /* The bound port, for this server */
-# int timeout; /* Timeout, in seconds, before we give up */
-# int keep_alive_timeout; /* Seconds we'll wait for another request */
-# int keep_alive_max; /* Maximum requests per connection */
-# int keep_alive; /* Use persistent connections? */
-
-# char *names; /* Wildcarded names for HostAlias servers */
-# char *virthost; /* The name given in <VirtualHost> */
-
-char *
-error_fname(server)
- Apache::Server server
-
- CODE:
- RETVAL = server->error_fname;
-
- OUTPUT:
- RETVAL
-
-int
-timeout(server, set=0)
- Apache::Server server
- int set
-
- CODE:
- RETVAL = server->timeout;
-
- if (set) {
- server->timeout = set;
- }
-
- OUTPUT:
- RETVAL
-
-uid_t
-uid(server)
- Apache::Server server
-
- CODE:
- RETVAL = server->server_uid;
-
- OUTPUT:
- RETVAL
-
-gid_t
-gid(server)
- Apache::Server server
-
- CODE:
- RETVAL = server->server_gid;
-
- OUTPUT:
- RETVAL
-
-int
-is_virtual(server)
- Apache::Server server
-
- CODE:
- RETVAL = server->is_virtual;
-
- OUTPUT:
- RETVAL
-
-void
-names(server)
- Apache::Server server
-
- CODE:
-#if MODULE_MAGIC_NUMBER < 19980305
- ST(0) = sv_2mortal(newSVpv(server->names,0));
-#else
- ST(0) = array_header2avrv(server->names);
-#endif
-
diff --git a/tags/v1_29/src/modules/perl/Table.xs b/tags/v1_29/src/modules/perl/Table.xs
deleted file mode 100644
index 5e54528..0000000
--- a/tags/v1_29/src/modules/perl/Table.xs
+++ /dev/null
@@ -1,279 +0,0 @@
-#include "mod_perl.h"
-
-typedef struct {
- SV *cv;
- table *only;
-} TableDo;
-
-#define table_pool(t) ((array_header *)(t))->pool
-
-static int Apache_table_do(TableDo *td, const char *key, const char *val)
-{
- int count=0, rv=1;
- dSP;
-
- if(td->only && !table_get(td->only, key))
- return 1;
-
- ENTER;SAVETMPS;
- PUSHMARK(sp);
- XPUSHs(sv_2mortal(newSVpv((char *)key,0)));
- XPUSHs(sv_2mortal(newSVpv((char *)val,0)));
- PUTBACK;
- count = perl_call_sv(td->cv, G_SCALAR);
- SPAGAIN;
- if(count == 1)
- rv = POPi;
- PUTBACK;
- FREETMPS;LEAVE;
- return rv;
-}
-
-typedef void (
-#ifdef WIN32
- _stdcall
-#endif
- *TABFUNC) (table *, const char *, const char *);
-
-static void table_modify(TiedTable *self, const char *key, SV *sv,
- TABFUNC tabfunc)
-{
- dTHR;
- const char *val;
-
- if(!self->utable) return;
-
- if(SvROK(sv) && (SvTYPE(SvRV(sv)) == SVt_PVAV)) {
- I32 i;
- AV *av = (AV*)SvRV(sv);
- for(i=0; i<=AvFILL(av); i++) {
- val = (const char *)SvPV(*av_fetch(av, i, FALSE),na);
- (*tabfunc)(self->utable, key, val);
- }
- }
- else {
- val = (const char *)SvPV(sv,na);
- (*tabfunc)(self->utable, key, val);
- }
-
-}
-
-static void
-#ifdef WIN32
-_stdcall
-#endif
-table_delete(table *tab, const char *key, const char *val)
-{
- table_unset(tab, val);
-}
-
-static Apache__Table ApacheTable_new(table *utable)
-{
- Apache__Table RETVAL = (Apache__Table)safemalloc(sizeof(TiedTable));
- RETVAL->utable = utable;
- RETVAL->ix = 0;
- RETVAL->elts = NULL;
- RETVAL->arr = NULL;
- return RETVAL;
-}
-
-MODULE = Apache::Table PACKAGE = Apache::Table
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-Apache::Table
-TIEHASH(pclass, table)
- SV *pclass
- Apache::table table
-
- CODE:
- if(!pclass) XSRETURN_UNDEF;
- RETVAL = ApacheTable_new(table);
-
- OUTPUT:
- RETVAL
-
-void
-new(pclass, r, nalloc=10)
- SV *pclass
- Apache r
- int nalloc
-
- CODE:
- if(!pclass) XSRETURN_UNDEF;
- ST(0) = mod_perl_tie_table(make_table(r->pool, nalloc));
-
-void
-DESTROY(self)
- SV *self
-
- PREINIT:
- Apache__Table tab;
-
- CODE:
- tab = (Apache__Table)hvrv2table(self);
- if(SvROK(self) && SvTYPE(SvRV(self)) == SVt_PVHV)
- safefree(tab);
-
-void
-FETCH(self, key)
- Apache::Table self
- const char *key
-
- ALIAS:
- get = 1
-
- PPCODE:
- ix = ix; /*avoid warning*/
- if(!self->utable) XSRETURN_UNDEF;
- if(GIMME == G_SCALAR) {
- const char *val = table_get(self->utable, key);
- if (val) XPUSHs(sv_2mortal(newSVpv((char*)val,0)));
- else XSRETURN_UNDEF;
- }
- else {
- int i;
- array_header *arr = table_elts(self->utable);
- table_entry *elts = (table_entry *)arr->elts;
- for (i = 0; i < arr->nelts; ++i) {
- if (!elts[i].key || strcasecmp(elts[i].key, key)) continue;
- XPUSHs(sv_2mortal(newSVpv(elts[i].val,0)));
- }
- }
-
-bool
-EXISTS(self, key)
- Apache::Table self
- const char *key
-
- CODE:
- if(!self->utable) XSRETURN_UNDEF;
- RETVAL = table_get(self->utable, key) ? TRUE : FALSE;
-
- OUTPUT:
- RETVAL
-
-const char*
-DELETE(self, sv)
- Apache::Table self
- SV *sv
-
- ALIAS:
- unset = 1
-
- PREINIT:
- I32 gimme = GIMME_V;
-
- CODE:
- ix = ix;
- if(!self->utable) XSRETURN_UNDEF;
- RETVAL = NULL;
- if((ix == 0) && (gimme != G_VOID)) {
- STRLEN n_a;
- RETVAL = table_get(self->utable, SvPV(sv,n_a));
- }
-
- table_modify(self, NULL, sv, (TABFUNC)table_delete);
- if(!RETVAL) XSRETURN_UNDEF;
-
- OUTPUT:
- RETVAL
-
-void
-STORE(self, key, val)
- Apache::Table self
- const char *key
- const char *val
-
- ALIAS:
- set = 1
-
- CODE:
- ix = ix; /*avoid warning*/
- if(!self->utable) XSRETURN_UNDEF;
- table_set(self->utable, key, val);
-
-void
-CLEAR(self)
- Apache::Table self
-
- ALIAS:
- clear = 1
-
- CODE:
- ix = ix; /*avoid warning*/
- if(!self->utable) XSRETURN_UNDEF;
- clear_table(self->utable);
-
-const char *
-NEXTKEY(self, lastkey=Nullsv)
- Apache::Table self
- SV *lastkey
-
- CODE:
- if(self->ix >= self->arr->nelts) XSRETURN_UNDEF;
- RETVAL = self->elts[self->ix++].key;
-
- OUTPUT:
- RETVAL
-
-const char *
-FIRSTKEY(self)
- Apache::Table self
-
- CODE:
- if(!self->utable) XSRETURN_UNDEF;
- self->arr = table_elts(self->utable);
- if(!self->arr->nelts) XSRETURN_UNDEF;
- self->elts = (table_entry *)self->arr->elts;
- self->ix = 0;
- RETVAL = self->elts[self->ix++].key;
-
- OUTPUT:
- RETVAL
-
-void
-add(self, key, sv)
- Apache::Table self
- const char *key
- SV *sv;
-
- CODE:
- table_modify(self, key, sv, (TABFUNC)table_add);
-
-void
-merge(self, key, sv)
- Apache::Table self
- const char *key
- SV *sv
-
- CODE:
- table_modify(self, key, sv, (TABFUNC)table_merge);
-
-void
-do(self, cv, ...)
- Apache::Table self
- SV *cv
-
- PREINIT:
- TableDo td;
- td.only = (table *)NULL;
-
- CODE:
- if(items > 2) {
- int i;
- STRLEN len;
- td.only = make_table(table_pool(self->utable), items-2);
- for(i=2; ; i++) {
- char *key = SvPV(ST(i),len);
- table_set(td.only, key, "1");
- if(i == (items - 1)) break;
- }
- }
- td.cv = cv;
-
- table_do((int (*) (void *, const char *, const char *)) Apache_table_do,
- (void *) &td, self->utable, NULL);
diff --git a/tags/v1_29/src/modules/perl/URI.xs b/tags/v1_29/src/modules/perl/URI.xs
deleted file mode 100644
index 32e38fd..0000000
--- a/tags/v1_29/src/modules/perl/URI.xs
+++ /dev/null
@@ -1,206 +0,0 @@
-#include "mod_perl.h"
-#include "mod_perl_xs.h"
-
-typedef struct {
- uri_components uri;
- pool *pool;
- request_rec *r;
- char *path_info;
-} XS_Apache__URI;
-
-typedef XS_Apache__URI * Apache__URI;
-
-MODULE = Apache::URI PACKAGE = Apache
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-Apache::URI
-parsed_uri(r)
- Apache r
-
- CODE:
- RETVAL = (Apache__URI)safemalloc(sizeof(XS_Apache__URI));
- RETVAL->uri = r->parsed_uri;
- RETVAL->pool = r->pool;
- RETVAL->r = r;
- RETVAL->path_info = r->path_info;
-
- OUTPUT:
- RETVAL
-
-MODULE = Apache::URI PACKAGE = Apache::URI
-
-void
-DESTROY(uri)
- Apache::URI uri
-
- CODE:
- safefree(uri);
-
-Apache::URI
-parse(self, r, uri=NULL)
- SV *self
- Apache r
- const char *uri
-
- PREINIT:
- int self_uri = 0;
-
- CODE:
- self = self; /* -Wall */
- RETVAL = (Apache__URI)safemalloc(sizeof(XS_Apache__URI));
- if(!uri) {
- uri = ap_construct_url(r->pool, r->uri, r);
- self_uri = 1;
- }
- (void)ap_parse_uri_components(r->pool, uri, &RETVAL->uri);
- RETVAL->pool = r->pool;
- RETVAL->r = r;
- RETVAL->path_info = NULL;
- if(self_uri)
- RETVAL->uri.query = r->args;
-
- OUTPUT:
- RETVAL
-
-char *
-unparse(uri, flags=UNP_OMITPASSWORD)
- Apache::URI uri
- unsigned flags
-
- CODE:
- RETVAL = ap_unparse_uri_components(uri->pool, &uri->uri, flags);
-
- OUTPUT:
- RETVAL
-
-SV *
-rpath(uri)
- Apache::URI uri
-
- CODE:
- RETVAL = Nullsv;
-
- if(uri->path_info) {
- int uri_len = strlen(uri->uri.path);
- int n = strlen(uri->path_info);
- int set = uri_len - n;
- if(set > 0)
- RETVAL = newSVpv(uri->uri.path, set);
- }
- else {
- if (uri->uri.path) {
- RETVAL = newSVpv(uri->uri.path, 0);
- }
- }
-
- OUTPUT:
- RETVAL
-
-char *
-scheme(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.scheme,uri->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-hostinfo(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.hostinfo,uri->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-user(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.user,uri->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-password(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.password,uri->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-hostname(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.hostname,uri->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-path(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.path,uri->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-query(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.query,uri->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-fragment(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.fragment,uri->pool);
-
- OUTPUT:
- RETVAL
-
-char *
-port(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->uri.port_str,uri->pool);
- if (items > 1) {
- uri->uri.port = (int)SvIV(ST(1));
- }
-
- OUTPUT:
- RETVAL
-
-char *
-path_info(uri, ...)
- Apache::URI uri
-
- CODE:
- get_set_PVp(uri->path_info,uri->pool);
-
- OUTPUT:
- RETVAL
-
-
diff --git a/tags/v1_29/src/modules/perl/Util.xs b/tags/v1_29/src/modules/perl/Util.xs
deleted file mode 100644
index 9283d07..0000000
--- a/tags/v1_29/src/modules/perl/Util.xs
+++ /dev/null
@@ -1,133 +0,0 @@
-#include "mod_perl.h"
-#include "util_date.h"
-
-#define TIME_NOW time(NULL)
-#define DEFAULT_TIME_FORMAT "%a, %d %b %Y %H:%M:%S %Z"
-
-#define parsedate ap_parseHTTPdate
-#define util_pool() perl_get_util_pool()
-
-static SV *size_string(size_t size)
-{
- SV *sv = newSVpv(" -", 5);
- if (size == (size_t)-1) {
- /**/
- }
- else if (!size) {
- sv_setpv(sv, " 0k");
- }
- else if (size < 1024) {
- sv_setpv(sv, " 1k");
- }
- else if (size < 1048576) {
- sv_setpvf(sv, "%4dk", (size + 512) / 1024);
- }
- else if (size < 103809024) {
- sv_setpvf(sv, "%4.1fM", size / 1048576.0);
- }
- else {
- sv_setpvf(sv, "%4dM", (size + 524288) / 1048576);
- }
-
- return sv;
-}
-
-static SV *my_escape_html(char *s)
-{
- int i, j;
- SV *x;
-
- /* first, count the number of extra characters */
- for (i = 0, j = 0; s[i] != '\0'; i++)
- if (s[i] == '<' || s[i] == '>')
- j += 3;
- else if (s[i] == '&')
- j += 4;
- else if (s[i] == '"')
- j += 5;
-
- if (j == 0)
- return newSVpv(s,i);
- x = newSV(i + j + 1);
-
- for (i = 0, j = 0; s[i] != '\0'; i++, j++)
- if (s[i] == '<') {
- memcpy(&SvPVX(x)[j], "<", 4);
- j += 3;
- }
- else if (s[i] == '>') {
- memcpy(&SvPVX(x)[j], ">", 4);
- j += 3;
- }
- else if (s[i] == '&') {
- memcpy(&SvPVX(x)[j], "&", 5);
- j += 4;
- }
- else if (s[i] == '"') {
- memcpy(&SvPVX(x)[j], """, 6);
- j += 5;
- }
- else
- SvPVX(x)[j] = s[i];
-
- SvPVX(x)[j] = '\0';
- SvCUR_set(x, j);
- SvPOK_on(x);
- return x;
-}
-
-#define validate_password(passwd, hash) \
-(ap_validate_password(passwd, hash) == NULL)
-
-MODULE = Apache::Util PACKAGE = Apache::Util
-
-PROTOTYPES: DISABLE
-
-BOOT:
- items = items; /*avoid warning*/
-
-SV *
-size_string(size)
- size_t size
-
-char *
-escape_uri(segment)
- const char *segment
-
- CODE:
- RETVAL = ap_os_escape_path(util_pool(), segment, TRUE);
-
- OUTPUT:
- RETVAL
-
-SV *
-escape_html(s)
- char *s
-
- CODE:
- RETVAL = my_escape_html(s);
-
- OUTPUT:
- RETVAL
-
-char *
-ht_time(t=TIME_NOW, fmt=DEFAULT_TIME_FORMAT, gmt=TRUE)
- time_t t
- const char *fmt
- int gmt
-
- CODE:
- RETVAL = ap_ht_time(util_pool(), t, fmt, gmt);
-
- OUTPUT:
- RETVAL
-
-time_t
-parsedate(date)
- const char *date
-
-int
-validate_password(passwd, hash)
- const char *passwd
- const char *hash
-
diff --git a/tags/v1_29/src/modules/perl/apache_inc.h b/tags/v1_29/src/modules/perl/apache_inc.h
deleted file mode 100644
index 39acaac..0000000
--- a/tags/v1_29/src/modules/perl/apache_inc.h
+++ /dev/null
@@ -1,258 +0,0 @@
-#ifdef JW_PERL_OBJECT
-
-#ifdef uid_t
-#define apache_uid_t uid_t
-#undef uid_t
-#endif
-#define uid_t apache_uid_t
-
-#ifdef gid_t
-#define apache_gid_t gid_t
-#undef gid_t
-#endif
-#define gid_t apache_gid_t
-
-#ifdef mode_t
-#define apache_mode_t mode_t
-#undef mode_t
-#endif
-#define mode_t apache_mode_t
-
-#ifdef sleep
-#define apache_sleep sleep
-#undef sleep
-#endif
-
-#ifdef stat
-#define apache_stat stat
-#undef stat
-#endif
-
-#ifdef opendir
-#define apache_opendir opendir
-#undef opendir
-#endif
-
-#ifdef pool
-#undef pool
-#endif
-
-#endif
-
-#ifdef WIN32
-
-#ifdef uid_t
-#define apache_uid_t uid_t
-#undef uid_t
-#endif
-#define uid_t apache_uid_t
-
-#ifdef gid_t
-#define apache_gid_t gid_t
-#undef gid_t
-#endif
-#define gid_t apache_gid_t
-
-#ifdef mode_t
-#define apache_mode_t mode_t
-#undef mode_t
-#endif
-#define mode_t apache_mode_t
-
-#ifdef stat
-#define apache_stat stat
-#undef stat
-#endif
-
-#ifdef sleep
-#define apache_sleep sleep
-#undef sleep
-#endif
-
-#ifdef isnan
-#define apache_isnan isnan
-#undef isnan
-#endif
-
-#ifdef PERL_IS_5_6
-
-#ifdef opendir
-#define apache_opendir opendir
-#undef opendir
-#endif
-
-#ifdef readdir
-#define apache_readdir readdir
-#undef readdir
-#endif
-
-#ifdef closedir
-#define apache_closedir closedir
-#undef closedir
-#endif
-
-#ifdef crypt
-#define apache_crypt crypt
-#undef crypt
-#endif
-
-#if PERL_VERSION == 6
-#ifdef errno
-#define apache_errno errno
-#undef errno
-#endif
-#endif
-
-#endif /* endif PERL_IS_56 */
-
-#endif /* endif WIN32 */
-
-#ifndef _INCLUDE_APACHE_FIRST
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* sfio */
-#if !defined(PERLIO_IS_STDIO) && defined(HASATTRIBUTE)
-# undef printf
-#endif
-
-#include "httpd.h"
-#include "http_config.h"
-#include "http_protocol.h"
-#include "http_log.h"
-#include "http_main.h"
-#include "http_core.h"
-#include "http_request.h"
-#include "util_script.h"
-#include "http_conf_globals.h"
-#include "http_vhost.h"
-
-/* sfio */
-#if !defined(PERLIO_IS_STDIO) && defined(HASATTRIBUTE)
-# define printf PerlIO_stdoutf
-#endif
-
-#if defined(APACHE_SSL) || defined(MOD_SSL)
-#undef _
-#ifdef _config_h_
-#ifdef CAN_PROTOTYPE
-#define _(args) args
-#else
-#define _(args) ()
-#endif
-#endif
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-#ifdef JW_PERL_OBJECT
-
-#undef uid_t
-#ifdef apache_uid_t
-#define uid_t apache_uid_t
-#undef apache_uid_t
-#endif
-
-#undef gid_t
-#ifdef apache_gid_t
-#define gid_t apache_gid_t
-#undef apache_gid_t
-#endif
-
-#undef mode_t
-#ifdef apache_mode_t
-#define gid_t apache_mode_t
-#undef apache_mode_t
-#endif
-
-#ifdef apache_sleep
-#undef sleep
-#define sleep apache_sleep
-#undef apache_sleep
-#endif
-
-#ifdef apache_stat
-#undef stat
-#define stat apache_stat
-#undef apache_stat
-#endif
-
-#ifdef apache_isnan
-#undef isnan
-#define isnan apache_isnan
-#undef apache_isnan
-#endif
-
-#ifdef apache_opendir
-#undef opendir
-#define opendir apache_opendir
-#undef apache_opendir
-#endif
-
-#endif
-
-#ifdef WIN32
-
-#undef uid_t
-#ifdef apache_uid_t
-#define uid_t apache_uid_t
-#undef apache_uid_t
-#endif
-
-#undef gid_t
-#ifdef apache_gid_t
-#define gid_t apache_gid_t
-#undef apache_gid_t
-#endif
-
-#undef mode_t
-#ifdef apache_mode_t
-#define gid_t apache_mode_t
-#undef apache_mode_t
-#endif
-
-#ifdef apache_stat
-#undef stat
-#define stat apache_stat
-#undef apache_stat
-#endif
-
-#ifdef apache_sleep
-#undef sleep
-#define sleep apache_sleep
-#undef apache_sleep
-#endif
-
-#ifdef PERL_IS_5_6
-
-#ifdef apache_opendir
-#undef opendir
-#define opendir apache_opendir
-#undef apache_opendir
-#endif
-
-#ifdef apache_readdir
-#undef readdir
-#define readdir apache_readdir
-#undef apache_readdir
-#endif
-
-#ifdef apache_closedir
-#undef closedir
-#define closedir apache_closedir
-#undef apache_closedir
-#endif
-
-#ifdef apache_crypt
-#undef crypt
-#define crypt apache_crypt
-#undef apache_crypt
-#endif
-
-#endif /* endif PERL_IS_5_6 */
-
-#endif /* endif WIN32 */
-
diff --git a/tags/v1_29/src/modules/perl/fork.xs b/tags/v1_29/src/modules/perl/fork.xs
deleted file mode 100644
index 3ba54ee..0000000
--- a/tags/v1_29/src/modules/perl/fork.xs
+++ /dev/null
@@ -1,69 +0,0 @@
-#should no longer need this kludge
-# toggle closing of the http socket on fork...
-void
-forkoption(i)
- int i;
-
- CODE:
- if ((i<0)||(i>3)) {
- croak("Usage: Apache::forkoption(0|1|2|3)");
- }
- else {
- mod_perl_socketexitoption = i;
- }
- /* probably SHOULD set weareaforkedchild = 0 if socketexitoption
- * is set to something that DOESN'T cause a forked child to
- * actually die on exit, but...
- */
-
-# We want the http socket closed
-int
-fork(...)
-
- PREINIT:
- listen_rec *l;
- static listen_rec *mhl;
- dSP; dTARGET;
- int childpid;
- GV *tmpgv;
-
- CODE:
- RETVAL = 0;
-#ifdef HAS_FORK
- items = items;
- EXTEND(SP,1);
- childpid = fork();
-
- if((childpid < 0)) {
- RETVAL=-1;
- }
- else {
- if(!childpid) {
- if(mod_perl_socketexitoption>1) mod_perl_weareaforkedchild++;
- if ((mod_perl_socketexitoption==1) ||
- (mod_perl_socketexitoption==3)) {
- /* So? I can't get at head_listener...
- * (It is a ring anyhow...)
- */
- mhl = listeners;
- l = mhl;
-
- do {
- if (l->fd > 0) close(l->fd);
- l = l->next;
- } while (l != mhl);
- }
- if((tmpgv = gv_fetchpv("$", TRUE, SVt_PV)))
- sv_setiv(GvSV(tmpgv), (IV)getpid());
- hv_clear(pidstatus);
- }
- PUSHi(childpid);
-
- RETVAL = childpid;
- }
-#else
- croak("Unsupported function fork");
-#endif
-
- OUTPUT:
- RETVAL
diff --git a/tags/v1_29/src/modules/perl/ldopts b/tags/v1_29/src/modules/perl/ldopts
deleted file mode 100644
index 97ca226..0000000
--- a/tags/v1_29/src/modules/perl/ldopts
+++ /dev/null
@@ -1,21 +0,0 @@
-use Config;
-
-#my $embed_pm = '-MApache::ExtUtils=ldopts';
-my $embed_pm = '-MExtUtils::Embed';
-my $ldopts = `$^X $embed_pm -e ldopts -- -std @ARGV`;
-
-if($^O eq "aix") {
- $ldopts =~ s,(-bE:)(perl\.exp),$1$Config{archlibexp}/CORE/$2,;
- #system "cp $Config{archlibexp}/CORE/perl.exp ./perl.exp";
-}
-
-#if($ldopts =~ s/^(Note.*)$//mg) {
-# warn "$1\n";
-#}
-
-$ldopts = join "\n",
- map {warn "$1\n" if s/^(Note.*)$//;$_}
- split "\n", $ldopts;
-
-
-print $ldopts;
diff --git a/tags/v1_29/src/modules/perl/mod_perl.c b/tags/v1_29/src/modules/perl/mod_perl.c
deleted file mode 100644
index ed39e9f..0000000
--- a/tags/v1_29/src/modules/perl/mod_perl.c
+++ /dev/null
@@ -1,1756 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1996-2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
-
-
-/*
- * And so it was decided the camel should be given magical multi-colored
- * feathers so it could fly and journey to once unknown worlds.
- * And so it was done...
- */
-
-#define CORE_PRIVATE
-#include "mod_perl.h"
-
-#ifdef WIN32
-void *mod_perl_mutex = &mod_perl_mutex;
-#else
-void *mod_perl_dummy_mutex = &mod_perl_dummy_mutex;
-#endif
-
-static IV mp_request_rec;
-static int seqno = 0;
-static int perl_is_running = 0;
-int mod_perl_socketexitoption = 3;
-int mod_perl_weareaforkedchild = 0;
-static int callbacks_this_request = 0;
-static PerlInterpreter *perl = NULL;
-static AV *orig_inc = Nullav;
-static AV *cleanup_av = Nullav;
-#ifdef PERL_STACKED_HANDLERS
-static HV *stacked_handlers = Nullhv;
-#endif
-
-#ifdef PERL_OBJECT
-CPerlObj *pPerl;
-#endif
-
-typedef const char* (*crft)(); /* command_req_func_t */
-
-static command_rec perl_cmds[] = {
-#ifdef PERL_SECTIONS
- { "<Perl>", (crft) perl_section, NULL, SECTION_ALLOWED, RAW_ARGS, "Perl code" },
- { "</Perl>", (crft) perl_end_section, NULL, SECTION_ALLOWED, NO_ARGS, "End Perl code" },
-#endif
- { "=pod", (crft) perl_pod_section, NULL, OR_ALL, RAW_ARGS, "Start of POD" },
- { "=back", (crft) perl_pod_section, NULL, OR_ALL, RAW_ARGS, "End of =over" },
- { "=cut", (crft) perl_pod_end_section, NULL, OR_ALL, NO_ARGS, "End of POD" },
- { "__END__", (crft) perl_config_END, NULL, OR_ALL, RAW_ARGS, "Stop reading config" },
- { "PerlFreshRestart", (crft) perl_cmd_fresh_restart,
- NULL,
- RSRC_CONF, FLAG, "Tell mod_perl to reload modules and flush Apache::Registry cache on restart" },
- { "PerlTaintCheck", (crft) perl_cmd_tainting,
- NULL,
- RSRC_CONF, FLAG, "Turn on -T switch" },
-#ifdef PERL_SAFE_STARTUP
- { "PerlOpmask", (crft) perl_cmd_opmask,
- NULL,
- RSRC_CONF, TAKE1, "Opmask File" },
-#endif
- { "PerlWarn", (crft) perl_cmd_warn,
- NULL,
- RSRC_CONF, FLAG, "Turn on -w switch" },
- { "PerlScript", (crft) perl_cmd_require,
- NULL,
- OR_ALL, ITERATE, "this directive is deprecated, use `PerlRequire'" },
- { "PerlRequire", (crft) perl_cmd_require,
- NULL,
- OR_ALL, ITERATE, "A Perl script name, pulled in via require" },
- { "PerlModule", (crft) perl_cmd_module,
- NULL,
- OR_ALL, ITERATE, "List of Perl modules" },
- { "PerlSetVar", (crft) perl_cmd_var,
- NULL,
- OR_ALL, TAKE2, "Perl config var and value" },
- { "PerlAddVar", (crft) perl_cmd_var,
- (void*)1,
- OR_ALL, ITERATE2, "Perl config var and value" },
- { "PerlSetEnv", (crft) perl_cmd_setenv,
- NULL,
- OR_ALL, TAKE2, "Perl %ENV key and value" },
- { "PerlPassEnv", (crft) perl_cmd_pass_env,
- NULL,
- RSRC_CONF, ITERATE, "pass environment variables to %ENV"},
- { "PerlSendHeader", (crft) perl_cmd_sendheader,
- NULL,
- OR_ALL, FLAG, "Tell mod_perl to parse and send HTTP headers" },
- { "PerlSetupEnv", (crft) perl_cmd_env,
- NULL,
- OR_ALL, FLAG, "Tell mod_perl to setup %ENV by default" },
- { "PerlHandler", (crft) perl_cmd_handler_handlers,
- NULL,
- OR_ALL, ITERATE, "the Perl handler routine name" },
-#ifdef PERL_TRANS
- { PERL_TRANS_CMD_ENTRY },
-#endif
-#ifdef PERL_AUTHEN
- { PERL_AUTHEN_CMD_ENTRY },
-#endif
-#ifdef PERL_AUTHZ
- { PERL_AUTHZ_CMD_ENTRY },
-#endif
-#ifdef PERL_ACCESS
- { PERL_ACCESS_CMD_ENTRY },
-#endif
-#ifdef PERL_TYPE
- { PERL_TYPE_CMD_ENTRY },
-#endif
-#ifdef PERL_FIXUP
- { PERL_FIXUP_CMD_ENTRY },
-#endif
-#ifdef PERL_LOG
- { PERL_LOG_CMD_ENTRY },
-#endif
-#ifdef PERL_CLEANUP
- { PERL_CLEANUP_CMD_ENTRY },
-#endif
-#ifdef PERL_INIT
- { PERL_INIT_CMD_ENTRY },
-#endif
-#ifdef PERL_HEADER_PARSER
- { PERL_HEADER_PARSER_CMD_ENTRY },
-#endif
-#ifdef PERL_CHILD_INIT
- { PERL_CHILD_INIT_CMD_ENTRY },
-#endif
-#ifdef PERL_CHILD_EXIT
- { PERL_CHILD_EXIT_CMD_ENTRY },
-#endif
-#ifdef PERL_POST_READ_REQUEST
- { PERL_POST_READ_REQUEST_CMD_ENTRY },
-#endif
-#ifdef PERL_DISPATCH
- { PERL_DISPATCH_CMD_ENTRY },
-#endif
-#ifdef PERL_RESTART
- { PERL_RESTART_CMD_ENTRY },
-#endif
- { NULL }
-};
-
-static handler_rec perl_handlers [] = {
- { "perl-script", perl_handler },
- { DIR_MAGIC_TYPE, perl_handler },
- { NULL }
-};
-
-module MODULE_VAR_EXPORT perl_module = {
- STANDARD_MODULE_STUFF,
- perl_module_init, /* initializer */
- perl_create_dir_config, /* create per-directory config structure */
- perl_merge_dir_config, /* merge per-directory config structures */
- perl_create_server_config, /* create per-server config structure */
- perl_merge_server_config, /* merge per-server config structures */
- perl_cmds, /* command table */
- perl_handlers, /* handlers */
- PERL_TRANS_HOOK, /* translate_handler */
- PERL_AUTHEN_HOOK, /* check_user_id */
- PERL_AUTHZ_HOOK, /* check auth */
- PERL_ACCESS_HOOK, /* check access */
- PERL_TYPE_HOOK, /* type_checker */
- PERL_FIXUP_HOOK, /* pre-run fixups */
- PERL_LOG_HOOK, /* logger */
-#if MODULE_MAGIC_NUMBER >= 19970103
- PERL_HEADER_PARSER_HOOK, /* header parser */
-#endif
-#if MODULE_MAGIC_NUMBER >= 19970719
- PERL_CHILD_INIT_HOOK, /* child_init */
-#endif
-#if MODULE_MAGIC_NUMBER >= 19970728
- NULL, /* child_exit *//* mod_perl uses register_cleanup() */
-#endif
-#if MODULE_MAGIC_NUMBER >= 19970825
- PERL_POST_READ_REQUEST_HOOK, /* post_read_request */
-#endif
-};
-
-#if defined(STRONGHOLD) && !defined(APACHE_SSL)
-#define APACHE_SSL
-#endif
-
-int PERL_RUNNING (void)
-{
- return (perl_is_running);
-}
-
-static void seqno_check_max(request_rec *r, int seqno)
-{
- dPPDIR;
- char *max = NULL;
- array_header *vars = (array_header *)cld->vars;
-
- /* XXX: what triggers such a condition ?*/
- if(vars && (vars->nelts > 100000)) {
- fprintf(stderr, "[warning] PerlSetVar->nelts = %d\n", vars->nelts);
- }
- else {
- if(cld->vars)
- max = (char *)table_get(cld->vars, "MaxModPerlRequestsPerChild");
- }
-
-#if (MODULE_MAGIC_NUMBER >= 19970912) && !defined(WIN32)
- if(max && (seqno >= atoi(max))) {
- child_terminate(r);
- MP_TRACE_g(fprintf(stderr, "mod_perl: terminating child %d after serving %d requests\n",
- (int)getpid(), seqno));
- }
-#endif
- max = NULL;
-}
-
-void perl_shutdown (server_rec *s, pool *p)
-{
- char *pdl = NULL;
-
- if((pdl = getenv("PERL_DESTRUCT_LEVEL")))
- perl_destruct_level = atoi(pdl);
-
- if(perl_destruct_level < 0) {
- MP_TRACE_g(fprintf(stderr,
- "skipping destruction of Perl interpreter\n"));
- return;
- }
-
- /* execute END blocks we suspended during perl_startup() */
- perl_run_endav("perl_shutdown");
-
- MP_TRACE_g(fprintf(stderr,
- "destructing and freeing Perl interpreter (level=%d)...",
- perl_destruct_level));
-
- perl_util_cleanup();
-
- mp_request_rec = 0;
-
- av_undef(orig_inc);
- SvREFCNT_dec((SV*)orig_inc);
- orig_inc = Nullav;
-
- av_undef(cleanup_av);
- SvREFCNT_dec((SV*)cleanup_av);
- cleanup_av = Nullav;
-
-#ifdef PERL_STACKED_HANDLERS
- hv_undef(stacked_handlers);
- SvREFCNT_dec((SV*)stacked_handlers);
- stacked_handlers = Nullhv;
-#endif
-
- perl_destruct(perl);
- perl_free(perl);
-
-#ifdef USE_THREADS
- PERL_SYS_TERM();
-#endif
-
- perl_is_running = 0;
- MP_TRACE_g(fprintf(stderr, "ok\n"));
-}
-
-request_rec *mp_fake_request_rec(server_rec *s, pool *p, char *hook)
-{
- request_rec *r = (request_rec *)pcalloc(p, sizeof(request_rec));
- r->pool = p;
- r->server = s;
- r->per_dir_config = NULL;
- r->uri = hook;
- r->notes = NULL;
- return r;
-}
-
-#ifdef PERL_RESTART
-void perl_restart_handler(server_rec *s, pool *p)
-{
- char *hook = "PerlRestartHandler";
- dSTATUS;
- dPSRV(s);
- request_rec *r = mp_fake_request_rec(s, p, hook);
- PERL_CALLBACK(hook, cls->PerlRestartHandler);
-}
-#endif
-
-void perl_restart(server_rec *s, pool *p)
-{
- /* restart as best we can */
- SV *rgy_cache = perl_get_sv("Apache::Registry", FALSE);
- HV *rgy_symtab = (HV*)gv_stashpv("Apache::ROOT", FALSE);
-
- ENTER;
-
- SAVESPTR(warnhook);
- warnhook = perl_eval_pv("sub {}", TRUE);
-
- /* the file-stat cache */
- if(rgy_cache)
- sv_setsv(rgy_cache, &sv_undef);
-
- /* the symbol table we compile registry scripts into */
- if(rgy_symtab)
- hv_clear(rgy_symtab);
-
- if(endav) {
- SvREFCNT_dec(endav);
- endav = Nullav;
- }
-
-#ifdef STACKED_HANDLERS
- if(stacked_handlers)
- hv_clear(stacked_handlers);
-#endif
-
- /* reload %INC */
- perl_reload_inc(s, p);
-
- LEAVE;
-
- /*mod_perl_notice(s, "mod_perl restarted"); */
- MP_TRACE_g(fprintf(stderr, "perl_restart: ok\n"));
-}
-
-U32 mp_debug = 0;
-
-static void mod_perl_set_cwd(void)
-{
- char *name = "Apache::Server::CWD";
- GV *gv = gv_fetchpv(name, GV_ADDMULTI, SVt_PV);
- char *pwd = getenv("PWD");
-
- if(pwd)
- sv_setpv(GvSV(gv), pwd);
- else
- sv_setsv(GvSV(gv),
- perl_eval_pv("require Cwd; Cwd::getcwd()", TRUE));
-
- mod_perl_untaint(GvSV(gv));
-}
-
-#ifdef PERL_TIE_SCRIPTNAME
-static PERL_MG_UFUNC(scriptname_val, ix, sv)
-{
- dTHR;
- request_rec *r = perl_request_rec(NULL);
- if(r)
- sv_setpv(sv, r->filename);
- else if(strNE(SvPVX(GvSV(CopFILEGV(curcop))), "-e"))
- sv_setsv(sv, GvSV(CopFILEGV(curcop)));
- else {
- SV *file = perl_eval_pv("(caller())[1]",TRUE);
- sv_setsv(sv, file);
- }
- MP_TRACE_g(fprintf(stderr, "FETCH $0 => %s\n", SvPV(sv,na)));
- return TRUE;
-}
-
-static void mod_perl_tie_scriptname(void)
-{
- SV *sv = perl_get_sv("0",TRUE);
- struct ufuncs umg;
- umg.uf_val = scriptname_val;
- umg.uf_set = NULL;
- umg.uf_index = (IV)0;
- sv_unmagic(sv, 'U');
- sv_magic(sv, Nullsv, 'U', (char*) &umg, sizeof(umg));
-}
-#else
-#define mod_perl_tie_scriptname()
-#endif
-
-#define saveINC \
- if(orig_inc) SvREFCNT_dec(orig_inc); \
- orig_inc = av_copy_array(GvAV(incgv))
-
-#define dl_librefs "DynaLoader::dl_librefs"
-#define dl_modules "DynaLoader::dl_modules"
-
-static array_header *xs_dl_librefs(pool *p)
-{
- I32 i;
- AV *librefs = perl_get_av(dl_librefs, FALSE);
- AV *modules = perl_get_av(dl_modules, FALSE);
- array_header *arr;
-
- if (!librefs) {
- MP_TRACE_g(fprintf(stderr,
- "Could not get @%s for unloading.\n",
- dl_librefs));
- return NULL;
- }
-
- arr = ap_make_array(p, AvFILL(librefs)-1, sizeof(void *));
-
- for (i=0; i<=AvFILL(librefs); i++) {
- void *handle;
- SV *handle_sv = *av_fetch(librefs, i, FALSE);
- SV *module_sv = *av_fetch(modules, i, FALSE);
-
- if(!handle_sv) {
- MP_TRACE_g(fprintf(stderr,
- "Could not fetch $%s[%d]!\n",
- dl_librefs, (int)i));
- continue;
- }
- handle = (void *)SvIV(handle_sv);
-
- MP_TRACE_g(fprintf(stderr, "%s dl handle == 0x%lx\n",
- SvPVX(module_sv), (unsigned long)handle));
- if (handle) {
- *(void **)ap_push_array(arr) = handle;
- }
- }
-
- av_clear(modules);
- av_clear(librefs);
-
- return arr;
-}
-
-static void unload_xs_so(array_header *librefs)
-{
- int i;
-
- if (!librefs) {
- return;
- }
-
- for (i=0; i < librefs->nelts; i++) {
- void *handle = ((void **)librefs->elts)[i];
- MP_TRACE_g(fprintf(stderr, "unload_xs_so: 0x%lx\n",
- (unsigned long)handle));
-#ifdef _AIX
- /* make sure Perl's dlclose is used, instead of Apache's */
- dlclose(handle);
-#else
- ap_os_dso_unload(handle);
-#endif
- }
-}
-
-static void mp_dso_unload(void *data)
-{
- array_header *librefs;
-
- librefs = xs_dl_librefs((pool *)data);
- perl_destruct_level = 2;
- perl_shutdown(NULL, NULL);
- unload_xs_so(librefs);
-}
-
-static void mp_server_notstarting(void *data)
-{
- saveINC;
- require_Apache(NULL);
- Apache__ServerStarting(FALSE);
-}
-
-#define Apache__ServerStarting_on() \
- Apache__ServerStarting(PERL_RUNNING()); \
- if(!PERL_IS_DSO) \
- register_cleanup(p, NULL, mp_server_notstarting, mod_perl_noop)
-
-#define MP_APACHE_VERSION "1.27"
-
-void mp_check_version(void)
-{
- I32 i;
- SV *namesv;
- SV *version;
- STRLEN n_a;
-
- require_Apache(NULL);
-
- if(!(version = perl_get_sv("Apache::VERSION", FALSE)))
- croak("Apache.pm failed to load!"); /*should never happen*/
- if(strEQ(SvPV(version,n_a), MP_APACHE_VERSION)) /*no worries*/
- return;
-
- fprintf(stderr, "Apache.pm version %s required!\n",
- MP_APACHE_VERSION);
- fprintf(stderr, "%s", form("%_ is version %_\n",
- *hv_fetch(GvHV(incgv), "Apache.pm", 9, FALSE),
- version));
- fprintf(stderr,
- "Perhaps you forgot to 'make install' or need to uninstall an old version?\n");
-
- namesv = NEWSV(806, 0);
- for(i=0; i<=AvFILL(GvAV(incgv)); i++) {
- char *tryname;
- PerlIO *tryrsfp = 0;
- SV *dir = *av_fetch(GvAV(incgv), i, TRUE);
- sv_setpvf(namesv, "%_/Apache.pm", dir);
- tryname = SvPVX(namesv);
- if((tryrsfp = PerlIO_open(tryname, "r"))) {
- fprintf(stderr, "Found: %s\n", tryname);
- PerlIO_close(tryrsfp);
- }
- }
- SvREFCNT_dec(namesv);
- exit(1);
-}
-
-#if !HAS_MMN_136
-static void set_sigpipe(void)
-{
- char *dargs[] = { NULL };
- perl_require_module("Apache::SIG", NULL);
- perl_call_argv("Apache::SIG::set", G_DISCARD, dargs);
-}
-#endif
-
-void perl_module_init(server_rec *s, pool *p)
-{
-#if HAS_MMN_130
- ap_add_version_component(MOD_PERL_STRING_VERSION);
- if(PERL_RUNNING()) {
-#ifdef PERL_IS_5_6
- char *version = form("Perl/v%vd", PL_patchlevel);
-#else
- char *version = form("Perl/%_", perl_get_sv("]", TRUE));
-#endif
- if(perl_get_sv("Apache::Server::AddPerlVersion", FALSE)) {
- ap_add_version_component(version);
- }
- }
-#endif
- perl_startup(s, p);
-}
-
-static void mod_perl_boot(void *data)
-{
- /* make sure DynaLoader is loaded before XSLoader
- * to workaround bug in 5.6.1 that can trigger a segv
- * when using modperl as a dso
- */
- perl_require_module("DynaLoader", NULL);
-}
-
-static void mod_perl_xs_init(pTHX)
-{
- xs_init(aTHX);
-
- /* XXX: in 5.7.2+ we can call the body of mod_perl_boot here
- * but in 5.6.1 the Perl runtime is not properly setup yet
- * so we have to pull this stunt to delay
- */
-#ifdef SAVEDESTRUCTOR_X
- SAVEDESTRUCTOR_X(mod_perl_boot, 0);
-#endif
-}
-
-void perl_startup (server_rec *s, pool *p)
-{
- char *argv[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
- char **entries, *dstr;
- int status, i, argc=1;
- dPSRV(s);
- SV *pool_rv, *server_rv;
- GV *gv, *shgv;
-
-#ifndef WIN32
- argv[0] = server_argv0;
-#endif
-
-#ifdef PERL_TRACE
- if((dstr = getenv("MOD_PERL_TRACE"))) {
- if(strEQ(dstr, "all")) {
- mp_debug = 0xffffffff;
- }
- else if (isALPHA(dstr[0])) {
- static char debopts[] = "dshgc";
- char *d;
-
- for (; *dstr && (d = strchr(debopts,*dstr)); dstr++)
- mp_debug |= 1 << (d - debopts);
- }
- else {
- mp_debug = atoi(dstr);
- }
- mp_debug |= 0x80000000;
- }
-#else
- dstr = NULL;
-#endif
-
- if(PERL_RUNNING()) {
- saveINC;
- mp_check_version();
-#if !HAS_MMN_136
- set_sigpipe();
-#endif
- }
-
- if(perl_is_running == 0) {
- /* we'll boot Perl below */
- }
- else if(perl_is_running < PERL_DONE_STARTUP) {
- /* skip the -HUP at server-startup */
- perl_is_running++;
- Apache__ServerStarting_on();
- MP_TRACE_g(fprintf(stderr, "perl_startup: perl aleady running...ok\n"));
- return;
- }
- else {
- Apache__ServerReStarting(TRUE);
-
-#ifdef PERL_RESTART
- perl_restart_handler(s, p);
-#endif
- if(cls->FreshRestart)
- perl_restart(s, p);
-
- Apache__ServerReStarting(FALSE);
-
- return;
- }
- perl_is_running++;
-
- /* fake-up what the shell usually gives perl */
- if(cls->PerlTaintCheck)
- argv[argc++] = "-T";
-
- if(cls->PerlWarn)
- argv[argc++] = "-w";
-
-#ifdef WIN32
- argv[argc++] = "nul";
-#else
- argv[argc++] = "/dev/null";
-#endif
-
- MP_TRACE_g(fprintf(stderr, "perl_parse args: "));
- for(i=1; i<argc; i++)
- MP_TRACE_g(fprintf(stderr, "'%s' ", argv[i]));
- MP_TRACE_g(fprintf(stderr, "..."));
-
-#ifdef USE_THREADS
-# ifdef PERL_SYS_INIT
- PERL_SYS_INIT(&argc,&argv);
-# endif
-#endif
-
-#ifndef perl_init_i18nl10n
- perl_init_i18nl10n(1);
-#else
- /* 5.6 calls during perl_construct() */
-#endif
-
- MP_TRACE_g(fprintf(stderr, "allocating perl interpreter..."));
- if((perl = perl_alloc()) == NULL) {
- MP_TRACE_g(fprintf(stderr, "not ok\n"));
- perror("alloc");
- exit(1);
- }
- MP_TRACE_g(fprintf(stderr, "ok\n"));
-
- MP_TRACE_g(fprintf(stderr, "constructing perl interpreter...ok\n"));
- perl_construct(perl);
-
- status = perl_parse(perl, mod_perl_xs_init, argc, argv, NULL);
- if (status != OK) {
- MP_TRACE_g(fprintf(stderr,"not ok, status=%d\n", status));
- perror("parse");
- exit(1);
- }
- MP_TRACE_g(fprintf(stderr, "ok\n"));
-
-#if (PERL_REVISION == 5) && (PERL_VERSION == 8) && (PERL_SUBVERSION == 1) && \
- (defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT))
- /* bug in 5.8.1, causing all forked procs to produce the same rand
- * sequence */
- PL_srand_called = FALSE;
-#endif
-
- perl_clear_env();
- mod_perl_pass_env(p, cls);
- mod_perl_set_cwd();
- mod_perl_tie_scriptname();
- MP_TRACE_g(fprintf(stderr, "running perl interpreter..."));
-
- pool_rv = perl_get_sv("Apache::__POOL", TRUE);
- sv_setref_pv(pool_rv, Nullch, (void*)p);
- server_rv = perl_get_sv("Apache::__SERVER", TRUE);
- sv_setref_pv(server_rv, Nullch, (void*)s);
-
- gv = GvSV_init("Apache::ERRSV_CAN_BE_HTTP");
-#ifdef ERRSV_CAN_BE_HTTP
- GvSV_setiv(gv, TRUE);
-#endif
-
- perl_tainting_set(s, cls->PerlTaintCheck);
- (void)GvSV_init("Apache::__SendHeader");
- (void)GvSV_init("Apache::__CurrentCallback");
-
- Apache__ServerReStarting(FALSE); /* just for -w */
- Apache__ServerStarting_on();
-
-#ifdef PERL_STACKED_HANDLERS
- if(!stacked_handlers) {
- stacked_handlers = newHV();
- shgv = GvHV_init("Apache::PerlStackedHandlers");
- GvHV(shgv) = stacked_handlers;
- }
-#endif
-#ifdef MULTITHREAD
- mod_perl_mutex = create_mutex(NULL);
-#endif
-
- if ((status = perl_run(perl)) != OK) {
- MP_TRACE_g(fprintf(stderr,"not ok, status=%d\n", status));
- perror("run");
- exit(1);
- }
- MP_TRACE_g(fprintf(stderr, "ok\n"));
-
- /* Force the environment to be copied out of its original location
- above argv[]. This fixes a crash caused when a module called putenv()
- before any Perl modified the environment - environ would change to a
- new value, and the check in my_setenv() to duplicate the environment
- would fail, and then setting some environment value which had a previous
- value would cause perl to try to free() something from the original env.
- This crashed free(). */
- my_setenv("MODPERL_ENV_FIXUP", "0");
- my_setenv("MODPERL_ENV_FIXUP", NULL);
-
- {
- dTHR;
- TAINT_NOT; /* At this time all is safe */
- }
-
-#ifdef MOD_PERL_PREFIX
- av_unshift(GvAV(incgv),1);
- av_store(GvAV(incgv), 0, newSVpv(MOD_PERL_PREFIX,0));
-#endif
-
-#ifdef APACHE_PERL5LIB
- perl_inc_unshift(APACHE_PERL5LIB);
-#else
- av_push(GvAV(incgv), newSVpv(server_root_relative(p,""),0));
- av_push(GvAV(incgv), newSVpv(server_root_relative(p,"lib/perl"),0));
-#endif
-
- /* *CORE::GLOBAL::exit = \&Apache::exit */
- if(gv_stashpv("CORE::GLOBAL", FALSE)) {
- GV *exitgp = gv_fetchpv("CORE::GLOBAL::exit", TRUE, SVt_PVCV);
- GvCV(exitgp) = perl_get_cv("Apache::exit", TRUE);
- GvIMPORTED_CV_on(exitgp);
- }
-
- ENTER_SAFE(s,p);
- MP_TRACE_g(mod_perl_dump_opmask());
-
- entries = (char **)cls->PerlRequire->elts;
- for(i = 0; i < cls->PerlRequire->nelts; i++) {
- if(perl_load_startup_script(s, p, entries[i], TRUE) != OK) {
- fprintf(stderr, "Require of Perl file `%s' failed, exiting...\n",
- entries[i]);
- exit(1);
- }
- }
-
- entries = (char **)cls->PerlModule->elts;
- for(i = 0; i < cls->PerlModule->nelts; i++) {
- if(perl_require_module(entries[i], s) != OK) {
- fprintf(stderr, "Can't load Perl module `%s', exiting...\n",
- entries[i]);
- exit(1);
- }
- }
-
- LEAVE_SAFE;
-
- MP_TRACE_g(fprintf(stderr,
- "mod_perl: %d END blocks encountered during server startup\n",
- endav ? (int)AvFILL(endav)+1 : 0));
-#if MODULE_MAGIC_NUMBER < 19970728
- if(endav)
- MP_TRACE_g(fprintf(stderr, "mod_perl: cannot run END blocks encoutered at server startup without apache_1.3.0+\n"));
-#endif
-
- saveINC;
-
- if (PERL_IS_DSO) {
- register_cleanup(p, p, mp_dso_unload, null_cleanup);
- }
-}
-
-int mod_perl_sent_header(request_rec *r, int val)
-{
- dPPDIR;
-
- if (val == DONE) {
- val = r->assbackwards = 1; /* so apache does not send another header */
- }
- if(val) MP_SENTHDR_on(cld);
- val = MP_SENTHDR(cld) ? 1 : 0;
- return MP_SENDHDR(cld) ? val : 1;
-}
-
-#ifndef perl_init_ids
-#define perl_init_ids mod_perl_init_ids()
-#endif
-
-int perl_handler(request_rec *r)
-{
- dSTATUS;
- dPPDIR;
- dPPREQ;
- dTHR;
- GV *gv;
-
-#ifdef USE_ITHREADS
- dTHX;
-
- if (!aTHX) {
- PERL_SET_CONTEXT(perl);
- }
-#endif
-
- (void)acquire_mutex(mod_perl_mutex);
-
- gv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
-
-
-#if 0
- /* force 'PerlSendHeader On' for sub-requests
- * e.g. Apache::Sandwich
- */
- if(r->main != NULL)
- MP_SENDHDR_on(cld);
-#endif
-
- if(MP_SENDHDR(cld))
- MP_SENTHDR_off(cld);
-
- (void)perl_request_rec(r);
-
- MP_TRACE_g(fprintf(stderr, "perl_handler ENTER: SVs = %5d, OBJs = %5d\n",
- (int)sv_count, (int)sv_objcount));
- ENTER;
- SAVETMPS;
-
- if (gv) {
- save_hptr(&GvHV(gv));
- }
-
- if (endav) {
- save_aptr(&endav);
- endav = Nullav;
- }
-
- /* hookup STDIN & STDOUT to the client */
- perl_stdout2client(r);
- perl_stdin2client(r);
-
- if(!cfg) {
- cfg = perl_create_request_config(r->pool, r->server);
- set_module_config(r->request_config, &perl_module, cfg);
- }
-
- cfg->setup_env = 1;
- PERL_CALLBACK("PerlHandler", cld->PerlHandler);
- cfg->setup_env = 0;
-
- FREETMPS;
- LEAVE;
- MP_TRACE_g(fprintf(stderr, "perl_handler LEAVE: SVs = %5d, OBJs = %5d\n",
- (int)sv_count, (int)sv_objcount));
-
- if (r->prev && (r->prev->status != HTTP_OK) &&
- mod_perl_sent_header(r, 0))
- {
- /* avoid recursive error for ErrorDocuments */
- status = OK;
- }
-
- (void)release_mutex(mod_perl_mutex);
- return status;
-}
-
-#ifdef PERL_CHILD_INIT
-
-typedef struct {
- server_rec *server;
- pool *pool;
-} server_hook_args;
-
-static void perl_child_exit_cleanup(void *data)
-{
- server_hook_args *args = (server_hook_args *)data;
- PERL_CHILD_EXIT_HOOK(args->server, args->pool);
-}
-
-void PERL_CHILD_INIT_HOOK(server_rec *s, pool *p)
-{
- char *hook = "PerlChildInitHandler";
- dSTATUS;
- dPSRV(s);
- request_rec *r = mp_fake_request_rec(s, p, hook);
- server_hook_args *args =
- (server_hook_args *)palloc(p, sizeof(server_hook_args));
-
- args->server = s;
- args->pool = p;
- register_cleanup(p, args, perl_child_exit_cleanup, null_cleanup);
-
- mod_perl_init_ids();
- Apache__ServerStarting(FALSE);
- PERL_CALLBACK(hook, cls->PerlChildInitHandler);
-}
-#endif
-
-#ifdef PERL_CHILD_EXIT
-void PERL_CHILD_EXIT_HOOK(server_rec *s, pool *p)
-{
- char *hook = "PerlChildExitHandler";
- dSTATUS;
- dPSRV(s);
- request_rec *r = mp_fake_request_rec(s, p, hook);
-
- PERL_CALLBACK(hook, cls->PerlChildExitHandler);
-
- perl_shutdown(s,p);
-}
-#endif
-
-static int do_proxy (request_rec *r)
-{
- return r->parsed_uri.scheme &&
- !(r->parsed_uri.hostname
- && strEQ(r->parsed_uri.scheme, ap_http_method(r))
- && ap_matches_request_vhost(r, r->parsed_uri.hostname,
- r->parsed_uri.port_str ?
- r->parsed_uri.port :
- ap_default_port(r)));
-}
-
-#ifdef PERL_POST_READ_REQUEST
-int PERL_POST_READ_REQUEST_HOOK(request_rec *r)
-{
- dSTATUS;
- dPSRV(r->server);
-#ifdef PERL_TRANS
-#if MODULE_MAGIC_NUMBER > 19980270
- if (cls->PerlTransHandler && do_proxy(r)) {
- r->proxyreq = 1;
- r->uri = r->unparsed_uri;
- }
-#endif
-#endif
-#ifdef PERL_INIT
- PERL_CALLBACK("PerlInitHandler", cls->PerlInitHandler);
-#endif
- PERL_CALLBACK("PerlPostReadRequestHandler", cls->PerlPostReadRequestHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_TRANS
-int PERL_TRANS_HOOK(request_rec *r)
-{
- dSTATUS;
- dPSRV(r->server);
- PERL_CALLBACK("PerlTransHandler", cls->PerlTransHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_HEADER_PARSER
-int PERL_HEADER_PARSER_HOOK(request_rec *r)
-{
- dSTATUS;
- dPPDIR;
-#ifdef PERL_INIT
- PERL_CALLBACK("PerlInitHandler",
- cld->PerlInitHandler);
-#endif
- PERL_CALLBACK("PerlHeaderParserHandler",
- cld->PerlHeaderParserHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_AUTHEN
-int PERL_AUTHEN_HOOK(request_rec *r)
-{
- dSTATUS;
- dPPDIR;
- PERL_CALLBACK("PerlAuthenHandler", cld->PerlAuthenHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_AUTHZ
-int PERL_AUTHZ_HOOK(request_rec *r)
-{
- dSTATUS;
- dPPDIR;
- PERL_CALLBACK("PerlAuthzHandler", cld->PerlAuthzHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_ACCESS
-int PERL_ACCESS_HOOK(request_rec *r)
-{
- dSTATUS;
- dPPDIR;
- PERL_CALLBACK("PerlAccessHandler", cld->PerlAccessHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_TYPE
-int PERL_TYPE_HOOK(request_rec *r)
-{
- dSTATUS;
- dPPDIR;
- PERL_CALLBACK("PerlTypeHandler", cld->PerlTypeHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_FIXUP
-int PERL_FIXUP_HOOK(request_rec *r)
-{
- dSTATUS;
- dPPDIR;
- PERL_CALLBACK("PerlFixupHandler", cld->PerlFixupHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_LOG
-int PERL_LOG_HOOK(request_rec *r)
-{
- dSTATUS;
- dPPDIR;
- PERL_CALLBACK("PerlLogHandler", cld->PerlLogHandler);
- return status;
-}
-#endif
-
-#ifdef PERL_STACKED_HANDLERS
-#define CleanupHandler \
-((cld->PerlCleanupHandler && SvREFCNT(cld->PerlCleanupHandler)) ? cld->PerlCleanupHandler : Nullav)
-#else
-#define CleanupHandler cld->PerlCleanupHandler
-#endif
-
-#ifdef PERL_TRACE
-static char *my_signame(I32 num)
-{
-#ifdef psig_name
- return Perl_psig_name[num] ?
- SvPV(Perl_psig_name[num],na) : "?";
-#else
- return PL_sig_name[num];
-#endif
-}
-
-#endif
-
-static void per_request_cleanup(request_rec *r)
-{
- dPPREQ;
-
-#ifndef WIN32
- perl_request_sigsave **sigs;
- int i;
-#endif
-
- if(!cfg) {
- return;
- }
- if(cfg->pnotes) {
- hv_clear(cfg->pnotes);
- SvREFCNT_dec(cfg->pnotes);
- cfg->pnotes = Nullhv;
- }
-
-#ifndef WIN32
- sigs = (perl_request_sigsave **)cfg->sigsave->elts;
- for (i=0; i < cfg->sigsave->nelts; i++) {
- MP_TRACE_g(fprintf(stderr,
- "mod_perl: restoring SIG%s (%d) handler from: 0x%lx to: 0x%lx\n",
- my_signame(sigs[i]->signo), (int)sigs[i]->signo,
- (unsigned long)rsignal_state(sigs[i]->signo),
- (unsigned long)sigs[i]->h));
- rsignal(sigs[i]->signo, sigs[i]->h);
- }
-#endif
-}
-
-void mod_perl_end_cleanup(void *data)
-{
- request_rec *r = (request_rec *)data;
- dSTATUS;
- dPPDIR;
-
-#ifdef PERL_CLEANUP
- PERL_CALLBACK("PerlCleanupHandler", CleanupHandler);
-#endif
-
- MP_TRACE_g(fprintf(stderr, "perl_end_cleanup..."));
- perl_run_rgy_endav(r->uri);
- per_request_cleanup(r);
-
- /* clear %ENV */
- perl_clear_env();
-
- /* reset @INC */
- av_undef(GvAV(incgv));
- SvREFCNT_dec(GvAV(incgv));
- GvAV(incgv) = Nullav;
- GvAV(incgv) = av_copy_array(orig_inc);
-
- /* reset $/ */
- sv_setpvn(GvSV(gv_fetchpv("/", TRUE, SVt_PV)), "\n", 1);
-
- {
- dTHR;
- /* %@ */
- hv_clear(ERRHV);
- }
-
- callbacks_this_request = 0;
-
-#ifdef PERL_STACKED_HANDLERS
- /* reset Apache->push_handlers, but don't clear ExitHandler */
-#define CH_EXIT_KEY "PerlChildExitHandler"
- {
- SV *exith = Nullsv;
- if(hv_exists(stacked_handlers, CH_EXIT_KEY, 20)) {
- exith = *hv_fetch(stacked_handlers, CH_EXIT_KEY, 20, FALSE);
- /* inc the refcnt since hv_clear will dec it */
- ++SvREFCNT(exith);
- }
- hv_clear(stacked_handlers);
- if(exith)
- hv_store(stacked_handlers, CH_EXIT_KEY, 20, exith, FALSE);
- }
-
-#endif
-
-#ifdef USE_SFIO
- PerlIO_flush(PerlIO_stdout());
-#endif
-
- MP_TRACE_g(fprintf(stderr, "ok\n"));
- (void)release_mutex(mod_perl_mutex);
-}
-
-void mod_perl_cleanup_handler(void *data)
-{
- request_rec *r = (request_rec *)data;
- SV *cv;
- I32 i;
- dPPDIR;
-
- (void)acquire_mutex(mod_perl_mutex);
- MP_TRACE_h(fprintf(stderr, "running registered cleanup handlers...\n"));
- for(i=0; i<=AvFILL(cleanup_av); i++) {
- cv = *av_fetch(cleanup_av, i, 0);
- MARK_WHERE("registered cleanup", cv);
- perl_call_handler(cv, (request_rec *)r, Nullav);
- UNMARK_WHERE;
- }
- av_clear(cleanup_av);
-#ifndef WIN32
- if(cld) MP_RCLEANUP_off(cld);
-#endif
- (void)release_mutex(mod_perl_mutex);
-}
-
-#ifdef PERL_METHOD_HANDLERS
-int perl_handler_ismethod(HV *pclass, char *sub)
-{
- CV *cv;
- HV *stash;
- GV *gv;
- SV *sv;
- int is_method=0;
-
- if(!sub) return 0;
- sv = newSVpv(sub,0);
- if(!(cv = sv_2cv(sv, &stash, &gv, FALSE))) {
- GV *gvp = gv_fetchmethod(pclass, sub);
- if (gvp) cv = GvCV(gvp);
- }
-
-#ifdef CVf_METHOD
- if (cv && (CvFLAGS(cv) & CVf_METHOD)) {
- is_method = 1;
- }
-#endif
- if (!is_method && (cv && SvPOK(cv))) {
- is_method = strnEQ(SvPVX(cv), "$$", 2);
- }
-
- MP_TRACE_h(fprintf(stderr, "checking if `%s' is a method...%s\n",
- sub, (is_method ? "yes" : "no")));
- SvREFCNT_dec(sv);
- return is_method;
-}
-#endif
-
-void mod_perl_noop(void *data) {}
-
-void mod_perl_register_cleanup(request_rec *r, SV *sv)
-{
- dPPDIR;
-
- if(!MP_RCLEANUP(cld)) {
- (void)perl_request_rec(r);
- register_cleanup(r->pool, (void*)r,
- mod_perl_cleanup_handler, mod_perl_noop);
- MP_RCLEANUP_on(cld);
- if(cleanup_av == Nullav) cleanup_av = newAV();
- }
- MP_TRACE_h(fprintf(stderr, "registering PerlCleanupHandler\n"));
-
- ++SvREFCNT(sv); av_push(cleanup_av, sv);
-}
-
-#ifdef PERL_STACKED_HANDLERS
-
-int mod_perl_push_handlers(SV *self, char *hook, SV *sub, AV *handlers)
-{
- int do_store=0, len=strlen(hook);
- SV **svp;
-
- if(self && SvTRUE(sub)) {
- if(handlers == Nullav) {
- svp = hv_fetch(stacked_handlers, hook, len, 0);
- MP_TRACE_h(fprintf(stderr, "fetching %s stack\n", hook));
- if(svp && SvTRUE(*svp) && SvROK(*svp)) {
- handlers = (AV*)SvRV(*svp);
- }
- else {
- MP_TRACE_h(fprintf(stderr, "%s handlers stack undef, creating\n", hook));
- handlers = newAV();
- do_store = 1;
- }
- }
-
- if(SvROK(sub) && (SvTYPE(SvRV(sub)) == SVt_PVCV)) {
- MP_TRACE_h(fprintf(stderr, "pushing CODE ref into `%s' handlers\n", hook));
- }
- else if(SvPOK(sub)) {
- if(do_store) {
- MP_TRACE_h(fprintf(stderr,
- "pushing `%s' into `%s' handlers\n",
- SvPV(sub,na), hook));
- }
- else {
- MP_TRACE_d(fprintf(stderr,
- "pushing `%s' into `%s' handlers\n",
- SvPV(sub,na), hook));
- }
- }
- else {
- warn("mod_perl_push_handlers: Not a subroutine name or CODE reference!");
- }
-
- ++SvREFCNT(sub); av_push(handlers, sub);
-
- if(do_store)
- hv_store(stacked_handlers, hook, len,
- (SV*)newRV_noinc((SV*)handlers), 0);
- return 1;
- }
- return 0;
-}
-
-int perl_run_stacked_handlers(char *hook, request_rec *r, AV *handlers)
-{
- dSTATUS;
- I32 i, do_clear=FALSE;
- SV *sub, **svp;
- int hook_len = strlen(hook);
-
-#ifdef USE_ITHREADS
- dTHX;
-
- if (!aTHX) {
- PERL_SET_CONTEXT(perl);
- }
-#endif
-
- if(handlers == Nullav) {
- if(hv_exists(stacked_handlers, hook, hook_len)) {
- svp = hv_fetch(stacked_handlers, hook, hook_len, 0);
- if(svp && SvROK(*svp))
- handlers = (AV*)SvRV(*svp);
- }
- else {
- MP_TRACE_h(fprintf(stderr, "`%s' push_handlers() stack is empty\n", hook));
- return NO_HANDLERS;
- }
- do_clear = TRUE;
- MP_TRACE_h(fprintf(stderr,
- "running %d pushed (stacked) handlers for %s...\n",
- (int)AvFILL(handlers)+1, r->uri));
- }
- else {
-#ifdef PERL_STACKED_HANDLERS
- /* XXX: bizarre,
- I only see this with httpd.conf.pl and PerlAccessHandler */
- if(SvTYPE((SV*)handlers) != SVt_PVAV) {
-#if MODULE_MAGIC_NUMBER > 19970909
- aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r->server,
-#else
- fprintf(stderr,
-#endif
- "[warning] %s stack is not an ARRAY!\n", hook);
- sv_dump((SV*)handlers);
- return DECLINED;
- }
-#endif
- MP_TRACE_h(fprintf(stderr,
- "running %d server configured stacked handlers for %s...\n",
- (int)AvFILL(handlers)+1, r->uri));
- }
- for(i=0; i<=AvFILL(handlers); i++) {
- MP_TRACE_h(fprintf(stderr, "calling &{%s->[%d]} (%d total)\n",
- hook, (int)i, (int)AvFILL(handlers)+1));
-
- if(!(sub = *av_fetch(handlers, i, FALSE))) {
- MP_TRACE_h(fprintf(stderr, "sub not defined!\n"));
- }
- else {
- if(!SvTRUE(sub)) {
- MP_TRACE_h(fprintf(stderr, "sub undef! skipping callback...\n"));
- continue;
- }
-
- MARK_WHERE(hook, sub);
- status = perl_call_handler(sub, r, Nullav);
- UNMARK_WHERE;
- MP_TRACE_h(fprintf(stderr, "&{%s->[%d]} returned status=%d\n",
- hook, (int)i, status));
- if((status != OK) && (status != DECLINED)) {
- if(do_clear)
- av_clear(handlers);
- return status;
- }
- }
- }
- if(do_clear)
- av_clear(handlers);
- return status;
-}
-
-#endif /* PERL_STACKED_HANDLERS */
-
-/* things to do once per-request */
-void perl_per_request_init(request_rec *r)
-{
- dPPDIR;
- dPPREQ;
-
- /* PerlSendHeader */
- if(MP_SENDHDR(cld)) {
- MP_SENTHDR_off(cld);
- table_set(r->subprocess_env,
- "PERL_SEND_HEADER", "On");
- }
- else
- MP_SENTHDR_on(cld);
-
- if(!cfg) {
- cfg = perl_create_request_config(r->pool, r->server);
- set_module_config(r->request_config, &perl_module, cfg);
- }
- else if (cfg->setup_env && MP_ENV(cld)) {
- perl_setup_env(r);
- cfg->setup_env = 0; /* just once per-request */
- }
-
- if (cfg->dir_env != cld->env) {
- /* PerlSetEnv
- * update only if the table changes across a request
- */
- MP_HASENV_on(cld);
- mod_perl_dir_env(r, cld);
- cfg->dir_env = cld->env;
- }
-
- if(callbacks_this_request++ > 0) return;
-
- if (!r->main) {
- /* so Apache->request will work before PerlHandler with CGI.pm
- * XXX: triggers core dump in subrequests,
- * so just do in the main request for now
- */
- (void)perl_request_rec(r);
- }
-
- /* SetEnv PERL5LIB */
- if (!MP_INCPUSH(cld)) {
- char *path = (char *)table_get(r->subprocess_env, "PERL5LIB");
-
- if (path) {
- perl_inc_unshift(path);
- MP_INCPUSH_on(cld);
- }
- }
-
- {
- dPSRV(r->server);
- mod_perl_pass_env(r->pool, cls);
- }
- mod_perl_tie_scriptname();
- /* will be released in mod_perl_end_cleanup */
- (void)acquire_mutex(mod_perl_mutex);
- register_cleanup(r->pool, (void*)r, mod_perl_end_cleanup, mod_perl_noop);
-
-#ifdef WIN32
- sv_setpvf(perl_get_sv("Apache::CurrentThreadId", TRUE), "0x%lx",
- (unsigned long)GetCurrentThreadId());
-#endif
-
- /* hookup stderr to error_log */
-#ifndef PERL_TRACE
- if(r->server->error_log)
- error_log2stderr(r->server);
-#endif
-
- seqno++;
- MP_TRACE_g(fprintf(stderr, "mod_perl: inc seqno to %d for %s\n", seqno, r->uri));
- seqno_check_max(r, seqno);
-
- /* set $$, $>, etc., if 1.3a1+, this really happens during child_init */
- perl_init_ids;
-}
-
-/* XXX this still needs work, getting there... */
-int perl_call_handler(SV *sv, request_rec *r, AV *args)
-{
- int count, status, is_method=0;
- dSP;
- perl_dir_config *cld = NULL;
- HV *stash = Nullhv;
- SV *pclass = newSVsv(sv), *dispsv = Nullsv;
- CV *cv = Nullcv;
- char *method = "handler";
- int defined_sub = 0, anon = 0;
- char *dispatcher = NULL;
-
- if(r->per_dir_config)
- cld = (perl_dir_config *) get_module_config(r->per_dir_config, &perl_module);
-
-#ifdef PERL_DISPATCH
- if(cld && (dispatcher = cld->PerlDispatchHandler)) {
- if(!(dispsv = (SV*)perl_get_cv(dispatcher, FALSE))) {
- if(strlen(dispatcher) > 0) { /* XXX */
- fprintf(stderr,
- "mod_perl: unable to fetch PerlDispatchHandler `%s'\n",
- dispatcher);
- }
- dispatcher = NULL;
- }
- }
-#endif
-
- if(r->per_dir_config)
- perl_per_request_init(r);
-
- if(!dispatcher && (SvTYPE(sv) == SVt_PV)) {
- char *imp = pstrdup(r->pool, (char *)SvPV(pclass,na));
-
- if((anon = strnEQ(imp,"sub ",4))) {
- sv = perl_eval_pv(imp, FALSE);
- MP_TRACE_h(fprintf(stderr, "perl_call: caching CV pointer to `__ANON__'\n"));
- defined_sub++;
- goto callback; /* XXX, I swear I've never used goto before! */
- }
-
-
-#ifdef PERL_METHOD_HANDLERS
- {
- char *end_pclass = NULL;
-
- if ((end_pclass = strstr(imp, "->"))) {
- end_pclass[0] = '\0';
- if(pclass)
- SvREFCNT_dec(pclass);
- pclass = newSVpv(imp, 0);
- end_pclass[0] = ':';
- end_pclass[1] = ':';
- method = &end_pclass[2];
- imp = method;
- ++is_method;
- }
- }
-
- if(*SvPVX(pclass) == '$') {
- SV *obj = perl_eval_pv(SvPVX(pclass), TRUE);
- if(SvROK(obj) && sv_isobject(obj)) {
- MP_TRACE_h(fprintf(stderr, "handler object %s isa %s\n",
- SvPVX(pclass), HvNAME(SvSTASH((SV*)SvRV(obj)))));
- SvREFCNT_dec(pclass);
- pclass = obj;
- ++SvREFCNT(pclass); /* this will _dec later */
- stash = SvSTASH((SV*)SvRV(pclass));
- }
- }
-
- if(pclass && !stash) stash = gv_stashpv(SvPV(pclass,na),FALSE);
-
-#if 0
- MP_TRACE_h(fprintf(stderr, "perl_call: pclass=`%s'\n", SvPV(pclass,na)));
- MP_TRACE_h(fprintf(stderr, "perl_call: imp=`%s'\n", imp));
- MP_TRACE_h(fprintf(stderr, "perl_call: method=`%s'\n", method));
- MP_TRACE_h(fprintf(stderr, "perl_call: stash=`%s'\n",
- stash ? HvNAME(stash) : "unknown"));
-#endif
-
-#else
- method = NULL; /* avoid warning */
-#endif
-
-
- /* if a Perl*Handler is not a defined function name,
- * default to the class implementor's handler() function
- * attempt to load the class module if it is not already
- */
- if(!imp) imp = SvPV(sv,na);
- if(!stash) stash = gv_stashpv(imp,FALSE);
- if(!is_method)
- defined_sub = (cv = perl_get_cv(imp, FALSE)) ? TRUE : FALSE;
-#ifdef PERL_METHOD_HANDLERS
- if(!defined_sub && stash) {
- GV *gvp;
- MP_TRACE_h(fprintf(stderr,
- "perl_call: trying method lookup on `%s' in class `%s'...",
- method, HvNAME(stash)));
- /* XXX Perl caches method lookups internally,
- * should we cache this lookup?
- */
- if((gvp = gv_fetchmethod(stash, method))) {
- cv = GvCV(gvp);
- MP_TRACE_h(fprintf(stderr, "found\n"));
- is_method = perl_handler_ismethod(stash, method);
- }
- else {
- MP_TRACE_h(fprintf(stderr, "not found\n"));
- }
- }
-#endif
-
- if(!stash && !defined_sub) {
- MP_TRACE_h(fprintf(stderr, "%s symbol table not found, loading...\n", imp));
- if(perl_require_module(imp, r->server) == OK)
- stash = gv_stashpv(imp,FALSE);
-#ifdef PERL_METHOD_HANDLERS
- if(stash) /* check again */
- is_method = perl_handler_ismethod(stash, method);
-#endif
- SPAGAIN; /* reset stack pointer after require() */
- }
-
- if(!is_method && !defined_sub) {
- MP_TRACE_h(fprintf(stderr,
- "perl_call: defaulting to %s::handler\n", imp));
- sv_catpv(sv, "::handler");
- }
-
-#if 0 /* XXX: CV lookup cache disabled for now */
- if(!is_method && defined_sub) { /* cache it */
- MP_TRACE_h(fprintf(stderr,
- "perl_call: caching CV pointer to `%s'\n",
- (anon ? "__ANON__" : SvPV(sv,na))));
- SvREFCNT_dec(sv);
- sv = (SV*)newRV((SV*)cv); /* let newRV inc the refcnt */
- }
-#endif
- }
- else {
- MP_TRACE_h(fprintf(stderr, "perl_call: handler is a %s\n",
- dispatcher ? "dispatcher" : "cached CV"));
- }
-
-callback:
- ENTER;
- SAVETMPS;
- PUSHMARK(sp);
-#ifdef PERL_METHOD_HANDLERS
- if(is_method)
- XPUSHs(sv_2mortal(pclass));
- else
- SvREFCNT_dec(pclass);
-#else
- SvREFCNT_dec(pclass);
-#endif
-
- XPUSHs((SV*)perl_bless_request_rec(r));
-
- if(dispatcher) {
- MP_TRACE_h(fprintf(stderr,
- "mod_perl: handing off to PerlDispatchHandler `%s'\n",
- dispatcher));
- /*XPUSHs(sv_mortalcopy(sv));*/
- XPUSHs(sv);
- sv = dispsv;
- }
-
- {
- I32 i, len = (args ? AvFILL(args) : 0);
-
- if(args) {
- EXTEND(sp, len);
- for(i=0; i<=len; i++)
- PUSHs(sv_2mortal(*av_fetch(args, i, FALSE)));
- }
- }
- PUTBACK;
-
- /* use G_EVAL so we can trap errors */
-#ifdef PERL_METHOD_HANDLERS
- if(is_method)
- count = perl_call_method(method, G_EVAL | G_SCALAR);
- else
-#endif
- count = perl_call_sv(sv, G_EVAL | G_SCALAR);
-
- SPAGAIN;
-
- if ((status = perl_eval_ok(r->server)) != OK) {
- dTHRCTX;
- if (status == SERVER_ERROR) {
- MP_STORE_ERROR(r->uri, ERRSV);
- if (r->notes) {
- ap_table_set(r->notes, "error-notes", SvPVX(ERRSV));
- }
- }
- else if (status == DECLINED) {
- status = r->status == 200 ? OK : r->status;
- }
- }
- else if(count != 1) {
- mod_perl_error(r->server,
- "perl_call did not return a status arg, assuming OK");
- status = OK;
- }
- else {
- status = POPi;
-
- if((status == 1) || (status == 200) || (status > 600))
- status = OK;
-
- if((status == SERVER_ERROR) && ERRSV_CAN_BE_HTTP) {
- SV *errsv = Nullsv;
- if(MP_EXISTS_ERROR(r->uri) && (errsv = MP_FETCH_ERROR(r->uri))) {
- (void)perl_sv_is_http_code(errsv, &status);
- }
- }
- }
-
- PUTBACK;
- FREETMPS;
- LEAVE;
- MP_TRACE_g(fprintf(stderr, "perl_call_handler: SVs = %5d, OBJs = %5d\n",
- (int)sv_count, (int)sv_objcount));
-
- {
- dTHRCTX;
- if(SvMAGICAL(ERRSV))
- sv_unmagic(ERRSV, 'U'); /* Apache::exit was called */
- }
-
- return status;
-}
-
-request_rec *perl_request_rec(request_rec *r)
-{
- if(r != NULL) {
- mp_request_rec = (IV)r;
- return NULL;
- }
- else
- return (request_rec *)mp_request_rec;
-}
-
-SV *perl_bless_request_rec(request_rec *r)
-{
- SV *sv = sv_newmortal();
- sv_setref_pv(sv, "Apache", (void*)r);
- MP_TRACE_g(fprintf(stderr, "blessing request_rec=(0x%lx)\n",
- (unsigned long)r));
- return sv;
-}
-
-void perl_setup_env(request_rec *r)
-{
- int i;
- array_header *arr = perl_cgi_env_init(r);
- table_entry *elts = (table_entry *)arr->elts;
-
- for (i = 0; i < arr->nelts; ++i) {
- if (!elts[i].key || !elts[i].val) continue;
- mp_setenv(elts[i].key, elts[i].val);
- }
- MP_TRACE_g(fprintf(stderr, "perl_setup_env...%d keys\n", i));
-}
-
-int mod_perl_seqno(SV *self, int inc)
-{
- self = self; /*avoid warning*/
- if(inc) seqno += inc;
- return seqno;
-}
-
diff --git a/tags/v1_29/src/modules/perl/mod_perl.h b/tags/v1_29/src/modules/perl/mod_perl.h
deleted file mode 100644
index 1e8087c..0000000
--- a/tags/v1_29/src/modules/perl/mod_perl.h
+++ /dev/null
@@ -1,1317 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1996-2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
-
-#ifdef WIN32
-#define NO_PERL_CHILD_INIT
-#define NO_PERL_CHILD_EXIT
-#ifdef JW_PERL_OBJECT
-#include <winsock2.h>
-#include <malloc.h>
-#include <win32.h>
-#include <win32iop.h>
-#include <fcntl.h> // For O_BINARY
-#include "EXTERN.h"
-#include "perl.h"
-#include <iperlsys.h>
-#else
-#include "dirent.h"
-#endif
-#endif
-
-#ifndef IS_MODULE
-#define IS_MODULE
-#endif
-#ifndef SHARED_MODULE
-#define SHARED_MODULE
-#endif
-
-#ifdef PERL_THREADS
-#include "apache_inc.h"
-#define _INCLUDE_APACHE_FIRST
-#endif
-
-#include "EXTERN.h"
-#include "perl.h"
-#ifdef PERL_OBJECT
-#define NO_XSLOCKS
-#endif
-#include "XSUB.h"
-
-#ifndef MOD_PERL_STRING_VERSION
-#include "mod_perl_version.h"
-#endif
-#ifndef MOD_PERL_VERSION
-#define MOD_PERL_VERSION "TRUE"
-#endif
-
-/* patchlevel.h causes a -Wall warning,
- * plus chance that another patchlevel.h might be in -I paths
- * so try to avoid it if possible
- */
-#ifdef PERLV
-#if PERLV >= 500476
-#include "perl_PL.h"
-#endif
-#else
-#define PERL_PATCHLEVEL_H_IMPLICIT /* ignore local_patches */
-#include "patchlevel.h"
-#undef PERL_PATCHLEVEL_H_IMPLICIT
-#ifndef PATCHLEVEL
-#define PATCHLEVEL PERL_VERSION
-#undef SUBVERSION
-#define SUBVERSION PERL_SUBVERSION
-#endif
-
-#if ((PATCHLEVEL >= 4) && (SUBVERSION >= 76)) || (PATCHLEVEL >= 5)
-#include "perl_PL.h"
-#endif
-#endif /*PERLV*/
-
-#ifdef PERL_OBJECT
-#include <perlhost.h>
-#include "win32iop.h"
-#include <fcntl.h>
-
-#define PerlInterpreter CPerlHost
-
-#define perl_alloc() perl->PerlCreate() ? perl : NULL
-
-#define perl_parse(host, xsi, argc, argv, env) \
- host->PerlParse(xsi, argc, argv, env);
-
-#define perl_run(host) \
- host->PerlRun()
-
-#define perl_destruct(host) \
- host->PerlDestroy()
-
-#define perl_free(host)
-#endif
-
-/* perl hides it's symbols in libperl when these macros are
- * expanded to Perl_foo
- * but some cause conflict when expanded in other headers files
- */
-#undef S_ISREG
-#undef DIR
-#undef VOIDUSED
-#undef pregexec
-#undef pregfree
-#undef pregcomp
-#undef setregid
-#undef setreuid
-#undef sync
-#undef my_memcmp
-#undef my_bcopy
-#undef my_memset
-#undef RETURN
-#undef die
-#undef __attribute__
-
-#ifdef pTHX_
-#define PERL_IS_5_6
-#endif
-
-#ifndef _INCLUDE_APACHE_FIRST
-#include "apache_inc.h"
-#endif
-
-#ifndef PERL_IS_5_6
-#define pTHX_
-#define aTHXo_
-#define aTHX
-#define pTHX
-#define CopFILEGV(cop) cop->cop_filegv
-#define CopLINE(cop) cop->cop_line
-#define CopLINE_set(c,l) (CopLINE(c) = (l))
-#define SAVECOPFILE(cop) SAVESPTR(CopFILEGV(curcop));
-#define SAVECOPLINE(cop) SAVEI16(CopLINE(cop))
-#endif
-
-#ifdef USE_5005THREADS
-#define dTHRCTX struct perl_thread *thr = PERL_GET_CONTEXT
-#else
-#define dTHRCTX
-#endif
-
-#ifndef dTHR
-#define dTHR extern int errno
-#endif
-
-#ifndef ERRSV
-#define ERRSV GvSV(errgv)
-#endif
-
-#ifndef ERRHV
-#define ERRHV GvHV(errgv)
-#endif
-
-#ifndef AvFILLp
-#define AvFILLp(av) ((XPVAV*) SvANY(av))->xav_fill
-#endif
-
-#ifndef PERL_MG_UFUNC
-#define PERL_MG_UFUNC(name,ix,sv) I32 name(IV ix, SV *sv)
-#endif
-
-#ifdef eval_pv
-# ifndef perl_eval_pv
-# define perl_eval_pv eval_pv
-# endif
-#endif
-#ifdef eval_sv
-# ifndef perl_eval_sv
-# define perl_eval_sv eval_sv
-# endif
-#endif
-
-#define MP_EXISTS_ERROR(k) \
-ERRHV && hv_exists(ERRHV, k, strlen(k))
-
-#define MP_STORE_ERROR(k,v) \
-hv_store(ERRHV, k, strlen(k), newSVsv(v), FALSE)
-
-#define MP_FETCH_ERROR(k) \
-*hv_fetch(ERRHV, k, strlen(k), FALSE)
-
-#define MP_CLEAR_ERROR(k) \
-(void)hv_delete(ERRHV, k, strlen(k), G_DISCARD)
-
-
-#ifndef PERL_AUTOPRELOAD
-#define PERL_AUTOPRELOAD perl_get_sv("Apache::Server::AutoPreLoad", FALSE)
-#endif
-
-#ifndef ERRSV_CAN_BE_HTTP
-# ifdef WIN32
-# define ERRSV_CAN_BE_HTTP perl_get_sv("Apache::ERRSV_CAN_BE_HTTP", FALSE)
-# else
-# define ERRSV_CAN_BE_HTTP 1
-# endif
-#endif
-
-#ifndef PERL_DESTRUCT_LEVEL
-#define PERL_DESTRUCT_LEVEL 0
-#endif
-
-#ifndef DO_INTERNAL_REDIRECT
-#define DO_INTERNAL_REDIRECT perl_get_sv("Apache::DoInternalRedirect", FALSE)
-#endif
-
-typedef struct {
- table *utable;
- array_header *arr;
- table_entry *elts;
- int ix;
-} TiedTable;
-
-typedef request_rec * Apache;
-typedef request_rec * Apache__SubRequest;
-typedef conn_rec * Apache__Connection;
-typedef server_rec * Apache__Server;
-typedef cmd_parms * Apache__CmdParms;
-typedef TiedTable * Apache__Table;
-typedef table * Apache__table;
-typedef module * Apache__Module;
-typedef handler_rec * Apache__Handler;
-typedef command_rec * Apache__Command;
-
-#define SvCLASS(o) HvNAME(SvSTASH(SvRV(o)))
-
-#define GvHV_init(name) gv_fetchpv(name, GV_ADDMULTI, SVt_PVHV)
-#define GvSV_init(name) gv_fetchpv(name, GV_ADDMULTI, SVt_PV)
-
-#define GvSV_setiv(gv,val) sv_setiv(GvSV(gv), val)
-
-#define sv_is_http_code(sv) \
- ((SvIOK(sv) && (SvIVX(sv) >= 100) && (SvIVX(sv) <= 600)) ? SvIVX(sv) : FALSE)
-
-#define Apache__ServerStarting(val) \
-{ \
- GV *sgv = GvSV_init("Apache::Server::Starting"); \
- GV *agv = GvSV_init("Apache::ServerStarting"); \
- GvSV_setiv(sgv, val); \
- GvSV(agv) = GvSV(sgv); \
-}
-
-#define Apache__ServerReStarting(val) \
-{ \
- GV *sgv = GvSV_init("Apache::Server::ReStarting"); \
- GV *agv = GvSV_init("Apache::ServerReStarting"); \
- GvSV_setiv(sgv, val); \
- GvSV(agv) = GvSV(sgv); \
- if(perl_is_running == PERL_DONE_STARTUP) \
- Apache__ServerStarting((val == FALSE ? FALSE : PERL_RUNNING())); \
-}
-
-#define PUSHif(arg) \
-if(arg) \
- XPUSHs(sv_2mortal(newSVpv(arg,0)))
-
-#define iniHV(hv) hv = (HV*)sv_2mortal((SV*)newHV())
-#define iniAV(av) av = (AV*)sv_2mortal((SV*)newAV())
-
-#define AvTRUE(av) (av && (AvFILL(av) > -1) && SvREFCNT(av))
-
-#define av_copy_array(av) av_make(av_len(av)+1, AvARRAY(av))
-
-#ifndef newRV_noinc
-#define newRV_noinc(sv) ((Sv = newRV(sv)), --SvREFCNT(SvRV(Sv)), Sv)
-#endif
-
-#ifndef SvTAINTED_on
-#define SvTAINTED_on(sv) if (tainting) sv_magic(sv, Nullsv, 't', Nullch, 0)
-#endif
-
-#define HV_SvTAINTED_on(hv,key,klen) \
- SvTAINTED_on(*hv_fetch(hv, key, klen, 0))
-
-#if 0
-
-#define mp_setenv(key, val) \
-mp_magic_setenv(key, val, 1)
-
-#define mp_SetEnv(key, val) \
-mp_magic_setenv(key, val, 0)
-
-#define mp_PassEnv(key) \
-{ \
- char *val = getenv(key); \
- mp_magic_setenv(key, val?val:"", 0); \
-}
-
-#else
-
-#define mp_setenv(key, val) \
-{ \
- int klen = strlen(key); \
- SV *sv = newSVpv(val,0); \
- hv_store(GvHV(envgv), key, klen, sv, FALSE); \
- HV_SvTAINTED_on(GvHV(envgv), key, klen); \
- my_setenv(key, SvPVX(sv)); \
-}
-
-#define mp_SetEnv(key, val) \
- hv_store(GvHV(envgv), key, strlen(key), newSVpv(val,0), FALSE); \
- my_setenv(key, val)
-
-#define mp_PassEnv(key) \
-{ \
- char *val = getenv(key); \
- hv_store(GvHV(envgv), key, strlen(key), newSVpv(val?val:"",0), FALSE); \
-}
-
-#endif
-
-#define mp_debug mod_perl_debug_flags
-
-extern U32 mp_debug;
-
-#ifdef PERL_TRACE
-
-/* -Wall */
-#undef dNOOP
-#define dNOOP extern int __attribute__ ((unused)) Perl___notused
-
-#define MP_TRACE(a) if (mp_debug) a
-#define MP_TRACE_d(a) if (mp_debug & 1) a /* directives */
-#define MP_TRACE_s(a) if (mp_debug & 2) a /* perl sections */
-#define MP_TRACE_h(a) if (mp_debug & 4) a /* handlers */
-#define MP_TRACE_g(a) if (mp_debug & 8) a /* globals and allocation */
-#define MP_TRACE_c(a) if (mp_debug & 16) a /* directive handlers */
-#ifndef PERL_MARK_WHERE
-#define PERL_MARK_WHERE
-#endif
-#ifndef PERL_TIE_SCRIPTNAME
-#define PERL_TIE_SCRIPTNAME
-#endif
-#else
-#define MP_TRACE(a)
-#define MP_TRACE_d(a)
-#define MP_TRACE_s(a)
-#define MP_TRACE_h(a)
-#define MP_TRACE_g(a)
-#define MP_TRACE_c(a)
-#endif
-
-#ifdef PERL_MARK_WHERE
-#define MARK_WHERE(w,s) \
- ENTER; \
- mod_perl_mark_where(w,s)
-#define UNMARK_WHERE LEAVE
-#else
-#define MARK_WHERE(w,s) mod_perl_noop(NULL)
-#define UNMARK_WHERE mod_perl_noop(NULL)
-#endif
-
-/* cut down on some noise in source */
-#define PERL_IS_DSO perl_module.dynamic_load_handle
-
-#define dSTATUS \
-int dstatus = DECLINED; \
-int status = dstatus
-
-#define dPPREQ \
- perl_request_config *cfg = (perl_request_config *)get_module_config(r->request_config, &perl_module)
-
-#define dPPDIR \
- perl_dir_config *cld = (perl_dir_config *)get_module_config(r->per_dir_config, &perl_module)
-
-#define dPSRV(srv) \
- perl_server_config *cls = (perl_server_config *) get_module_config (srv->module_config, &perl_module)
-
-/* per-directory flags */
-
-#define MPf_On 1
-#define MPf_Off -1
-#define MPf_None 0
-
-#define MPf_INCPUSH 0x00000100 /* use lib split ":", $ENV{PERL5LIB} */
-#define MPf_SENDHDR 0x00000200 /* is PerlSendHeader On? */
-#define MPf_SENTHDR 0x00000400 /* has PerlSendHeader sent the headers? */
-#define MPf_ENV 0x00000800 /* PerlSetupEnv */
-#define MPf_HASENV 0x00001000 /* do we have any PerlSetEnv's? */
-#define MPf_DSTDERR 0x00002000 /* redirect stderr to error_log */
-#define MPf_CLEANUP 0x00004000 /* did we register our cleanup ? */
-#define MPf_RCLEANUP 0x00008000 /* for $r->register_cleanup */
-
-#define MP_FMERGE(new,add,base,f) \
-if((add->flags & f) || (base->flags & f)) \
- new->flags |= f
-
-#define MP_INCPUSH(d) (d->flags & MPf_INCPUSH)
-#define MP_INCPUSH_on(d) (d->flags |= MPf_INCPUSH)
-#define MP_INCPUSH_off(d) (d->flags &= ~MPf_INCPUSH)
-
-#if 0
-#define MP_SENDHDR(d) (d->flags & MPf_SENDHDR)
-#define MP_SENDHDR_on(d) (d->flags |= MPf_SENDHDR)
-#define MP_SENDHDR_off(d) (d->flags &= ~MPf_SENDHDR)
-#endif
-
-#define MP_SENDHDR(d) (d->SendHeader == MPf_On)
-#define MP_SENDHDR_on(d) (d->SendHeader = MPf_On)
-#define MP_SENDHDR_off(d) (d->SendHeader = MPf_Off)
-
-#define MP_SENTHDR(d) (d->flags & MPf_SENTHDR)
-#define MP_SENTHDR_on(d) (d->flags |= MPf_SENTHDR)
-#define MP_SENTHDR_off(d) (d->flags &= ~MPf_SENTHDR)
-
-#if 0
-#define MP_ENV(d) (d->flags & MPf_ENV)
-#define MP_ENV_on(d) (d->flags |= MPf_ENV)
-#define MP_ENV_off(d) (d->flags &= ~MPf_ENV)
-#endif
-
-#define MP_ENV(d) (d->SetupEnv != MPf_Off)
-#define MP_ENV_on(d) (d->SetupEnv = MPf_On)
-#define MP_ENV_off(d) (d->SetupEnv = MPf_Off)
-
-#define MP_HASENV(d) (d->flags & MPf_HASENV)
-#define MP_HASENV_on(d) (d->flags |= MPf_HASENV)
-#define MP_HASENV_off(d) (d->flags &= ~MPf_HASENV)
-
-#define MP_DSTDERR(d) (d->flags & MPf_DSTDERR)
-#define MP_DSTDERR_on(d) (d->flags |= MPf_DSTDERR)
-#define MP_DSTDERR_off(d) (d->flags &= ~MPf_DSTDERR)
-
-#define MP_CLEANUP(d) (d->flags & MPf_CLEANUP)
-#define MP_CLEANUP_on(d) (d->flags |= MPf_CLEANUP)
-#define MP_CLEANUP_off(d) (d->flags &= ~MPf_CLEANUP)
-
-#define MP_RCLEANUP(d) (d->flags & MPf_RCLEANUP)
-#define MP_RCLEANUP_on(d) (d->flags |= MPf_RCLEANUP)
-#define MP_RCLEANUP_off(d) (d->flags &= ~MPf_RCLEANUP)
-
-#define PERL_GATEWAY_INTERFACE "CGI-Perl/1.1"
-/* Apache::SSI */
-#define PERL_APACHE_SSI_TYPE "text/x-perl-server-parsed-html"
-/* PerlSetVar */
-
-#ifndef NO_PERL_DIRECTIVE_HANDLERS
-#define PERL_DIRECTIVE_HANDLERS
-#endif
-#ifndef NO_PERL_STACKED_HANDLERS
-#define PERL_STACKED_HANDLERS
-#endif
-#ifndef NO_PERL_METHOD_HANDLERS
-#define PERL_METHOD_HANDLERS
-#endif
-#ifndef NO_PERL_SECTIONS
-#define PERL_SECTIONS
-#endif
-#ifndef NO_PERL_SSI
-#undef PERL_SSI
-#define PERL_SSI
-#endif
-
-#ifdef PERL_SECTIONS
-# ifndef PERL_SECTIONS_SELF_BOOT
-# ifdef WIN32
-# define PERL_SECTIONS_SELF_BOOT \
- (getenv("PERL_SECTIONS_SELF_BOOT") && !perl_sections_self_boot)
-# else
-# define PERL_SECTIONS_SELF_BOOT !perl_sections_self_boot
-# endif
-# endif
-#endif
-
-#ifdef APACHE_SSL
-#define PERL_DONE_STARTUP 1
-#else
-#define PERL_DONE_STARTUP 2
-#endif
-
-/* some 1.2.x/1.3.x compat stuff */
-/* once 1.3.0 is here, we can toss most of this junk */
-
-#ifdef MODULE_MAGIC_AT_LEAST
-#undef MODULE_MAGIC_AT_LEAST
-#define MODULE_MAGIC_AT_LEAST(major,minor) \
- (MODULE_MAGIC_NUMBER_MAJOR >= (major) \
- && MODULE_MAGIC_NUMBER_MINOR >= minor)
-#else
-#define MODULE_MAGIC_AT_LEAST(major,minor) (0 > 1)
-#endif
-
-#define HAS_MMN(mmn) (MODULE_MAGIC_NUMBER >= mmn)
-#define MMN_130 19980527
-#define MMN_131 19980713
-#define MMN_132 19980806
-#define MMN_136 19990320
-#define HAS_MMN_130 HAS_MMN(MMN_130)
-#define HAS_MMN_131 HAS_MMN(MMN_131)
-#define HAS_MMN_132 HAS_MMN(MMN_132)
-#define HAS_MMN_136 HAS_MMN(MMN_136)
-
-#define HAS_CONTEXT MODULE_MAGIC_AT_LEAST(MMN_136,2)
-#if HAS_CONTEXT
-#define CAN_SELF_BOOT_SECTIONS (PERL_SECTIONS_SELF_BOOT)
-#define SECTION_ALLOWED OR_ALL
-#define USABLE_CONTEXT parms->context
-#else
-#define CAN_SELF_BOOT_SECTIONS ((parms->path==NULL)&&PERL_SECTIONS_SELF_BOOT)
-#define SECTION_ALLOWED RSRC_CONF
-#define USABLE_CONTEXT parms->server->lookup_defaults
-#endif
-
-#define APACHE_SSL_12X (defined(APACHE_SSL) && (MODULE_MAGIC_NUMBER < MMN_130))
-
-#if MODULE_MAGIC_NUMBER < MMN_130
-#undef PERL_IS_DSO
-#define PERL_IS_DSO 0
-#endif
-
-#if MODULE_MAGIC_NUMBER >= 19980627
-#define MP_CONST_CHAR const char
-#define MP_CONST_ARRAY_HEADER const array_header
-#else
-#define MP_CONST_CHAR char
-#define MP_CONST_ARRAY_HEADER array_header
-#endif
-
-#if MODULE_MAGIC_NUMBER > 19970912
-#define cmd_infile parms->config_file
-#define cmd_filename parms->config_file->name
-#define cmd_linenum parms->config_file->line_number
-#else
-#define cmd_infile parms->infile
-#define cmd_filename parms->config_file
-#define cmd_linenum parms->config_line
-#endif
-
-#ifndef DONE
-#define DONE -2
-#endif
-
-#if MODULE_MAGIC_NUMBER >= 19980713
-#include "ap_compat.h"
-#elif MODULE_MAGIC_NUMBER >= 19980413
-#include "compat.h"
-#endif
-
-#if MODULE_MAGIC_NUMBER > 19970909
-
-#define mod_perl_warn(s,msg) \
- aplog_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, s, "%s", msg)
-
-#define mod_perl_error(s,msg) \
- aplog_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, s, "%s", msg)
-
-#define mod_perl_notice(s,msg) \
- aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, s, "%s", msg)
-
-#define mod_perl_debug(s,msg) \
- aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, s, "%s", msg)
-
-#define mod_perl_log_reason(msg, file, r) \
- aplog_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r->server, \
- "access to %s failed for %s, reason: %s", \
- file, \
- get_remote_host(r->connection, \
- r->per_dir_config, REMOTE_NAME), \
- msg)
-
-#else
-
-#define mod_perl_error(s,msg) log_error(msg,s)
-#define mod_perl_debug mod_perl_error
-#define mod_perl_warn mod_perl_error
-#define mod_perl_notice mod_perl_error
-#define mod_perl_log_reason log_reason
-#endif
-
-#if MODULE_MAGIC_NUMBER < 19970719
-#define is_initial_req(r) ((r->main == NULL) && (r->prev == NULL))
-#endif
-
-#ifndef API_EXPORT
-#define API_EXPORT(type) type
-#endif
-
-#ifndef MODULE_VAR_EXPORT
-#define MODULE_VAR_EXPORT
-#endif
-
-#ifndef API_VAR_EXPORT
-#define API_VAR_EXPORT
-#endif
-
-#ifdef WIN32
-#if MODULE_MAGIC_NUMBER < 19980317
-#undef PERL_SECTIONS
-#define NO_PERL_SECTIONS
-#endif
-#include "multithread.h"
-extern void *mod_perl_mutex;
-#else
-#define mod_perl_mutex NULL
-extern void *mod_perl_dummy_mutex;
-
-#ifndef MULTITHREAD_H
-#define MULTI_OK (0)
-#undef create_mutex
-#undef acquire_mutex
-#undef release_mutex
-#define create_mutex(name) ((void *)mod_perl_dummy_mutex)
-#define acquire_mutex(mutex_id) ((int)MULTI_OK)
-#define release_mutex(mutex_id) ((int)MULTI_OK)
-#endif /* MULTITHREAD_H */
-
-#endif /* WIN32 */
-
-#if MODULE_MAGIC_NUMBER < 19971226
-char *ap_cpystrn(char *dst, const char *src, size_t dst_size);
-#endif
-
-#if MODULE_MAGIC_NUMBER >= 19980304
-#ifndef SERVER_BUILT
-#define SERVER_BUILT apapi_get_server_built()
-#endif
-#endif
-
-#define PERL_CUR_HOOK_SV \
-perl_get_sv("Apache::__CurrentCallback", TRUE)
-
-#define PERL_SET_CUR_HOOK(h) \
-if (r->notes) ap_table_setn(r->notes, "PERL_CUR_HOOK", h); \
-else sv_setpv(PERL_CUR_HOOK_SV, h)
-
-#define PERL_GET_CUR_HOOK \
-(r->notes ? \
-ap_table_get(r->notes, "PERL_CUR_HOOK") : \
-SvPVX(PERL_CUR_HOOK_SV))
-
-#ifdef PERL_STACKED_HANDLERS
-
-#ifndef PERL_GET_SET_HANDLERS
-#define PERL_GET_SET_HANDLERS
-#endif
-
-#define PERL_TAKE ITERATE
-#define PERL_CMD_INIT Nullav
-#define PERL_CMD_TYPE AV
-
-#define mod_perl_can_stack_handlers(sv) (SvTRUE(sv) && 1)
-
-/* always enable child_init for perl_init_ids */
-#if (MODULE_MAGIC_NUMBER >= 19970719) && !defined(WIN32)
-#define perl_init_ids
-# ifdef NO_PERL_CHILD_INIT
-# undef NO_PERL_CHILD_INIT
-# endif
-# ifdef NO_PERL_CHILD_EXIT
-# undef NO_PERL_CHILD_EXIT
-# endif
-#endif
-
-#ifndef perl_init_ids
-#define perl_init_ids mod_perl_init_ids()
-#endif
-
-#define NO_HANDLERS -666
-
-#define PERL_CALLBACK(h,name) \
-PERL_SET_CUR_HOOK(h); \
-(void)acquire_mutex(mod_perl_mutex); \
-if(AvTRUE(name)) { \
- status = perl_run_stacked_handlers(h, r, name); \
-} \
-if((status != OK) && (status != DECLINED)) { \
- MP_TRACE_h(fprintf(stderr, "%s handlers returned %d\n", h, status)); \
-} \
-else { \
- dstatus = perl_run_stacked_handlers(h, r, Nullav); \
- if(dstatus != NO_HANDLERS) status = dstatus; \
-} \
-(void)release_mutex(mod_perl_mutex); \
-MP_TRACE_h(fprintf(stderr, "%s handlers returned %d\n", h, status))
-
-
-#else
-
-#define PERL_TAKE TAKE1
-#define PERL_CMD_INIT NULL
-#define PERL_CMD_TYPE char
-
-#define mod_perl_can_stack_handlers(sv) (SvTRUE(sv) && 0)
-
-#define PERL_CALLBACK(h,name) \
-PERL_SET_CUR_HOOK(h); \
-if(name != NULL) { \
- SV *sv; \
- (void)acquire_mutex(mod_perl_mutex); \
- sv = newSVpv(name,0); \
- MARK_WHERE(h, sv); \
- dstatus = status = perl_call_handler(sv, r, Nullav); \
- UNMARK_WHERE; \
- SvREFCNT_dec(sv); \
- (void)release_mutex(mod_perl_mutex); \
- MP_TRACE_h(fprintf(stderr, "perl_call %s '%s' returned: %d\n", h,name,status)); \
-} \
-else { \
- MP_TRACE_h(fprintf(stderr, "mod_perl: declining to handle %s, no callback defined\n", h)); \
-}
-
-#endif
-
-#if MODULE_MAGIC_NUMBER >= 19961007
-#define CHAR_P const char *
-#else
-#define CHAR_P char *
-#endif
-
-#define PUSHelt(key,val,klen) \
-{ \
- SV *psv = (SV*)newSVpv(val, 0); \
- SvTAINTED_on(psv); \
- XPUSHs(sv_2mortal((SV*)newSVpv(key, klen))); \
- XPUSHs(sv_2mortal((SV*)psv)); \
-}
-
-/* on/off switches for callback hooks during server startup/shutdown */
-
-#ifndef NO_PERL_DISPATCH
-#define PERL_DISPATCH
-
-#define PERL_DISPATCH_HOOK perl_dispatch
-
-#define PERL_DISPATCH_CMD_ENTRY \
-"PerlDispatchHandler", (crft) perl_cmd_dispatch_handlers, \
- NULL, \
- OR_ALL, TAKE1, "the Perl Dispatch handler routine name"
-
-#define PERL_DISPATCH_CREATE(s) s->PerlDispatchHandler = NULL
-#else
-#define PERL_DISPATCH_HOOK NULL
-#define PERL_DISPATCH_CMD_ENTRY NULL
-#define PERL_DISPATCH_CREATE(s)
-#endif
-
-#ifndef NO_PERL_CHILD_INIT
-#define PERL_CHILD_INIT
-
-#define PERL_CHILD_INIT_HOOK perl_child_init
-
-#define PERL_CHILD_INIT_CMD_ENTRY \
-"PerlChildInitHandler", (crft) perl_cmd_child_init_handlers, \
- NULL, \
- RSRC_CONF, PERL_TAKE, "the Perl Child init handler routine name"
-
-#define PERL_CHILD_INIT_CREATE(s) s->PerlChildInitHandler = PERL_CMD_INIT
-#else
-#define PERL_CHILD_INIT_HOOK NULL
-#define PERL_CHILD_INIT_CMD_ENTRY NULL
-#define PERL_CHILD_INIT_CREATE(s)
-#endif
-
-#ifndef NO_PERL_CHILD_EXIT
-#define PERL_CHILD_EXIT
-
-#define PERL_CHILD_EXIT_HOOK perl_child_exit
-
-#define PERL_CHILD_EXIT_CMD_ENTRY \
-"PerlChildExitHandler", (crft) perl_cmd_child_exit_handlers, \
- NULL, \
- RSRC_CONF, PERL_TAKE, "the Perl Child exit handler routine name"
-
-#define PERL_CHILD_EXIT_CREATE(s) s->PerlChildExitHandler = PERL_CMD_INIT
-#else
-#define PERL_CHILD_EXIT_HOOK NULL
-#define PERL_CHILD_EXIT_CMD_ENTRY NULL
-#define PERL_CHILD_EXIT_CREATE(s)
-#endif
-
-#ifndef NO_PERL_RESTART
-#define PERL_RESTART
-
-#define PERL_RESTART_CMD_ENTRY \
-"PerlRestartHandler", (crft) perl_cmd_restart_handlers, \
- NULL, \
- RSRC_CONF, PERL_TAKE, "the Perl Restart handler routine name"
-
-#define PERL_RESTART_CREATE(s) s->PerlRestartHandler = PERL_CMD_INIT
-#else
-
-#define PERL_RESTART_CMD_ENTRY NULL
-#define PERL_RESTART_CREATE(s)
-#endif
-
-/* on/off switches for callback hooks during request stages */
-
-#if !defined(NO_PERL_TRANS) && (MODULE_MAGIC_NUMBER > 19980207)
-#undef NO_PERL_POST_READ_REQUEST
-#endif
-
-#ifndef NO_PERL_POST_READ_REQUEST
-#define PERL_POST_READ_REQUEST
-
-#define PERL_POST_READ_REQUEST_HOOK perl_post_read_request
-
-#define PERL_POST_READ_REQUEST_CMD_ENTRY \
-"PerlPostReadRequestHandler", (crft) perl_cmd_post_read_request_handlers, \
- NULL, \
- RSRC_CONF, PERL_TAKE, "the Perl Post Read Request handler routine name"
-
-#define PERL_POST_READ_REQUEST_CREATE(s) s->PerlPostReadRequestHandler = PERL_CMD_INIT
-#else
-#define PERL_POST_READ_REQUEST_HOOK NULL
-#define PERL_POST_READ_REQUEST_CMD_ENTRY NULL
-#define PERL_POST_READ_REQUEST_CREATE(s)
-#endif
-
-#ifndef NO_PERL_TRANS
-#define PERL_TRANS
-
-#define PERL_TRANS_HOOK perl_translate
-
-#define PERL_TRANS_CMD_ENTRY \
-"PerlTransHandler", (crft) perl_cmd_trans_handlers, \
- NULL, \
- RSRC_CONF, PERL_TAKE, "the Perl Translation handler routine name"
-
-#define PERL_TRANS_CREATE(s) s->PerlTransHandler = PERL_CMD_INIT
-#else
-#define PERL_TRANS_HOOK NULL
-#define PERL_TRANS_CMD_ENTRY NULL
-#define PERL_TRANS_CREATE(s)
-#endif
-
-
-#ifndef NO_PERL_AUTHEN
-#define PERL_AUTHEN
-
-#define PERL_AUTHEN_HOOK perl_authenticate
-
-#define PERL_AUTHEN_CMD_ENTRY \
-"PerlAuthenHandler", (crft) perl_cmd_authen_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Authentication handler routine name"
-
-#define PERL_AUTHEN_CREATE(s) s->PerlAuthenHandler = PERL_CMD_INIT
-#else
-#define PERL_AUTHEN_HOOK NULL
-#define PERL_AUTHEN_CMD_ENTRY NULL
-#define PERL_AUTHEN_CREATE(s)
-#endif
-
-#ifndef NO_PERL_AUTHZ
-#define PERL_AUTHZ
-
-#define PERL_AUTHZ_HOOK perl_authorize
-
-#define PERL_AUTHZ_CMD_ENTRY \
-"PerlAuthzHandler", (crft) perl_cmd_authz_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Authorization handler routine name"
-#define PERL_AUTHZ_CREATE(s) s->PerlAuthzHandler = PERL_CMD_INIT
-#else
-#define PERL_AUTHZ_HOOK NULL
-#define PERL_AUTHZ_CMD_ENTRY NULL
-#define PERL_AUTHZ_CREATE(s)
-#endif
-
-#ifndef NO_PERL_ACCESS
-#define PERL_ACCESS
-
-#define PERL_ACCESS_HOOK perl_access
-
-#define PERL_ACCESS_CMD_ENTRY \
-"PerlAccessHandler", (crft) perl_cmd_access_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Access handler routine name"
-
-#define PERL_ACCESS_CREATE(s) s->PerlAccessHandler = PERL_CMD_INIT
-#else
-#define PERL_ACCESS_HOOK NULL
-#define PERL_ACCESS_CMD_ENTRY NULL
-#define PERL_ACCESS_CREATE(s)
-#endif
-
-/* un-tested hooks */
-
-#ifndef NO_PERL_TYPE
-#define PERL_TYPE
-
-#define PERL_TYPE_HOOK perl_type_checker
-
-#define PERL_TYPE_CMD_ENTRY \
-"PerlTypeHandler", (crft) perl_cmd_type_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Type check handler routine name"
-
-#define PERL_TYPE_CREATE(s) s->PerlTypeHandler = PERL_CMD_INIT
-#else
-#define PERL_TYPE_HOOK NULL
-#define PERL_TYPE_CMD_ENTRY NULL
-#define PERL_TYPE_CREATE(s)
-#endif
-
-#ifndef NO_PERL_FIXUP
-#define PERL_FIXUP
-
-#define PERL_FIXUP_HOOK perl_fixup
-
-#define PERL_FIXUP_CMD_ENTRY \
-"PerlFixupHandler", (crft) perl_cmd_fixup_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Fixup handler routine name"
-
-#define PERL_FIXUP_CREATE(s) s->PerlFixupHandler = PERL_CMD_INIT
-#else
-#define PERL_FIXUP_HOOK NULL
-#define PERL_FIXUP_CMD_ENTRY NULL
-#define PERL_FIXUP_CREATE(s)
-#endif
-
-#ifndef NO_PERL_LOG
-#define PERL_LOG
-
-#define PERL_LOG_HOOK perl_logger
-
-#define PERL_LOG_CMD_ENTRY \
-"PerlLogHandler", (crft) perl_cmd_log_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Log handler routine name"
-
-#define PERL_LOG_CREATE(s) s->PerlLogHandler = PERL_CMD_INIT
-#else
-#define PERL_LOG_HOOK NULL
-#define PERL_LOG_CMD_ENTRY NULL
-#define PERL_LOG_CREATE(s)
-#endif
-
-#ifndef NO_PERL_CLEANUP
-#define PERL_CLEANUP
-
-#define PERL_CLEANUP_HOOK perl_cleanup
-
-#define PERL_CLEANUP_CMD_ENTRY \
-"PerlCleanupHandler", (crft) perl_cmd_cleanup_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Cleanup handler routine name"
-
-#define PERL_CLEANUP_CREATE(s) s->PerlCleanupHandler = PERL_CMD_INIT
-#else
-#define PERL_CLEANUP_HOOK NULL
-#define PERL_CLEANUP_CMD_ENTRY NULL
-#define PERL_CLEANUP_CREATE(s)
-#endif
-
-#ifndef NO_PERL_INIT
-#define PERL_INIT
-
-#define PERL_INIT_HOOK perl_init
-
-#define PERL_INIT_CMD_ENTRY \
-"PerlInitHandler", (crft) perl_cmd_init_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Init handler routine name"
-
-#define PERL_INIT_CREATE(s) s->PerlInitHandler = PERL_CMD_INIT
-#else
-#define PERL_INIT_HOOK NULL
-#define PERL_INIT_CMD_ENTRY NULL
-#define PERL_INIT_CREATE(s)
-#endif
-
-#ifndef NO_PERL_HEADER_PARSER
-#define PERL_HEADER_PARSER
-
-#define PERL_HEADER_PARSER_HOOK perl_header_parser
-
-#define PERL_HEADER_PARSER_CMD_ENTRY \
-"PerlHeaderParserHandler", (crft) perl_cmd_header_parser_handlers, \
- NULL, \
- OR_ALL, PERL_TAKE, "the Perl Header Parser handler routine name"
-
-#define PERL_HEADER_PARSER_CREATE(s) s->PerlHeaderParserHandler = PERL_CMD_INIT
-#else
-#define PERL_HEADER_PARSER_HOOK NULL
-#define PERL_HEADER_PARSER_CMD_ENTRY NULL
-#define PERL_HEADER_PARSER_CREATE(s)
-#endif
-
-typedef struct {
- array_header *PerlPassEnv;
- array_header *PerlRequire;
- array_header *PerlModule;
- int PerlTaintCheck;
- int PerlWarn;
- int FreshRestart;
- PERL_CMD_TYPE *PerlInitHandler;
- PERL_CMD_TYPE *PerlPostReadRequestHandler;
- PERL_CMD_TYPE *PerlTransHandler;
- PERL_CMD_TYPE *PerlChildInitHandler;
- PERL_CMD_TYPE *PerlChildExitHandler;
- PERL_CMD_TYPE *PerlRestartHandler;
- char *PerlOpmask;
- table *vars;
-} perl_server_config;
-
-typedef struct {
- char *PerlDispatchHandler;
- PERL_CMD_TYPE *PerlHandler;
- PERL_CMD_TYPE *PerlAuthenHandler;
- PERL_CMD_TYPE *PerlAuthzHandler;
- PERL_CMD_TYPE *PerlAccessHandler;
- PERL_CMD_TYPE *PerlTypeHandler;
- PERL_CMD_TYPE *PerlFixupHandler;
- PERL_CMD_TYPE *PerlLogHandler;
- PERL_CMD_TYPE *PerlCleanupHandler;
- PERL_CMD_TYPE *PerlHeaderParserHandler;
- PERL_CMD_TYPE *PerlInitHandler;
- table *env;
- table *vars;
- U32 flags;
- int SendHeader;
- int SetupEnv;
- char *location;
-} perl_dir_config;
-
-typedef struct {
- Sighandler_t h;
- I32 signo;
-} perl_request_sigsave;
-
-typedef struct {
- HV *pnotes;
- int setup_env;
- table *dir_env;
- array_header *sigsave;
-} perl_request_config;
-
-typedef struct {
- int is_method;
- int is_anon;
- int in_perl;
- SV *pclass;
- char *method;
-} mod_perl_handler;
-
-typedef struct {
- SV *obj;
- char *pclass;
-} mod_perl_perl_dir_config;
-
-typedef struct {
- char *subname;
- char *info;
-} mod_perl_cmd_info;
-
-extern module MODULE_VAR_EXPORT perl_module;
-
-/* a couple for -Wall sanity sake */
-#ifndef WIN32
-int translate_name (request_rec *);
-int log_transaction (request_rec *r);
-#endif
-
-/* mod_perl prototypes */
-
-/* perlxsi.c */
-#ifdef aTHX_
-void xs_init (pTHX);
-#else
-void xs_init (void);
-#endif
-
-/* mod_perl.c */
-
-/* generic handler stuff */
-int perl_handler_ismethod(HV *pclass, char *sub);
-int perl_call_handler(SV *sv, request_rec *r, AV *args);
-request_rec *mp_fake_request_rec(server_rec *s, pool *p, char *hook);
-
-/* stacked handler stuff */
-int mod_perl_push_handlers(SV *self, char *hook, SV *sub, AV *handlers);
-SV *mod_perl_pop_handlers(SV *self, SV *hook);
-void *mod_perl_clear_handlers(SV *self, SV *hook);
-SV *mod_perl_fetch_handlers(SV *self, SV *hook);
-int perl_run_stacked_handlers(char *hook, request_rec *r, AV *handlers);
-
-/* plugin slots */
-void perl_module_init(server_rec *s, pool *p);
-void perl_startup(server_rec *s, pool *p);
-int perl_handler(request_rec *r);
-void perl_child_init(server_rec *, pool *);
-void perl_child_exit(server_rec *, pool *);
-int perl_translate(request_rec *r);
-int perl_authenticate(request_rec *r);
-int perl_authorize(request_rec *r);
-int perl_access(request_rec *r);
-int perl_type_checker(request_rec *r);
-int perl_fixup(request_rec *r);
-int perl_post_read_request(request_rec *r);
-int perl_logger(request_rec *r);
-int perl_header_parser(request_rec *r);
-int perl_hook(char *name);
-int PERL_RUNNING(void);
-
-/* per-request gunk */
-int mod_perl_sent_header(request_rec *r, int val);
-int mod_perl_seqno(SV *self, int inc);
-request_rec *perl_request_rec(request_rec *);
-void perl_setup_env(request_rec *r);
-SV *perl_bless_request_rec(request_rec *);
-void perl_set_request_rec(request_rec *);
-void mod_perl_cleanup_sv(void *data);
-void mod_perl_cleanup_handler(void *data);
-void mod_perl_end_cleanup(void *data);
-void mod_perl_register_cleanup(request_rec *r, SV *sv);
-void mod_perl_noop(void *data);
-SV *mod_perl_resolve_handler(request_rec *r, SV *sv, mod_perl_handler *h);
-mod_perl_handler *mod_perl_new_handler(request_rec *r, SV *sv);
-void mod_perl_destroy_handler(void *data);
-
-/* perl_util.c */
-
-SV *array_header2avrv(array_header *arr);
-array_header *avrv2array_header(SV *avrv, pool *p);
-table *hvrv2table(SV *rv);
-void mod_perl_untaint(SV *sv);
-SV *mod_perl_gensym (char *pack);
-SV *mod_perl_slurp_filename(request_rec *r);
-SV *mod_perl_tie_table(table *t);
-SV *perl_hvrv_magic_obj(SV *rv);
-void perl_tie_hash(HV *hv, char *pclass, SV *sv);
-void perl_util_cleanup(void);
-void mod_perl_clear_rgy_endav(request_rec *r, SV *sv);
-void perl_stash_rgy_endav(char *s, SV *rgystash);
-void perl_run_rgy_endav(char *s);
-void perl_run_endav(char *s);
-void perl_call_halt(int status);
-void perl_reload_inc(server_rec *s, pool *p);
-I32 perl_module_is_loaded(char *name);
-SV *perl_module2file(char *name);
-int perl_require_module(char *module, server_rec *s);
-int perl_load_startup_script(server_rec *s, pool *p, char *script, U8 my_warn);
-array_header *perl_cgi_env_init(request_rec *r);
-void perl_clear_env(void);
-void mp_magic_setenv(char *key, char *val, int is_tainted);
-void mod_perl_init_ids(void);
-int perl_eval_ok(server_rec *s);
-int perl_sv_is_http_code(SV *sv, int *status);
-void perl_inc_unshift(char *s);
-SV *mod_perl_sv_name(SV *svp);
-void mod_perl_mark_where(char *where, SV *sub);
-
-/* perlio.c */
-
-void perl_soak_script_output(request_rec *r);
-void perl_stdin2client(request_rec *r);
-void perl_stdout2client(request_rec *r);
-
-/* perl_config.c */
-
-#define require_Apache(s) \
- perl_require_module("Apache", s)
-
-char *mod_perl_auth_name(request_rec *r, char *val);
-char *mod_perl_auth_type(request_rec *r, char *val);
-
-module *perl_get_module_ptr(char *name, int len);
-void *perl_merge_server_config(pool *p, void *basev, void *addv);
-void *perl_merge_dir_config(pool *p, void *basev, void *addv);
-void *perl_create_dir_config(pool *p, char *dirname);
-void *perl_create_server_config(pool *p, server_rec *s);
-perl_request_config *perl_create_request_config(pool *p, server_rec *s);
-void perl_perl_cmd_cleanup(void *data);
-
-void perl_section_self_boot(cmd_parms *parms, void *dummy, const char *arg);
-void perl_clear_symtab(HV *symtab);
-CHAR_P perl_section (cmd_parms *cmd, void *dummy, CHAR_P arg);
-CHAR_P perl_end_section (cmd_parms *cmd, void *dummy);
-CHAR_P perl_pod_section (cmd_parms *cmd, void *dummy, CHAR_P arg);
-CHAR_P perl_pod_end_section (cmd_parms *cmd, void *dummy);
-CHAR_P perl_cmd_autoload (cmd_parms *parms, void *dummy, const char *arg);
-CHAR_P perl_config_END (cmd_parms *cmd, void *dummy, CHAR_P arg);
-CHAR_P perl_limit_section(cmd_parms *cmd, void *dummy, HV *hv);
-CHAR_P perl_urlsection (cmd_parms *cmd, void *dummy, HV *hv);
-CHAR_P perl_dirsection (cmd_parms *cmd, void *dummy, HV *hv);
-CHAR_P perl_filesection (cmd_parms *cmd, void *dummy, HV *hv);
-void perl_handle_command(cmd_parms *cmd, void *config, char *line);
-void perl_handle_command_hv(HV *hv, char *key, cmd_parms *cmd, void *config);
-void perl_handle_command_av(AV *av, I32 n, char *key, cmd_parms *cmd, void *config);
-
-void perl_tainting_set(server_rec *s, int arg);
-CHAR_P perl_cmd_require (cmd_parms *parms, void *dummy, char *arg);
-CHAR_P perl_cmd_module (cmd_parms *parms, void *dummy, char *arg);
-CHAR_P perl_cmd_var(cmd_parms *cmd, void *config, char *key, char *val);
-CHAR_P perl_cmd_setenv(cmd_parms *cmd, perl_dir_config *rec, char *key, char *val);
-CHAR_P perl_cmd_env (cmd_parms *cmd, perl_dir_config *rec, int arg);
-CHAR_P perl_cmd_pass_env (cmd_parms *parms, void *dummy, char *arg);
-CHAR_P perl_cmd_sendheader (cmd_parms *cmd, perl_dir_config *rec, int arg);
-CHAR_P perl_cmd_opmask (cmd_parms *parms, void *dummy, char *arg);
-CHAR_P perl_cmd_tainting (cmd_parms *parms, void *dummy, int arg);
-CHAR_P perl_cmd_warn (cmd_parms *parms, void *dummy, int arg);
-CHAR_P perl_cmd_fresh_restart (cmd_parms *parms, void *dummy, int arg);
-
-CHAR_P perl_cmd_dispatch_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_init_handlers (cmd_parms *parms, void *rec, char *arg);
-CHAR_P perl_cmd_cleanup_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_header_parser_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_post_read_request_handlers (cmd_parms *parms, void *dumm, char *arg);
-CHAR_P perl_cmd_trans_handlers (cmd_parms *parms, void *dumm, char *arg);
-CHAR_P perl_cmd_child_init_handlers (cmd_parms *parms, void *dumm, char *arg);
-CHAR_P perl_cmd_child_exit_handlers (cmd_parms *parms, void *dumm, char *arg);
-CHAR_P perl_cmd_restart_handlers (cmd_parms *parms, void *dumm, char *arg);
-CHAR_P perl_cmd_authen_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_authz_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_access_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_type_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_fixup_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_handler_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_log_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg);
-CHAR_P perl_cmd_perl_TAKE1(cmd_parms *cmd, mod_perl_perl_dir_config *d, char *one);
-CHAR_P perl_cmd_perl_TAKE2(cmd_parms *cmd, mod_perl_perl_dir_config *d, char *one, char *two);
-CHAR_P perl_cmd_perl_TAKE123(cmd_parms *cmd, mod_perl_perl_dir_config *d,
- char *one, char *two, char *three);
-CHAR_P perl_cmd_perl_FLAG(cmd_parms *cmd, mod_perl_perl_dir_config *d, int flag);
-
-#define perl_cmd_perl_RAW_ARGS perl_cmd_perl_TAKE1
-#define perl_cmd_perl_NO_ARGS perl_cmd_perl_TAKE1
-#define perl_cmd_perl_ITERATE perl_cmd_perl_TAKE1
-#define perl_cmd_perl_ITERATE2 perl_cmd_perl_TAKE2
-#define perl_cmd_perl_TAKE12 perl_cmd_perl_TAKE2
-#define perl_cmd_perl_TAKE23 perl_cmd_perl_TAKE123
-#define perl_cmd_perl_TAKE3 perl_cmd_perl_TAKE123
-#define perl_cmd_perl_TAKE13 perl_cmd_perl_TAKE123
-void *perl_perl_merge_dir_config(pool *p, void *basev, void *addv);
-void *perl_perl_merge_srv_config(pool *p, void *basev, void *addv);
-
-void mod_perl_dir_env(request_rec *r, perl_dir_config *cld);
-void mod_perl_pass_env(pool *p, perl_server_config *cls);
-
-#define PERL_DIR_MERGE "DIR_MERGE"
-#define PERL_DIR_CREATE "DIR_CREATE"
-#define PERL_SERVER_MERGE "SERVER_MERGE"
-#define PERL_SERVER_CREATE "SERVER_CREATE"
-#define PERL_DIR_CFG_T 0
-#define PERL_SERVER_CFG_T 1
-
-/* Apache.xs */
-
-pool *perl_get_util_pool(void);
-pool *perl_get_startup_pool(void);
-server_rec *perl_get_startup_server(void);
-request_rec *sv2request_rec(SV *in, char *pclass, CV *cv);
-
-/* PerlRunXS.xs */
-#define ApachePerlRun_name_with_virtualhost() \
- perl_get_sv("Apache::Registry::NameWithVirtualHost", FALSE)
-
-char *mod_perl_set_opmask(request_rec *r, SV *sv);
-void mod_perl_init_opmask(server_rec *s, pool *p);
-void mod_perl_dump_opmask(void);
-#define dOPMask \
-if(!op_mask) Newz(0, op_mask, maxo, char); \
-else Zero(op_mask, maxo, char)
-
-#ifdef PERL_SAFE_STARTUP
-
-#define ENTER_SAFE(s,p) \
- dOPMask; \
- ENTER; \
- SAVEPPTR(op_mask); \
- mod_perl_init_opmask(s,p)
-
-#define LEAVE_SAFE \
- Zero(op_mask, maxo, char); \
- LEAVE
-
-#else
-#define ENTER_SAFE(s,p)
-#define LEAVE_SAFE
-#endif
-
-#ifdef JW_PERL_OBJECT
-#undef stderr
-#define stderr PerlIO_stderr()
-#endif
diff --git a/tags/v1_29/src/modules/perl/mod_perl_opmask.c b/tags/v1_29/src/modules/perl/mod_perl_opmask.c
deleted file mode 100644
index ac6a8f1..0000000
--- a/tags/v1_29/src/modules/perl/mod_perl_opmask.c
+++ /dev/null
@@ -1,243 +0,0 @@
-#include "mod_perl.h"
-
-#ifdef PERL_SAFE_STARTUP
-
-static IV opset_len = 0;
-
-static void opmask_add(char *bitmask)
-{
- int i,j;
- int myopcode = 0;
- if(!opset_len)
- opset_len = (maxo + 7) / 8;
-
- for (i=0; i < opset_len; i++) {
- U16 bits = bitmask[i];
- if (!bits) {
- myopcode += 8;
- continue;
- }
- for (j=0; j < 8 && myopcode < maxo; )
- op_mask[myopcode++] |= bits & (1 << j++);
- }
-}
-
-#ifdef PERL_DEFAULT_OPMASK
-
-/*PerlOpmask directive is disabled*/
-#define op_names_init()
-#define get_op_bitspec(op,f) Nullsv
-#define set_opset_bits(bitmap, bitspec, on, op)
-#define read_opmask(s,p,f) NULL
-char *mod_perl_set_opmask(request_rec *r, SV *sv)
-{
- croak("Can't override Opmask");
-}
-#else
-
-static HV *op_named_bits = Nullhv;
-static void op_names_init(void)
-{
- int i;
- if(op_named_bits) return;
- op_named_bits = newHV();
- for(i=0; i < maxo; ++i) {
- hv_store(op_named_bits, op_name[i], strlen(op_name[i]),
- newSViv(i), 0);
- }
-}
-
-static SV *get_op_bitspec(char *opname, int fatal)
-{
- SV **svp;
- int len = strlen(opname);
- svp = hv_fetch(op_named_bits, opname, len, 0);
- if (!svp || !SvOK(*svp)) {
- if(fatal)
- croak("mod_perl: unknown operator name \"%s\"", opname);
- else
- return Nullsv;
- }
- return *svp;
-}
-
-static void set_opset_bits(char *bitmap, SV *bitspec, int on, char *opname)
-{
- if (SvIOK(bitspec)) {
- int myopcode = SvIV(bitspec);
- int offset = myopcode >> 3;
- int bit = myopcode & 0x07;
- if (myopcode >= maxo || myopcode < 0)
- croak("mod_perl: opcode \"%s\" value %d is invalid",
- opname, myopcode);
- if (on)
- bitmap[offset] |= 1 << bit;
- else
- bitmap[offset] &= ~(1 << bit);
- }
- else
- croak("mod_perl: invalid bitspec for \"%s\" (type %u)",
- opname, (unsigned)SvTYPE(bitspec));
-}
-
-static char *read_opmask(server_rec *s, pool *p, char *file)
-{
-#if HAS_MMN_130
- char opname[MAX_STRING_LEN];
- char *mask = (char *)ap_pcalloc(p, maxo);
- configfile_t *cfg = ap_pcfg_openfile(p, file);
-
- if(!cfg) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, s,
- "mod_perl: unable to open PerlOpmask file %s", file);
- exit(1);
- }
-
- op_names_init();
- while (!(ap_cfg_getline(opname, MAX_STRING_LEN, cfg))) {
- SV *bitspec;
- if(*opname == '#') continue;
- if((bitspec = get_op_bitspec(opname, TRUE))) {
- set_opset_bits(mask, bitspec, TRUE, opname);
- }
- }
- ap_cfg_closefile(cfg);
- return mask;
-
-#else
- croak("Need Apache 1.3.0+ to use PerlOpmask directive");
-#endif /*HAS_MMN_130*/
-}
-
-static char *av2opmask(pool *p, AV *av)
-{
- I32 i;
- char *mask;
-
- mask = (char *)ap_pcalloc(p, maxo);
- op_names_init();
- for(i=0; i<=AvFILL(av); i++) {
- SV *sv = *av_fetch(av, i, FALSE);
- char *opname = SvPV(sv,na);
- SV *bitspec;
-
- if((bitspec = get_op_bitspec(opname, TRUE))) {
- set_opset_bits(mask, bitspec, TRUE, opname);
- }
- }
- return mask;
-}
-
-/*
- * $Mask ||= $r->set_opmask([qw(system backtick)]);
- * $r->set_opmask(\$Mask) if $Mask;
- * $r->set_opmask($filename)
- */
-char *mod_perl_set_opmask(request_rec *r, SV *sv)
-{
- char *mask;
-#ifndef PERL_ORALL_OPMASK
- croak("Can't override Opmask");
-#endif
- dOPMask;
- SAVEPPTR(op_mask);
-
- if(SvROK(sv)) {
- if(SvTYPE(SvRV(sv)) == SVt_PVAV)
- mask = av2opmask(r->pool, (AV*)SvRV(sv));
- else
- mask = SvPV((SV*)SvRV(sv),na);
- }
- else {
- mask = read_opmask(r->server, r->pool, SvPV(sv,na));
- }
-
- opmask_add(mask);
- MP_TRACE_g(mod_perl_dump_opmask());
- return mask;
-}
-
-
-#endif /*PERL_DEFAULT_OPMASK*/
-
-#include "op_mask.c"
-
-#ifdef PERL_DEFAULT_OPMASK
-#define MP_HAS_OPMASK cls
-#define MP_DEFAULT_OPMASK 1
-#else
-#define MP_HAS_OPMASK cls->PerlOpmask
-#define MP_DEFAULT_OPMASK !strcasecmp(cls->PerlOpmask, "default")
-#endif
-
-#if 0
-static char *default_opmask = NULL;
-
-static void reset_default_opmask(void *data)
-{
- char *mask = (char *)data;
- mask = NULL;
-}
-#endif
-
-void mod_perl_init_opmask(server_rec *s, pool *p)
-{
- dPSRV(s);
- char *local_opmask = NULL;
-
- if(!MP_HAS_OPMASK)
- return;
-
- if(MP_DEFAULT_OPMASK) {
-#if 0
- if(!default_opmask) {
- default_opmask = uudecode(p, MP_op_mask);
- register_cleanup(p, (void*)default_opmask,
- reset_default_opmask, mod_perl_noop);
- }
-#endif
- local_opmask = uudecode(p, MP_op_mask);
- MP_TRACE_g(fprintf(stderr, "mod_perl: using PerlOpmask %s\n",
- cls->PerlOpmask ? cls->PerlOpmask : "__DEFAULT__"));
- }
- else {
- MP_TRACE_g(fprintf(stderr, "mod_perl: using PerlOpmask %s\n",
- cls->PerlOpmask));
- local_opmask = read_opmask(s, p,
- server_root_relative(p, cls->PerlOpmask));
- }
-
- opmask_add(local_opmask);
-}
-
-void mod_perl_dump_opmask(void)
-{
-#ifdef PERL_TRACE
- int i;
- if(!op_mask) return;
- fprintf(stderr, "op_mask=\n");
- for(i=0; i < maxo; i++) {
- if(!op_mask[i]) continue;
- fprintf(stderr, "%s (%s)\n", op_name[i], op_desc[i]);
- }
-#endif
-}
-
-#else
-
-void mod_perl_init_opmask(server_rec *s, pool *p)
-{
-}
-
-void mod_perl_dump_opmask(void)
-{
-}
-
-char *mod_perl_set_opmask(request_rec *r, SV *sv)
-{
- croak("Can't override Opmask");
- return NULL; /* C++ emits an error message otherwise
- * because of a missing return value.
- */
-}
-#endif /*PERL_SAFE_STARTUP*/
diff --git a/tags/v1_29/src/modules/perl/mod_perl_xs.h b/tags/v1_29/src/modules/perl/mod_perl_xs.h
deleted file mode 100644
index 2cbac62..0000000
--- a/tags/v1_29/src/modules/perl/mod_perl_xs.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* handy macros for RETVAL */
-
-#define get_set_PVp(thing,p) \
- RETVAL = (char*)thing; \
- if(items > 1) \
- thing = (char*)(SvOK(ST(1)) ? pstrdup(p, SvPV(ST(1),na)) : NULL)
-
-#define get_set_PV(thing) \
- get_set_PVp(thing,r->pool)
-
-#define get_set_IV(thing) \
- RETVAL = thing; \
- if(items > 1) \
- thing = (int)SvIV(ST(1))
-
-#define TABLE_GET_SET(table, do_taint) \
-if(key == NULL) { \
- ST(0) = table ? mod_perl_tie_table(table) : &sv_undef; \
- XSRETURN(1); \
-} \
-else { \
- char *val; \
- if(table && (val = (char *)table_get(table, key))) \
- RETVAL = newSVpv(val, 0); \
- else \
- RETVAL = newSV(0); \
- if(do_taint) SvTAINTED_on(RETVAL); \
- if(table && (items > 2)) { \
- if(ST(2) == &sv_undef) \
- table_unset(table, key); \
- else \
- table_set(table, key, SvPV(ST(2),na)); \
- } \
-}
-
-#define MP_CHECK_REQ(r,f) \
- if(!r) croak("`%s' called without setting Apache->request!", f)
-
-/* for Apache::fork, should no longer need */
-#ifdef Apache__fork
-extern listen_rec *listeners;
-extern int mod_perl_socketexitoption;
-extern int mod_perl_weareaforkedchild;
-#define Apache_exit_is_done(sts) \
- ((sts == DONE) || (mod_perl_weareaforkedchild && (mod_perl_socketexitoption > 1)))
-#else
-#define Apache_exit_is_done(sts) (sts == DONE)
-#endif
-
diff --git a/tags/v1_29/src/modules/perl/op_mask.c b/tags/v1_29/src/modules/perl/op_mask.c
deleted file mode 100644
index e8f3537..0000000
--- a/tags/v1_29/src/modules/perl/op_mask.c
+++ /dev/null
@@ -1,3 +0,0 @@
-
-static char *MP_op_mask = "AAAAAwAAAAAAAAAAAAAAAAAAAAAAAADwYZ4f8AcAAADg/f8P4P8DAAAAgA==
-";
diff --git a/tags/v1_29/src/modules/perl/perl_PL.h b/tags/v1_29/src/modules/perl/perl_PL.h
deleted file mode 100644
index 85762fe..0000000
--- a/tags/v1_29/src/modules/perl/perl_PL.h
+++ /dev/null
@@ -1,112 +0,0 @@
-#ifndef patchlevel
-#define patchlevel PL_patchlevel
-#endif
-#ifndef maxo
-#define maxo PL_maxo
-#endif
-#ifndef op_mask
-#define op_mask PL_op_mask
-#endif
-#ifndef op_name
-#define op_name PL_op_name
-#endif
-#ifndef op_desc
-#define op_desc PL_op_desc
-#endif
-#ifndef statcache
-#define statcache PL_statcache
-#endif
-#ifndef laststatval
-#define laststatval PL_laststatval
-#endif
-#ifndef statname
-#define statname PL_statname
-#endif
-#ifndef rs
-#define rs PL_rs
-#endif
-#ifndef beginav
-#define beginav PL_beginav
-#endif
-#ifndef defoutgv
-#define defoutgv PL_defoutgv
-#endif
-#ifndef defstash
-#define defstash PL_defstash
-#endif
-#ifndef egid
-#define egid PL_egid
-#endif
-#ifndef endav
-#define endav PL_endav
-#endif
-#ifndef envgv
-#define envgv PL_envgv
-#endif
-#ifndef euid
-#define euid PL_euid
-#endif
-#ifndef gid
-#define gid PL_gid
-#endif
-#ifndef hints
-#define hints PL_hints
-#endif
-#ifndef incgv
-#define incgv PL_incgv
-#endif
-#ifndef pidstatus
-#define pidstatus PL_pidstatus
-#endif
-#ifndef scopestack_ix
-#define scopestack_ix PL_scopestack_ix
-#endif
-#ifndef siggv
-#define siggv PL_siggv
-#endif
-#ifndef uid
-#define uid PL_uid
-#endif
-#ifndef warnhook
-#define warnhook PL_warnhook
-#endif
-#ifndef diehook
-#define diehook PL_diehook
-#endif
-#ifndef perl_destruct_level
-#define perl_destruct_level PL_perl_destruct_level
-#endif
-#ifndef sv_count
-#define sv_count PL_sv_count
-#endif
-#ifndef sv_objcount
-#define sv_objcount PL_sv_objcount
-#endif
-
-#ifndef sv_undef
-#define sv_undef PL_sv_undef
-#endif
-#ifndef sv_yes
-#define sv_yes PL_sv_yes
-#endif
-#ifndef sv_no
-#define sv_no PL_sv_no
-#endif
-#ifndef na
-#define na PL_na
-#endif
-#ifndef curcop
-#define curcop PL_curcop
-#endif
-#ifndef curstash
-#define curstash PL_curstash
-#endif
-#ifndef dowarn
-#define dowarn PL_dowarn
-#endif
-#ifndef tainting
-#define tainting PL_tainting
-#endif
-#ifndef stack_sp
-#define stack_sp PL_stack_sp
-#endif
diff --git a/tags/v1_29/src/modules/perl/perl_config.c b/tags/v1_29/src/modules/perl/perl_config.c
deleted file mode 100644
index a579ae4..0000000
--- a/tags/v1_29/src/modules/perl/perl_config.c
+++ /dev/null
@@ -1,2051 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1996-2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
-
-#define CORE_PRIVATE
-#include "mod_perl.h"
-
-extern API_VAR_EXPORT module *top_module;
-
-#ifdef PERL_SECTIONS
-static int perl_sections_self_boot = 0;
-static const char *perl_sections_boot_module = NULL;
-
-#if MODULE_MAGIC_NUMBER < 19970719
-#define limit_section limit
-#endif
-
-/* some prototypes for -Wall and win32 sake */
-#if MODULE_MAGIC_NUMBER >= 19980317
-extern API_VAR_EXPORT module core_module;
-#else
-API_EXPORT(const char *) handle_command (cmd_parms *parms, void *config, const char *l);
-API_EXPORT(const char *) limit_section (cmd_parms *cmd, void *dummy, const char *arg);
-API_EXPORT(void) add_per_dir_conf (server_rec *s, void *dir_config);
-API_EXPORT(void) add_per_url_conf (server_rec *s, void *url_config);
-API_EXPORT(const command_rec *) find_command (const char *name, const command_rec *cmds);
-API_EXPORT(const command_rec *) find_command_in_modules (const char *cmd_name, module **mod);
-#endif
-
-#if MODULE_MAGIC_NUMBER > 19970912
-
-void perl_config_getstr(void *buf, size_t bufsiz, void *param)
-{
- SV *sv = (SV*)param;
- STRLEN len;
- char *tmp = SvPV(sv,len);
-
- if(!SvTRUE(sv))
- return;
-
- Move(tmp, buf, bufsiz, char);
-
- if(len < bufsiz) {
- sv_setpv(sv, "");
- }
- else {
- tmp += bufsiz;
- sv_setpv(sv, tmp);
- }
-}
-
-int perl_config_getch(void *param)
-{
- SV *sv = (SV*)param;
- STRLEN len;
- char *tmp = SvPV(sv,len);
- register int retval = *tmp;
-
- if(!SvTRUE(sv))
- return EOF;
-
- if(len <= 1) {
- sv_setpv(sv, "");
- }
- else {
- ++tmp;
- sv_setpv(sv, tmp);
- }
-
- return retval;
-}
-
-void perl_eat_config_string(cmd_parms *cmd, void *config, SV *sv) {
- CHAR_P errmsg;
- configfile_t *perl_cfg =
- pcfg_open_custom(cmd->pool, "mod_perl", (void*)sv,
- perl_config_getch, NULL, NULL);
-
- configfile_t *old_cfg = cmd->config_file;
- cmd->config_file = perl_cfg;
- errmsg = srm_command_loop(cmd, config);
- cmd->config_file = old_cfg;
-
- if(errmsg)
- fprintf(stderr, "mod_perl: %s\n", errmsg);
-}
-
-#define STRING_MEAL(s) ( (*s == 'P') && strEQ(s,"PerlConfig") )
-#else
-#define STRING_MEAL(s) 0
-#define perl_eat_config_string(cmd, config, sv)
-#endif
-
-#define PERL_SECTIONS_PACKAGE "ApacheReadConfig"
-
-#endif /* PERL_SECTIONS */
-
-char *mod_perl_auth_name(request_rec *r, char *val)
-{
- core_dir_config *conf =
- (core_dir_config *)get_module_config(r->per_dir_config, &core_module);
-
- if(val) {
- conf->auth_name = pstrdup(r->pool, val);
- set_module_config(r->per_dir_config, &core_module, (void*)conf);
- MP_TRACE_g(fprintf(stderr, "mod_perl: setting auth_name to %s\n", conf->auth_name));
- }
-
- return conf->auth_name;
-}
-
-char *mod_perl_auth_type(request_rec *r, char *val)
-{
- core_dir_config *conf =
- (core_dir_config *)get_module_config(r->per_dir_config, &core_module);
-
- if(val) {
- conf->auth_type = pstrdup(r->pool, val);
- set_module_config(r->per_dir_config, &core_module, (void*)conf);
- MP_TRACE_g(fprintf(stderr, "mod_perl: setting auth_type to %s\n", conf->auth_name));
- }
-
- return conf->auth_type;
-}
-
-void mod_perl_dir_env(request_rec *r, perl_dir_config *cld)
-{
- if(MP_HASENV(cld)) {
- array_header *arr = table_elts(cld->env);
- table_entry *elts = (table_entry *)arr->elts;
-
- int i;
- for (i = 0; i < arr->nelts; ++i) {
- MP_TRACE_d(fprintf(stderr, "mod_perl_dir_env: %s=`%s'",
- elts[i].key, elts[i].val));
- mp_setenv(elts[i].key, elts[i].val);
- ap_table_setn(r->subprocess_env, elts[i].key, elts[i].val);
- }
- MP_HASENV_off(cld); /* just doit once per-request */
- }
-}
-
-void mod_perl_pass_env(pool *p, perl_server_config *cls)
-{
- char *key, *val, **keys;
- int i;
-
- if(!cls->PerlPassEnv->nelts) return;
-
- keys = (char **)cls->PerlPassEnv->elts;
- for (i = 0; i < cls->PerlPassEnv->nelts; ++i) {
- key = keys[i];
-
- if(!(val = getenv(key)) && (ind(key, ':') > 0)) {
- CHAR_P tmp = pstrdup(p, key);
- key = getword(p, &tmp, ':');
- val = (char *)tmp;
- }
-
- if(val != NULL) {
- MP_TRACE_d(fprintf(stderr, "PerlPassEnv: `%s'=`%s'\n", key, val));
- mp_SetEnv(key,pstrdup(p,val));
- }
- }
-}
-
-void *perl_merge_dir_config (pool *p, void *basev, void *addv)
-{
- perl_dir_config *mrg = (perl_dir_config *)pcalloc (p, sizeof(perl_dir_config));
- perl_dir_config *base = (perl_dir_config *)basev;
- perl_dir_config *add = (perl_dir_config *)addv;
-
- array_header *vars = (array_header *)base->vars;
-
- mrg->location = add->location ?
- add->location : base->location;
-
- /* XXX: what triggers such a condition ?*/
- if(vars && (vars->nelts > 100000)) {
- fprintf(stderr, "[warning] PerlSetVar->nelts = %d\n", vars->nelts);
- }
- mrg->vars = overlay_tables(p, add->vars, base->vars);
- mrg->env = overlay_tables(p, add->env, base->env);
-
- mrg->SendHeader = (add->SendHeader != MPf_None) ?
- add->SendHeader : base->SendHeader;
-
- mrg->SetupEnv = (add->SetupEnv != MPf_None) ?
- add->SetupEnv : base->SetupEnv;
-
- /* merge flags */
- MP_FMERGE(mrg,add,base,MPf_INCPUSH);
- MP_FMERGE(mrg,add,base,MPf_HASENV);
- /*MP_FMERGE(mrg,add,base,MPf_ENV);*/
- /*MP_FMERGE(mrg,add,base,MPf_SENDHDR);*/
- MP_FMERGE(mrg,add,base,MPf_SENTHDR);
- MP_FMERGE(mrg,add,base,MPf_CLEANUP);
- MP_FMERGE(mrg,add,base,MPf_RCLEANUP);
-
-#ifdef PERL_DISPATCH
- mrg->PerlDispatchHandler = add->PerlDispatchHandler ?
- add->PerlDispatchHandler : base->PerlDispatchHandler;
-#endif
-#ifdef PERL_INIT
- mrg->PerlInitHandler = add->PerlInitHandler ?
- add->PerlInitHandler : base->PerlInitHandler;
-#endif
-#ifdef PERL_HEADER_PARSER
- mrg->PerlHeaderParserHandler = add->PerlHeaderParserHandler ?
- add->PerlHeaderParserHandler : base->PerlHeaderParserHandler;
-#endif
-#ifdef PERL_ACCESS
- mrg->PerlAccessHandler = add->PerlAccessHandler ?
- add->PerlAccessHandler : base->PerlAccessHandler;
-#endif
-#ifdef PERL_AUTHEN
- mrg->PerlAuthenHandler = add->PerlAuthenHandler ?
- add->PerlAuthenHandler : base->PerlAuthenHandler;
-#endif
-#ifdef PERL_AUTHZ
- mrg->PerlAuthzHandler = add->PerlAuthzHandler ?
- add->PerlAuthzHandler : base->PerlAuthzHandler;
-#endif
-#ifdef PERL_TYPE
- mrg->PerlTypeHandler = add->PerlTypeHandler ?
- add->PerlTypeHandler : base->PerlTypeHandler;
-#endif
-#ifdef PERL_FIXUP
- mrg->PerlFixupHandler = add->PerlFixupHandler ?
- add->PerlFixupHandler : base->PerlFixupHandler;
-#endif
-#if 1
- mrg->PerlHandler = add->PerlHandler ? add->PerlHandler : base->PerlHandler;
-#endif
-#ifdef PERL_LOG
- mrg->PerlLogHandler = add->PerlLogHandler ?
- add->PerlLogHandler : base->PerlLogHandler;
-#endif
-#ifdef PERL_CLEANUP
- mrg->PerlCleanupHandler = add->PerlCleanupHandler ?
- add->PerlCleanupHandler : base->PerlCleanupHandler;
-#endif
-
- return mrg;
-}
-
-void *perl_create_dir_config (pool *p, char *dirname)
-{
- perl_dir_config *cld =
- (perl_dir_config *)palloc(p, sizeof (perl_dir_config));
-
- cld->location = pstrdup(p, dirname);
- cld->vars = make_table(p, 5);
- cld->env = make_table(p, 5);
- cld->flags = MPf_ENV;
- cld->SendHeader = MPf_None;
- cld->SetupEnv = MPf_None;
- cld->PerlHandler = PERL_CMD_INIT;
- PERL_DISPATCH_CREATE(cld);
- PERL_AUTHEN_CREATE(cld);
- PERL_AUTHZ_CREATE(cld);
- PERL_ACCESS_CREATE(cld);
- PERL_TYPE_CREATE(cld);
- PERL_FIXUP_CREATE(cld);
- PERL_LOG_CREATE(cld);
- PERL_CLEANUP_CREATE(cld);
- PERL_HEADER_PARSER_CREATE(cld);
- PERL_INIT_CREATE(cld);
- return (void *)cld;
-}
-
-void *perl_merge_server_config (pool *p, void *basev, void *addv)
-{
- perl_server_config *mrg = (perl_server_config *)pcalloc (p, sizeof(perl_server_config));
- perl_server_config *base = (perl_server_config *)basev;
- perl_server_config *add = (perl_server_config *)addv;
-
- mrg->PerlPassEnv = append_arrays(p, add->PerlPassEnv, base->PerlPassEnv);
-#if 0
- /* We don't merge these because they're inlined */
- mrg->PerlModule = append_arrays(p, add->PerlModule, base->PerlModule);
- mrg->PerlRequire = append_arrays(p, add->PerlRequire, base->PerlRequire);
-#endif
-
- mrg->PerlTaintCheck = add->PerlTaintCheck ?
- add->PerlTaintCheck : base->PerlTaintCheck;
- mrg->PerlWarn = add->PerlWarn ?
- add->PerlWarn : base->PerlWarn;
- mrg->FreshRestart = add->FreshRestart ?
- add->FreshRestart : base->FreshRestart;
- mrg->PerlOpmask = add->PerlOpmask ?
- add->PerlOpmask : base->PerlOpmask;
- mrg->vars = overlay_tables(p, add->vars, base->vars);
-
-#ifdef PERL_POST_READ_REQUEST
- mrg->PerlPostReadRequestHandler = add->PerlPostReadRequestHandler ?
- add->PerlPostReadRequestHandler : base->PerlPostReadRequestHandler;
-#endif
-#ifdef PERL_TRANS
- mrg->PerlTransHandler = add->PerlTransHandler ?
- add->PerlTransHandler : base->PerlTransHandler;
-#endif
-#ifdef PERL_CHILD_INIT
- mrg->PerlChildInitHandler = add->PerlChildInitHandler ?
- add->PerlChildInitHandler : base->PerlChildInitHandler;
-#endif
-#ifdef PERL_CHILD_EXIT
- mrg->PerlChildExitHandler = add->PerlChildExitHandler ?
- add->PerlChildExitHandler : base->PerlChildExitHandler;
-#endif
-#ifdef PERL_RESTART
- mrg->PerlRestartHandler = add->PerlRestartHandler ?
- add->PerlRestartHandler : base->PerlRestartHandler;
-#endif
-#ifdef PERL_INIT
- mrg->PerlInitHandler = add->PerlInitHandler ?
- add->PerlInitHandler : base->PerlInitHandler;
-#endif
-
- return mrg;
-}
-
-void *perl_create_server_config (pool *p, server_rec *s)
-{
- perl_server_config *cls =
- (perl_server_config *)palloc(p, sizeof (perl_server_config));
-
- cls->PerlPassEnv = make_array(p, 1, sizeof(char *));
- cls->PerlModule = make_array(p, 1, sizeof(char *));
- cls->PerlRequire = make_array(p, 1, sizeof(char *));
- cls->PerlTaintCheck = 0;
- cls->PerlWarn = 0;
- cls->FreshRestart = 0;
- cls->PerlOpmask = NULL;
- cls->vars = make_table(p, 5);
- PERL_POST_READ_REQUEST_CREATE(cls);
- PERL_TRANS_CREATE(cls);
- PERL_CHILD_INIT_CREATE(cls);
- PERL_CHILD_EXIT_CREATE(cls);
- PERL_RESTART_CREATE(cls);
- PERL_INIT_CREATE(cls);
-
- return (void *)cls;
-}
-
-static char *sigsave[] = { "ALRM", NULL };
-
-perl_request_config *perl_create_request_config(pool *p, server_rec *s)
-{
-
-#ifndef WIN32
- int i;
-#endif
-
- perl_request_config *cfg =
- (perl_request_config *)pcalloc(p, sizeof(perl_request_config));
- cfg->pnotes = Nullhv;
- cfg->setup_env = 0;
-
-#ifndef WIN32
- cfg->sigsave = make_array(p, 1, sizeof(perl_request_sigsave *));
-
- for (i=0; sigsave[i]; i++) {
- perl_request_sigsave *sig =
- (perl_request_sigsave *)pcalloc(p, sizeof(perl_request_sigsave));
- sig->signo = whichsig(sigsave[i]);
- sig->h = rsignal_state(sig->signo);
- MP_TRACE_g(fprintf(stderr,
- "mod_perl: saving SIG%s (%d) handler 0x%lx\n",
- sigsave[i], (int)sig->signo, (unsigned long)sig->h));
- *(perl_request_sigsave **)push_array(cfg->sigsave) = sig;
- }
-
-#endif
-
- return cfg;
-}
-
-#ifdef WIN32
-#define mp_preload_module(name)
-#else
-static void mp_preload_module(char **name)
-{
- if(ind(*name, ' ') >= 0) return;
- if(**name == '-' && ++*name) return;
- if(**name == '+') ++*name;
- else if(!PERL_AUTOPRELOAD) return;
- if(!PERL_RUNNING()) return;
-
- if(!perl_module_is_loaded(*name)) {
- MP_TRACE_d(fprintf(stderr,
- "mod_perl: attempting to pre-load module `%s'\n",
- *name));
- perl_require_module(*name,NULL);
- }
-}
-#endif
-
-#define STARTUP_PERL_IF_NOT_RUNNING \
-if(!PERL_RUNNING()) { \
- perl_startup(parms->server, parms->pool); \
- require_Apache(parms->server); \
- MP_TRACE_g(fprintf(stderr, "mod_perl: calling perl_startup()\n")); \
-}
-
-#ifdef PERL_STACKED_HANDLERS
-
-CHAR_P perl_cmd_push_handlers(char *hook, PERL_CMD_TYPE **cmd, char *arg, pool *p)
-{
- SV *sva;
- mp_preload_module(&arg);
- sva = newSVpv(arg,0);
- if(!*cmd) {
- *cmd = newAV();
- register_cleanup(p, (void*)*cmd, mod_perl_cleanup_sv, mod_perl_noop);
- MP_TRACE_d(fprintf(stderr, "init `%s' stack\n", hook));
- }
- MP_TRACE_d(fprintf(stderr, "perl_cmd_push_handlers: @%s, '%s'\n", hook, arg));
- mod_perl_push_handlers(&sv_yes, hook, sva, *cmd);
- SvREFCNT_dec(sva);
- return NULL;
-}
-
-#define PERL_CMD_PUSH_HANDLERS(hook, cmd) \
-STARTUP_PERL_IF_NOT_RUNNING \
-return perl_cmd_push_handlers(hook,&cmd,arg,parms->pool)
-
-#else
-
-#define PERL_CMD_PUSH_HANDLERS(hook, cmd) \
-STARTUP_PERL_IF_NOT_RUNNING \
-mp_preload_module(&arg); \
-cmd = arg; \
-return NULL
-
-int mod_perl_push_handlers(SV *self, char *hook, SV *sub, AV *handlers)
-{
- warn("Rebuild with -DPERL_STACKED_HANDLERS to $r->push_handlers");
- return 0;
-}
-
-#endif
-
-CHAR_P perl_cmd_dispatch_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- rec->PerlDispatchHandler = pstrdup(parms->pool, arg);
- MP_TRACE_d(fprintf(stderr, "perl_cmd: PerlDispatchHandler=`%s'\n", arg));
- return NULL;
-}
-
-CHAR_P perl_cmd_child_init_handlers (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- PERL_CMD_PUSH_HANDLERS("PerlChildInitHandler", cls->PerlChildInitHandler);
-}
-
-CHAR_P perl_cmd_child_exit_handlers (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- PERL_CMD_PUSH_HANDLERS("PerlChildExitHandler", cls->PerlChildExitHandler);
-}
-
-CHAR_P perl_cmd_restart_handlers (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- PERL_CMD_PUSH_HANDLERS("PerlRestartHandler", cls->PerlRestartHandler);
-}
-
-CHAR_P perl_cmd_post_read_request_handlers (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- PERL_CMD_PUSH_HANDLERS("PerlPostReadRequestHandler", cls->PerlPostReadRequestHandler);
-}
-
-CHAR_P perl_cmd_trans_handlers (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- PERL_CMD_PUSH_HANDLERS("PerlTransHandler", cls->PerlTransHandler);
-}
-
-CHAR_P perl_cmd_header_parser_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- PERL_CMD_PUSH_HANDLERS("PerlHeaderParserHandler", rec->PerlHeaderParserHandler);
-}
-
-CHAR_P perl_cmd_access_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- PERL_CMD_PUSH_HANDLERS("PerlAccessHandler", rec->PerlAccessHandler);
-}
-
-CHAR_P perl_cmd_authen_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- PERL_CMD_PUSH_HANDLERS("PerlAuthenHandler", rec->PerlAuthenHandler);
-}
-
-CHAR_P perl_cmd_authz_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- PERL_CMD_PUSH_HANDLERS("PerlAuthzHandler", rec->PerlAuthzHandler);
-}
-
-CHAR_P perl_cmd_type_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- PERL_CMD_PUSH_HANDLERS("PerlTypeHandler", rec->PerlTypeHandler);
-}
-
-CHAR_P perl_cmd_fixup_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- PERL_CMD_PUSH_HANDLERS("PerlFixupHandler", rec->PerlFixupHandler);
-}
-
-CHAR_P perl_cmd_handler_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
-#if 0
- /* would be nice if this worked, but it just doesn't "stick" */
- handle_command(parms, (void*)rec, "SetHandler perl-script");
-#endif
- PERL_CMD_PUSH_HANDLERS("PerlHandler", rec->PerlHandler);
-}
-
-CHAR_P perl_cmd_log_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- PERL_CMD_PUSH_HANDLERS("PerlLogHandler", rec->PerlLogHandler);
-}
-
-CHAR_P perl_cmd_init_handlers (cmd_parms *parms, void *rec, char *arg)
-{
- dPSRV(parms->server);
- if(parms->path) {
- PERL_CMD_PUSH_HANDLERS("PerlInitHandler",
- ((perl_dir_config *)rec)->PerlInitHandler);
- }
- else {
- PERL_CMD_PUSH_HANDLERS("PerlInitHandler", cls->PerlInitHandler);
- }
-}
-
-CHAR_P perl_cmd_cleanup_handlers (cmd_parms *parms, perl_dir_config *rec, char *arg)
-{
- PERL_CMD_PUSH_HANDLERS("PerlCleanupHandler", rec->PerlCleanupHandler);
-}
-
-CHAR_P perl_cmd_module (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- if(!PERL_RUNNING()) perl_startup(parms->server, parms->pool);
- require_Apache(parms->server);
-
- MP_TRACE_d(fprintf(stderr, "PerlModule: arg='%s'\n", arg));
-
- if(PERL_RUNNING()) {
- if (perl_require_module(arg, NULL) != OK) {
- dTHR;
- STRLEN n_a;
- dTHRCTX;
- return SvPV(ERRSV,n_a);
- }
-#ifdef PERL_SECTIONS
- else {
- if (CAN_SELF_BOOT_SECTIONS) {
- perl_section_self_boot(parms, dummy, arg);
- }
- }
-#endif
- }
- else {
- /* Delay processing it until Perl starts */
- *(char **)push_array(cls->PerlModule) = pstrdup(parms->pool, arg);
- }
-
- return NULL;
-}
-
-CHAR_P perl_cmd_require (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- if(!PERL_RUNNING()) perl_startup(parms->server, parms->pool);
-
- MP_TRACE_d(fprintf(stderr, "PerlRequire: arg=`%s'\n", arg));
-
- if(PERL_RUNNING()) {
- if (perl_load_startup_script(parms->server, parms->pool, arg, TRUE) != OK) {
- dTHR;
- STRLEN n_a;
- dTHRCTX;
- return SvPV(ERRSV,n_a);
- }
-#ifdef PERL_SECTIONS
- else {
- if (CAN_SELF_BOOT_SECTIONS) {
- perl_section_self_boot(parms, dummy, arg);
- }
- }
-#endif
- }
- else {
- /* Delay processing it until Perl starts */
- *(char **)push_array(cls->PerlRequire) = pstrdup(parms->pool, arg);
- }
-
- return NULL;
-}
-
-#ifdef PERL_SAFE_STARTUP
-CHAR_P perl_cmd_opmask (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- MP_TRACE_d(fprintf(stderr, "perl_cmd_opmask: %s\n", arg));
- cls->PerlOpmask = arg;
-#ifdef PERL_DEFAULT_MASK
- return "Default Opmask is on, cannot re-configure";
-#else
- return NULL;
-#endif
-}
-#endif
-
-void perl_tainting_set(server_rec *s, int arg)
-{
- dPSRV(s);
- GV *gv;
-
- cls->PerlTaintCheck = arg;
- if(PERL_RUNNING()) {
- gv = GvSV_init("Apache::__T");
- if(arg) {
- SvREADONLY_off(GvSV(gv));
- GvSV_setiv(gv, TRUE);
- SvREADONLY_on(GvSV(gv));
- tainting = TRUE;
- }
- }
-}
-
-CHAR_P perl_cmd_tainting (cmd_parms *parms, void *dummy, int arg)
-{
- MP_TRACE_d(fprintf(stderr, "perl_cmd_tainting: %d\n", arg));
- perl_tainting_set(parms->server, arg);
- return NULL;
-}
-
-CHAR_P perl_cmd_warn (cmd_parms *parms, void *dummy, int arg)
-{
- dPSRV(parms->server);
- MP_TRACE_d(fprintf(stderr, "perl_cmd_warn: %d\n", arg));
- cls->PerlWarn = arg;
-#ifdef PERL_SECTIONS
- if(arg && PERL_RUNNING()) dowarn = TRUE;
-#endif
- return NULL;
-}
-
-CHAR_P perl_cmd_fresh_restart (cmd_parms *parms, void *dummy, int arg)
-{
- dPSRV(parms->server);
- MP_TRACE_d(fprintf(stderr, "perl_cmd_fresh_restart: %d\n", arg));
- cls->FreshRestart = arg;
- return NULL;
-}
-
-CHAR_P perl_cmd_sendheader (cmd_parms *cmd, perl_dir_config *rec, int arg) {
- if(arg)
- MP_SENDHDR_on(rec);
- else
- MP_SENDHDR_off(rec);
- MP_SENTHDR_on(rec);
- return NULL;
-}
-
-CHAR_P perl_cmd_pass_env (cmd_parms *parms, void *dummy, char *arg)
-{
- dPSRV(parms->server);
- if(PERL_RUNNING()) {
- mp_PassEnv(arg);
- }
-
- *(char **)push_array(cls->PerlPassEnv) = pstrdup(parms->pool, arg);
-
- MP_TRACE_d(fprintf(stderr, "perl_cmd_pass_env: arg=`%s'\n", arg));
- arg = NULL;
- return NULL;
-}
-
-CHAR_P perl_cmd_env (cmd_parms *cmd, perl_dir_config *rec, int arg) {
- if(arg) MP_ENV_on(rec);
- else MP_ENV_off(rec);
- MP_TRACE_d(fprintf(stderr, "perl_cmd_env: set to `%s'\n", arg ? "On" : "Off"));
- return NULL;
-}
-
-CHAR_P perl_cmd_var(cmd_parms *cmd, void *config, char *key, char *val)
-{
- perl_dir_config *rec = (perl_dir_config *)config;
-
- MP_TRACE_d(fprintf(stderr, "perl_cmd_var: '%s' = '%s'\n", key, val));
-
- if (cmd->info) {
- table_add(rec->vars, key, val);
- }
- else {
- table_set(rec->vars, key, val);
- }
-
- if (cmd->path == NULL) {
- dPSRV(cmd->server);
- if (cmd->info) {
- table_add(cls->vars, key, val);
- }
- else {
- table_set(cls->vars, key, val);
- }
- }
-
- return NULL;
-}
-
-CHAR_P perl_cmd_setenv(cmd_parms *cmd, perl_dir_config *rec, char *key, char *val)
-{
- table_set(rec->env, key, val);
- MP_HASENV_on(rec);
- MP_TRACE_d(fprintf(stderr, "perl_cmd_setenv: '%s' = '%s'\n", key, val));
- if(cmd->path == NULL) {
- dPSRV(cmd->server);
- if(PERL_RUNNING()) {
- mp_SetEnv(key,val);
- }
- *(char **)push_array(cls->PerlPassEnv) =
- pstrcat(cmd->pool, key, ":", val, NULL);
- }
- return NULL;
-}
-
-CHAR_P perl_config_END (cmd_parms *parms, void *dummy, const char *arg)
-{
- char l[MAX_STRING_LEN];
-
- while (!(cfg_getline (l, MAX_STRING_LEN, cmd_infile))) {
- /* soak up the of the file */
- }
-
- return NULL;
-}
-
-#if 0
-#define APACHE_POD_FORMAT(s) \
- (strnEQ(s, "httpd", 5) || strnEQ(s, "apache", 6))
-
-CHAR_P perl_pod_section (cmd_parms *parms, void *dummy, const char *arg)
-{
- char l[MAX_STRING_LEN];
-
- if(arg && strlen(arg) && !APACHE_POD_FORMAT(arg))
- return "Unknown =end format";
-
- while (!(cfg_getline (l, MAX_STRING_LEN, cmd_infile))) {
- int chop = 4;
- if(strnEQ(l, "=cut", 4))
- break;
- if(strnEQ(l, "=for", chop) ||
- ((chop = 6) && strnEQ(l, "=begin", chop)))
- {
- char *tmp = l;
- tmp += chop; while(isspace(*tmp)) tmp++;
- if(APACHE_POD_FORMAT(tmp))
- break;
- }
- }
-
- return NULL;
-}
-#else
-#define APACHE_POD_FORMAT(s) \
- (strstr(s, "httpd") || strstr(s, "apache"))
-
-CHAR_P perl_pod_section (cmd_parms *parms, void *dummy, const char *arg)
-{
- char line[MAX_STRING_LEN];
-
- if(arg && strlen(arg) && !(APACHE_POD_FORMAT(arg) || strstr(arg, "pod")))
- return "Unknown =back format";
-
- while (!(cfg_getline (line, sizeof(line), cmd_infile))) {
- if(strnEQ(line, "=cut", 4))
- break;
- if(strnEQ(line, "=over", 5)) {
- if(APACHE_POD_FORMAT(line))
- break;
- }
- }
-
- return NULL;
-}
-#endif
-
-static const char perl_pod_end_magic[] = "=cut without =pod";
-
-CHAR_P perl_pod_end_section (cmd_parms *cmd, void *dummy) {
- return NULL;
-}
-
-void mod_perl_cleanup_sv(void *data)
-{
- SV *sv = (SV*)data;
- if (SvREFCNT(sv)) {
- MP_TRACE_g(fprintf(stderr, "cleanup_sv: SvREFCNT(0x%lx)==%d\n",
- (unsigned long)sv, (int)SvREFCNT(sv)));
- SvREFCNT_dec(sv);
- }
-}
-
-#ifdef PERL_DIRECTIVE_HANDLERS
-
-CHAR_P perl_cmd_perl_TAKE1(cmd_parms *cmd, mod_perl_perl_dir_config *data, char *one)
-{
- return perl_cmd_perl_TAKE123(cmd, data, one, NULL, NULL);
-}
-
-CHAR_P perl_cmd_perl_TAKE2(cmd_parms *cmd, mod_perl_perl_dir_config *data, char *one, char *two)
-{
- return perl_cmd_perl_TAKE123(cmd, data, one, two, NULL);
-}
-
-CHAR_P perl_cmd_perl_FLAG(cmd_parms *cmd, mod_perl_perl_dir_config *data, int flag)
-{
- char buf[2];
- ap_snprintf(buf, sizeof(buf), "%d", flag);
- return perl_cmd_perl_TAKE123(cmd, data, buf, NULL, NULL);
-}
-
-static SV *perl_bless_cmd_parms(cmd_parms *parms)
-{
- SV *sv = sv_newmortal();
- sv_setref_pv(sv, "Apache::CmdParms", (void*)parms);
- MP_TRACE_g(fprintf(stderr, "blessing cmd_parms=(0x%lx)\n",
- (unsigned long)parms));
- return sv;
-}
-
-module *perl_get_module_ptr(char *name, int len)
-{
- HV *xs_config = perl_get_hv("Apache::XS_ModuleConfig", TRUE);
- SV **mod_ptr = hv_fetch(xs_config, name, len, FALSE);
- if(mod_ptr && *mod_ptr)
- return (module *)SvIV((SV*)SvRV(*mod_ptr));
- else
- return NULL;
-}
-
-static SV *
-perl_perl_create_cfg(SV **sv, HV *pclass, cmd_parms *parms, char *type)
-{
- GV *gv;
-
- if(*sv && SvTRUE(*sv) && SvROK(*sv) && sv_isobject(*sv))
- return *sv;
-
- /* return $class->type if $class->can(type) */
- if((gv = gv_fetchmethod_autoload(pclass, type, FALSE)) && isGV(gv)) {
- int count;
- dSP;
-
- ENTER;SAVETMPS;
- PUSHMARK(sp);
- XPUSHs(sv_2mortal(newSVpv(HvNAME(pclass),0)));
- if(parms)
- XPUSHs(perl_bless_cmd_parms(parms));
- PUTBACK;
- count = perl_call_sv((SV*)GvCV(gv), G_EVAL | G_SCALAR);
- SPAGAIN;
- if((perl_eval_ok(parms ? parms->server : NULL) == OK) && (count == 1)) {
- *sv = POPs;
- ++SvREFCNT(*sv);
- }
- PUTBACK;
- FREETMPS;LEAVE;
-
- return *sv;
- }
- else {
- /* return bless {}, $class */
- if(!SvTRUE(*sv)) {
- *sv = newRV_noinc((SV*)newHV());
- return sv_bless(*sv, pclass);
- }
- else
- return *sv;
- }
-}
-
-static SV *perl_perl_create_dir_config(SV **sv, HV *pclass, cmd_parms *parms)
-{
- return perl_perl_create_cfg(sv, pclass, parms, PERL_DIR_CREATE);
-}
-
-static SV *perl_perl_create_srv_config(SV **sv, HV *pclass, cmd_parms *parms)
-{
- return perl_perl_create_cfg(sv, pclass, parms, PERL_SERVER_CREATE);
-}
-
-static void *perl_perl_merge_cfg(pool *p, void *basev, void *addv, char *meth)
-{
- GV *gv;
- mod_perl_perl_dir_config *mrg = NULL,
- *basevp = (mod_perl_perl_dir_config *)basev,
- *addvp = (mod_perl_perl_dir_config *)addv;
-
- SV *sv=Nullsv,
- *basesv = basevp ? basevp->obj : Nullsv,
- *addsv = addvp ? addvp->obj : Nullsv;
-
- if(!basesv) basesv = addsv;
- if(!sv_isobject(basesv))
- return basesv;
-
- MP_TRACE_c(fprintf(stderr, "looking for method %s in package `%s'\n",
- meth, SvCLASS(basesv)));
-
- if((gv = gv_fetchmethod_autoload(SvSTASH(SvRV(basesv)), meth, FALSE)) && isGV(gv)) {
- int count;
- dSP;
- mrg = (mod_perl_perl_dir_config *)
- palloc(p, sizeof(mod_perl_perl_dir_config));
-
- MP_TRACE_c(fprintf(stderr, "calling %s->%s\n",
- SvCLASS(basesv), meth));
-
- ENTER;SAVETMPS;
- PUSHMARK(sp);
- XPUSHs(basesv);XPUSHs(addsv);
- PUTBACK;
- count = perl_call_sv((SV*)GvCV(gv), G_EVAL | G_SCALAR);
- SPAGAIN;
- if((perl_eval_ok(NULL) == OK) && (count == 1)) {
- sv = POPs;
- ++SvREFCNT(sv);
- mrg->pclass = SvCLASS(sv);
- }
- PUTBACK;
- FREETMPS;LEAVE;
- }
- else {
- sv = newSVsv(basesv);
- mrg->pclass = basevp->pclass;
- }
-
- if (sv) {
- mrg->obj = sv;
- register_cleanup(p, (void*)mrg,
- perl_perl_cmd_cleanup, mod_perl_noop);
-
- }
-
- return (void *)mrg;
-}
-
-void *perl_perl_merge_dir_config(pool *p, void *basev, void *addv)
-{
- return perl_perl_merge_cfg(p, basev, addv, PERL_DIR_MERGE);
-}
-
-void *perl_perl_merge_srv_config(pool *p, void *basev, void *addv)
-{
- return perl_perl_merge_cfg(p, basev, addv, PERL_SERVER_MERGE);
-}
-
-void perl_perl_cmd_cleanup(void *data)
-{
- mod_perl_perl_dir_config *cld = (mod_perl_perl_dir_config *)data;
-
- if(cld->obj) {
- MP_TRACE_c(fprintf(stderr,
- "cmd_cleanup: SvREFCNT($%s::$obj) == %d\n",
- cld->pclass, (int)SvREFCNT(cld->obj)));
- SvREFCNT_dec(cld->obj);
- }
-}
-
-CHAR_P perl_cmd_perl_TAKE123(cmd_parms *cmd, mod_perl_perl_dir_config *data,
- char *one, char *two, char *three)
-{
- dSP;
- mod_perl_cmd_info *info = (mod_perl_cmd_info *)cmd->info;
- char *subname = info->subname, *retval = NULL;
- int count = 0;
- CV *cv = perl_get_cv(subname, TRUE);
- SV *obj;
- bool has_empty_proto = (SvPOK(cv) && (SvLEN(cv) == 1));
- module *xsmod = perl_get_module_ptr(data->pclass, strlen(data->pclass));
- mod_perl_perl_dir_config *sdata = NULL;
- obj = perl_perl_create_dir_config(&data->obj, CvSTASH(cv), cmd);
-
- if(xsmod &&
- (sdata = (mod_perl_perl_dir_config *)get_module_config(cmd->server->module_config, xsmod))) {
- (void)perl_perl_create_srv_config(&sdata->obj, CvSTASH(cv), cmd);
- set_module_config(cmd->server->module_config, xsmod, sdata);
- }
-
- ENTER;SAVETMPS;
- PUSHMARK(sp);
- if(!has_empty_proto) {
- SV *cmd_obj = perl_bless_cmd_parms(cmd);
- XPUSHs(obj);
- XPUSHs(cmd_obj);
- if(cmd->cmd->args_how != NO_ARGS) {
- PUSHif(one);PUSHif(two);PUSHif(three);
- }
- if(SvPOK(cv) && (*(SvEND((SV*)cv)-1) == '*')) {
- SV *gp = mod_perl_gensym("Apache::CmdParms");
- sv_magic((SV*)SvRV(gp), cmd_obj, 'q', Nullch, 0);
- XPUSHs(gp);
- }
- }
- PUTBACK;
- count = perl_call_sv((SV*)cv, G_EVAL | G_SCALAR);
- SPAGAIN;
- if(count == 1) {
- if(strEQ(POPp, DECLINE_CMD))
- retval = DECLINE_CMD;
- PUTBACK;
- }
- FREETMPS;LEAVE;
-
- {
- dTHRCTX;
- if(SvTRUE(ERRSV))
- retval = SvPVX(ERRSV);
- }
-
- return retval;
-}
-#endif /* PERL_DIRECTIVE_HANDLERS */
-
-#ifdef PERL_SECTIONS
-#if HAS_CONTEXT
-#define perl_set_config_vectors ap_set_config_vectors
-#else
-void *perl_set_config_vectors(cmd_parms *parms, void *config, module *mod)
-{
- void *mconfig = get_module_config(config, mod);
- void *sconfig = get_module_config(parms->server->module_config, mod);
-
- if (!mconfig && mod->create_dir_config) {
- mconfig = (*mod->create_dir_config) (parms->pool, parms->path);
- set_module_config(config, mod, mconfig);
- }
-
- if (!sconfig && mod->create_server_config) {
- sconfig = (*mod->create_server_config) (parms->pool, parms->server);
- set_module_config(parms->server->module_config, mod, sconfig);
- }
- return mconfig;
-}
-#endif
-
-
-CHAR_P perl_srm_command_loop(cmd_parms *parms, SV *sv)
-{
- char l[MAX_STRING_LEN];
-
- if(PERL_RUNNING()) {
- sv_catpvf(sv, "package %s;", PERL_SECTIONS_PACKAGE);
- sv_catpvf(sv, "\n\n#line %d %s\n", cmd_linenum+1, cmd_filename);
- }
-
- while (!(cfg_getline (l, MAX_STRING_LEN, cmd_infile))) {
- if(strncasecmp(l, "</Perl>", 7) == 0)
- break;
- if(PERL_RUNNING()) {
- sv_catpv(sv, l);
- sv_catpvn(sv, "\n", 1);
- }
- }
-
- return NULL;
-}
-
-#define dSEC \
- const char *key; \
- I32 klen; \
- SV *val
-
-#define dSECiter_start \
- (void)hv_iterinit(hv); \
- while ((val = hv_iternextsv(hv, (char **) &key, &klen))) { \
- HV *tab = Nullhv; \
- AV *entries = Nullav; \
- if(SvMAGICAL(val)) mg_get(val); \
- if(SvROK(val) && (SvTYPE(SvRV(val)) == SVt_PVHV)) \
- tab = (HV *)SvRV(val); \
- else if(SvROK(val) && (SvTYPE(SvRV(val)) == SVt_PVAV)) \
- entries = (AV *)SvRV(val); \
- else \
- croak("value of `%s' is not a HASH or ARRAY reference!", key); \
- if(entries || tab) { \
-
-#define dSECiter_stop \
- } \
- }
-
-#define SECiter_list(t) \
-{ \
- I32 i; \
- for(i=0; i<=AvFILL(entries); i++) { \
- SV *rv = *av_fetch(entries, i, FALSE); \
- HV *nhv; \
- if(!SvROK(rv) || (SvTYPE(SvRV(rv)) != SVt_PVHV)) \
- croak("not a HASH reference!"); \
- nhv = newHV(); \
- hv_store(nhv, (char*)key, klen, SvREFCNT_inc(rv), FALSE); \
- tab = nhv; \
- t; \
- SvREFCNT_dec(nhv); \
- } \
- entries = Nullav; \
- continue; \
-}
-
-void perl_section_hash_walk(cmd_parms *cmd, void *cfg, HV *hv)
-{
- dTHR;
- CHAR_P errmsg;
- char *tmpkey;
- I32 tmpklen;
- SV *tmpval;
- void *old_info = cmd->info;
-
- (void)hv_iterinit(hv);
- while ((tmpval = hv_iternextsv(hv, &tmpkey, &tmpklen))) {
- char line[MAX_STRING_LEN];
- char *value = NULL;
- if (SvMAGICAL(tmpval)) mg_get(tmpval); /* tied hash FETCH */
- if(SvROK(tmpval)) {
- if(SvTYPE(SvRV(tmpval)) == SVt_PVAV) {
- perl_handle_command_av((AV*)SvRV(tmpval),
- 0, tmpkey, cmd, cfg);
- continue;
- }
- else if(SvTYPE(SvRV(tmpval)) == SVt_PVHV) {
- perl_handle_command_hv((HV*)SvRV(tmpval),
- tmpkey, cmd, cfg);
- continue;
- }
- }
- else
- value = SvPV(tmpval,na);
-
- sprintf(line, "%s %s", tmpkey, value);
- errmsg = handle_command(cmd, cfg, line);
- MP_TRACE_s(fprintf(stderr, "%s (%s) Limit=%s\n",
- line,
- (errmsg ? errmsg : "OK"),
- (cmd->limited > 0 ? "yes" : "no") ));
- if(errmsg)
- log_printf(cmd->server, "<Perl>: %s", errmsg);
- }
-
- cmd->info = old_info;
-
- /* Emulate the handling of end token for the section */
- perl_set_config_vectors(cmd, cfg, &core_module);
-}
-
-#ifdef WIN32
-#define USE_ICASE REG_ICASE
-#else
-#define USE_ICASE 0
-#endif
-
-#define SECTION_NAME(n) n
-
-#define TRACE_SECTION(n,v) \
- MP_TRACE_s(fprintf(stderr, "perl_section: <%s %s>\n", n, v))
-
-#define TRACE_SECTION_END(n) \
- MP_TRACE_s(fprintf(stderr, "perl_section: </%s>\n", n))
-
-/* XXX, had to copy-n-paste much code from http_core.c for
- * perl_*sections, would be nice if the core config routines
- * had a handful of callback hooks instead
- */
-
-CHAR_P perl_virtualhost_section (cmd_parms *cmd, void *dummy, HV *hv)
-{
- dSEC;
- server_rec *main_server = cmd->server, *s;
- pool *p = cmd->pool;
- char *arg;
- const char *errmsg = NULL;
- dSECiter_start
-
- if(entries) {
- SECiter_list(perl_virtualhost_section(cmd, dummy, tab));
- }
-
- arg = pstrdup(cmd->pool, getword_conf (cmd->pool, &key));
-
-#if MODULE_MAGIC_NUMBER >= 19970912
- errmsg = init_virtual_host(p, arg, main_server, &s);
-#else
- s = init_virtual_host(p, arg, main_server);
-#endif
-
- if (errmsg)
- return errmsg;
-
- s->next = main_server->next;
- main_server->next = s;
- cmd->server = s;
-
-#if MODULE_MAGIC_AT_LEAST(19990320, 5)
- s->defn_name = cmd->config_file->name;
- s->defn_line_number = cmd->config_file->line_number;
-#endif
-
- TRACE_SECTION("VirtualHost", arg);
-
- perl_section_hash_walk(cmd, s->lookup_defaults, tab);
-
- cmd->server = main_server;
-
- dSECiter_stop
- TRACE_SECTION_END("VirtualHost");
- return NULL;
-}
-
-#if MODULE_MAGIC_NUMBER > 19970719 /* 1.3a1 */
-#include "fnmatch.h"
-#ifdef WIN32
-#define test__is_match(conf)
-#else
-#define test__is_match(conf) conf->d_is_fnmatch = is_fnmatch( conf->d ) != 0
-#endif
-#else
-#define test__is_match(conf) conf->d_is_matchexp = is_matchexp( conf->d )
-#endif
-
-CHAR_P perl_urlsection (cmd_parms *cmd, void *dummy, HV *hv)
-{
- dSEC;
- int old_overrides = cmd->override;
- char *old_path = cmd->path;
-#ifdef PERL_TRACE
- char *sname = SECTION_NAME("Location");
-#endif
-
- dSECiter_start
-
- core_dir_config *conf;
- regex_t *r = NULL;
-
- void *new_url_conf;
-
- if(entries) {
- SECiter_list(perl_urlsection(cmd, dummy, tab));
- }
-
- new_url_conf = create_per_dir_config (cmd->pool);
-
- cmd->path = pstrdup(cmd->pool, getword_conf (cmd->pool, &key));
- cmd->override = OR_ALL|ACCESS_CONF;
-
- if (cmd->info) { /* <LocationMatch> */
- r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
- }
- else if (!strcmp(cmd->path, "~")) {
- cmd->path = getword_conf (cmd->pool, &key);
- r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
- }
-
- TRACE_SECTION(sname, cmd->path);
-
- perl_section_hash_walk(cmd, new_url_conf, tab);
-
- conf = (core_dir_config *)get_module_config(
- new_url_conf, &core_module);
- conf->d = pstrdup(cmd->pool, cmd->path);
- test__is_match(conf);
- conf->r = r;
-
- add_per_url_conf (cmd->server, new_url_conf);
-
- dSECiter_stop
-
- cmd->path = old_path;
- cmd->override = old_overrides;
- TRACE_SECTION_END(sname);
- return NULL;
-}
-
-CHAR_P perl_dirsection (cmd_parms *cmd, void *dummy, HV *hv)
-{
- dSEC;
- int old_overrides = cmd->override;
- char *old_path = cmd->path;
-#ifdef PERL_TRACE
- char *sname = SECTION_NAME("Directory");
-#endif
-
- dSECiter_start
-
- core_dir_config *conf;
- void *new_dir_conf;
- regex_t *r = NULL;
-
- if(entries) {
- SECiter_list(perl_dirsection(cmd, dummy, tab));
- }
-
- new_dir_conf = create_per_dir_config (cmd->pool);
-
- cmd->path = pstrdup(cmd->pool, getword_conf (cmd->pool, &key));
-
-#ifdef __EMX__
- /* Fix OS/2 HPFS filename case problem. */
- cmd->path = strlwr(cmd->path);
-#endif
- cmd->override = OR_ALL|ACCESS_CONF;
-
- if (cmd->info) { /* <DirectoryMatch> */
- r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
- }
- else if (!strcmp(cmd->path, "~")) {
- cmd->path = getword_conf (cmd->pool, &key);
- r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
- }
-
- TRACE_SECTION(sname, cmd->path);
-
- perl_section_hash_walk(cmd, new_dir_conf, tab);
-
- conf = (core_dir_config *)get_module_config(new_dir_conf, &core_module);
- conf->r = r;
-
- add_per_dir_conf (cmd->server, new_dir_conf);
-
- dSECiter_stop
-
- cmd->path = old_path;
- cmd->override = old_overrides;
- TRACE_SECTION_END(sname);
- return NULL;
-}
-
-#if !HAS_CONTEXT
-static void add_file_conf(core_dir_config *conf, void *url_config)
-{
- void **new_space = (void **) push_array (conf->sec);
- *new_space = url_config;
-}
-#endif
-
-CHAR_P perl_filesection (cmd_parms *cmd, void *dummy, HV *hv)
-{
- dSEC;
- int old_overrides = cmd->override;
- char *old_path = cmd->path;
-#ifdef PERL_TRACE
- char *sname = SECTION_NAME("Files");
-#endif
-
- dSECiter_start
-
- core_dir_config *conf;
- void *new_file_conf;
- regex_t *r = NULL;
-
- if(entries) {
- SECiter_list(perl_filesection(cmd, dummy, tab));
- }
-
- new_file_conf = create_per_dir_config (cmd->pool);
-
- cmd->path = pstrdup(cmd->pool, getword_conf (cmd->pool, &key));
- /* Only if not an .htaccess file */
- if (!old_path)
- cmd->override = OR_ALL|ACCESS_CONF;
-
- if (cmd->info) { /* <FilesMatch> */
- r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
- }
- else if (!strcmp(cmd->path, "~")) {
- cmd->path = getword_conf (cmd->pool, &key);
- if (old_path && cmd->path[0] != '/' && cmd->path[0] != '^')
- cmd->path = pstrcat(cmd->pool, "^", old_path, cmd->path, NULL);
- r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
- }
- else if (old_path && cmd->path[0] != '/')
- cmd->path = pstrcat(cmd->pool, old_path, cmd->path, NULL);
-
- TRACE_SECTION(sname, cmd->path);
-
- perl_section_hash_walk(cmd, new_file_conf, tab);
-
- conf = (core_dir_config *)get_module_config(new_file_conf, &core_module);
- if(!conf->opts)
- conf->opts = OPT_NONE;
- conf->d = pstrdup(cmd->pool, cmd->path);
- test__is_match(conf);
- conf->r = r;
-
- add_file_conf((core_dir_config *)dummy, new_file_conf);
-
- dSECiter_stop
- TRACE_SECTION_END(sname);
- cmd->path = old_path;
- cmd->override = old_overrides;
-
- return NULL;
-}
-
-CHAR_P perl_limit_section(cmd_parms *cmd, void *dummy, HV *hv)
-{
- SV *sv;
- char *methods;
- module *mod = top_module;
- const command_rec *nrec = find_command_in_modules("<Limit", &mod);
- const command_rec *orec = cmd->cmd;
- /*void *ac = (void*)create_default_per_dir_config(cmd->pool);*/
-
- if(nrec)
- cmd->cmd = nrec;
-
- if(hv_exists(hv,"METHODS", 7))
- sv = hv_delete(hv, "METHODS", 7, G_SCALAR);
- else
- return NULL;
-
- methods = SvPOK(sv) ? SvPVX(sv) : "";
-
- MP_TRACE_s(fprintf(stderr,
- "Found Limit section for `%s'\n",
- methods ? methods : "all methods"));
-
- limit_section(cmd, dummy, methods);
- perl_section_hash_walk(cmd, dummy, hv);
- cmd->limited = -1;
- cmd->cmd = orec;
-
- return NULL;
-}
-
-static const char perl_end_magic[] = "</Perl> outside of any <Perl> section";
-
-CHAR_P perl_end_section (cmd_parms *cmd, void *dummy) {
- return perl_end_magic;
-}
-
-#define STRICT_PERL_SECTIONS_SV \
-perl_get_sv("Apache::Server::StrictPerlSections", FALSE)
-
-void perl_handle_command(cmd_parms *cmd, void *config, char *line)
-{
- CHAR_P errmsg;
- SV *sv;
-
- MP_TRACE_s(fprintf(stderr, "handle_command (%s): ", line));
- if ((errmsg = handle_command(cmd, config, line))) {
- if ((sv = STRICT_PERL_SECTIONS_SV) && SvTRUE(sv)) {
- croak("<Perl>: %s", errmsg);
- }
- else {
- log_printf(cmd->server, "<Perl>: %s", errmsg);
- }
- }
-
- MP_TRACE_s(fprintf(stderr, "%s\n", errmsg ? errmsg : "OK"));
-}
-
-void perl_handle_command_hv(HV *hv, char *key, cmd_parms *cmd, void *config)
-{
- /* Emulate the handing of the begin token of the section */
- void *dummy = perl_set_config_vectors(cmd, config, &core_module);
- void *old_info = cmd->info;
-
- cmd->info = (void *)strstr(key, "Match");
-
- if(strnEQ(key, "Location", 8))
- perl_urlsection(cmd, dummy, hv);
- else if(strnEQ(key, "Directory", 9))
- perl_dirsection(cmd, dummy, hv);
- else if(strEQ(key, "VirtualHost"))
- perl_virtualhost_section(cmd, dummy, hv);
- else if(strnEQ(key, "Files", 5))
- perl_filesection(cmd, (core_dir_config *)dummy, hv);
- else if(strEQ(key, "Limit"))
- perl_limit_section(cmd, config, hv);
-
- cmd->info = old_info;
-}
-
-void perl_handle_command_av(AV *av, I32 n, char *key, cmd_parms *cmd, void *config)
-{
- I32 alen = AvFILL(av);
- I32 i, j;
- U8 oldwarn = dowarn; /*XXX, hmm*/
- dowarn = FALSE;
-
- if(!n) n = alen+1;
-
- for(i=0; i<=alen; i+=n) {
- SV *fsv;
- if(AvFILL(av) < 0)
- break;
-
- fsv = *av_fetch(av, 0, FALSE);
-
- if(SvROK(fsv)) {
- i -= n;
- perl_handle_command_av((AV*)SvRV(av_shift(av)), 0,
- key, cmd, config);
- }
- else {
- int do_quote = cmd->cmd->args_how != RAW_ARGS;
- SV *sv = newSV(0);
- sv_catpv(sv, key);
- if (do_quote) {
- sv_catpvn(sv, " \"", 2);
- }
- else {
- sv_catpvn(sv, " ", 1);
- }
- for(j=1; j<=n; j++) {
- sv_catsv(sv, av_shift(av));
- if (j != n) {
- if (do_quote) {
- sv_catpvn(sv, "\" \"", 3);
- }
- else {
- sv_catpvn(sv, " ", 1);
- }
- }
- }
- if (do_quote) {
- sv_catpvn(sv,"\"", 1);
- }
- perl_handle_command(cmd, config, SvPVX(sv));
- SvREFCNT_dec(sv);
- }
- }
- dowarn = oldwarn;
-}
-
-#ifdef PERL_TRACE
-char *splain_args(enum cmd_how args_how) {
- switch(args_how) {
- case RAW_ARGS:
- return "RAW_ARGS";
- case TAKE1:
- return "TAKE1";
- case TAKE2:
- return "TAKE2";
- case ITERATE:
- return "ITERATE";
- case ITERATE2:
- return "ITERATE2";
- case FLAG:
- return "FLAG";
- case NO_ARGS:
- return "NO_ARGS";
- case TAKE12:
- return "TAKE12";
- case TAKE3:
- return "TAKE3";
- case TAKE23:
- return "TAKE23";
- case TAKE123:
- return "TAKE123";
- case TAKE13:
- return "TAKE13";
- default:
- return "__UNKNOWN__";
- };
-}
-#endif
-
-void perl_section_hash_init(char *name, I32 dotie)
-{
- dTHR;
- GV *gv;
- ENTER;
- save_hptr(&curstash);
- curstash = gv_stashpv(PERL_SECTIONS_PACKAGE, GV_ADDWARN);
- gv = GvHV_init(name);
- if(dotie && !perl_sections_self_boot)
- perl_tie_hash(GvHV(gv), "Tie::IxHash", Nullsv);
- LEAVE;
-}
-
-void perl_section_self_boot(cmd_parms *parms, void *dummy, const char *arg)
-{
- HV *symtab;
- SV *nk;
- if(!PERL_RUNNING()) perl_startup(parms->server, parms->pool);
-
- if(!(symtab = gv_stashpv(PERL_SECTIONS_PACKAGE, FALSE)))
- return;
-
- nk = perl_eval_pv("scalar(keys %ApacheReadConfig::);",TRUE);
- if(!SvIV(nk))
- return;
-
- MP_TRACE_s(fprintf(stderr,
- "bootstrapping <Perl> sections: arg=%s, keys=%d\n",
- arg, (int)SvIV(nk)));
-
- perl_sections_boot_module = arg;
- perl_sections_self_boot = 1;
- perl_section(parms, dummy, NULL);
- perl_sections_self_boot = 0;
- perl_sections_boot_module = NULL;
-
- /* make sure this module is re-loaded for the second config read */
- if(PERL_RUNNING() == 1) {
- SV *file = Nullsv;
- if(arg) {
- if(strrchr(arg, '/') || strrchr(arg, '.'))
- file = newSVpv((char *)arg,0);
- else
- file = perl_module2file((char *)arg);
- }
-
- if(file && hv_exists_ent(GvHV(incgv), file, FALSE)) {
- MP_TRACE_s(fprintf(stderr,
- "mod_perl: delete $INC{'%s'} (klen=%d)\n",
- SvPVX(file), SvCUR(file)));
- (void)hv_delete_ent(GvHV(incgv), file, G_DISCARD, FALSE);
- }
- if(file)
- SvREFCNT_dec(file);
- }
-}
-
-static int gvhv_is_stash(GV *gv)
-{
- int len = GvNAMELEN(gv);
- char *name = GvNAME(gv);
-
- if ((len > 2) &&
- (name[len - 1] == ':') &&
- (name[len - 2] == ':'))
- {
- return 1;
- }
-
- return 0;
-}
-
-/*
- * we do not clear symbols within packages, the desired behavior
- * for directive handler classes. and there should never be a package
- * within the %Apache::ReadConfig. nothing else that i'm aware of calls
- * this function, so we should be ok.
- */
-void perl_clear_symtab(HV *symtab)
-{
- SV *val;
- char *key;
- I32 klen;
-
- (void)hv_iterinit(symtab);
- while ((val = hv_iternextsv(symtab, &key, &klen))) {
- SV *sv;
- HV *hv;
- AV *av;
- CV *cv;
- dTHR;
-
- if((SvTYPE(val) != SVt_PVGV) || GvIMPORTED((GV*)val))
- continue;
- if((sv = GvSV((GV*)val)))
- sv_setsv(GvSV((GV*)val), &sv_undef);
- if((hv = GvHV((GV*)val)) && !gvhv_is_stash((GV*)val))
- hv_clear(hv);
- if((av = GvAV((GV*)val)))
- av_clear(av);
- if((cv = GvCV((GV*)val)) && (GvSTASH((GV*)val) == GvSTASH(CvGV(cv)))) {
- GV *gv = CvGV(cv);
- cv_undef(cv);
- CvGV(cv) = gv;
- GvCVGEN(gv) = 1; /* invalidate method cache */
- }
- }
-}
-
-CHAR_P perl_section (cmd_parms *parms, void *dummy, const char *arg)
-{
- CHAR_P errmsg;
- SV *code, *val;
- HV *symtab;
- char *key;
- I32 klen, dotie=FALSE;
- char line[MAX_STRING_LEN];
- /* Use the parser context */
- void *config = USABLE_CONTEXT;
-
- if(!PERL_RUNNING()) perl_startup(parms->server, parms->pool);
- require_Apache(parms->server);
-
- if(PERL_RUNNING()) {
- code = newSV(0);
- sv_setpv(code, "");
- if(arg)
- errmsg = perl_srm_command_loop(parms, code);
- }
- else {
- MP_TRACE_s(fprintf(stderr,
- "perl_section: Perl not running, returning...\n"));
- return NULL;
- }
-
- if((perl_require_module("Tie::IxHash", NULL) == OK))
- dotie = TRUE;
-
- perl_section_hash_init("Location", dotie);
- perl_section_hash_init("LocationMatch", dotie);
- perl_section_hash_init("VirtualHost", dotie);
- perl_section_hash_init("Directory", dotie);
- perl_section_hash_init("DirectoryMatch", dotie);
- perl_section_hash_init("Files", dotie);
- perl_section_hash_init("FilesMatch", dotie);
- perl_section_hash_init("Limit", dotie);
-
- sv_setpv(perl_get_sv("0", TRUE), cmd_filename);
-
- ENTER_SAFE(parms->server, parms->pool);
- MP_TRACE_g(mod_perl_dump_opmask());
-
- {
- SV *server_sv = perl_get_sv("Apache::__SERVER", FALSE);
- IV ptr = SvIVX(SvRV(server_sv));
- SvIVX(SvRV(server_sv)) = (IV)parms->server;
- perl_eval_sv(code, G_DISCARD);
- SvIVX(SvRV(server_sv)) = (IV)ptr;
- }
-
- LEAVE_SAFE;
-
- {
- dTHR;
- dTHRCTX;
- if(SvTRUE(ERRSV)) {
- MP_TRACE_s(fprintf(stderr,
- "Apache::ReadConfig: %s\n", SvPV(ERRSV,na)));
- return SvPV(ERRSV,na);
- }
- }
-
- symtab = (HV*)gv_stashpv(PERL_SECTIONS_PACKAGE, FALSE);
- (void)hv_iterinit(symtab);
- while ((val = hv_iternextsv(symtab, &key, &klen))) {
- SV *sv;
- HV *hv;
- AV *av;
-
- if(SvTYPE(val) != SVt_PVGV)
- continue;
-
- if((sv = GvSV((GV*)val))) {
- if(SvTRUE(sv)) {
- if(STRING_MEAL(key)) {
- perl_eat_config_string(parms, config, sv);
- }
- else {
- STRLEN junk;
- MP_TRACE_s(fprintf(stderr, "SVt_PV: $%s = `%s'\n",
- key, SvPV(sv,junk)));
- sprintf(line, "%s %s", key, SvPV(sv,junk));
- perl_handle_command(parms, config, line);
- }
- }
- }
-
- if((hv = GvHV((GV*)val))) {
- perl_handle_command_hv(hv, key, parms, config);
- }
- else if((av = GvAV((GV*)val))) {
- module *tmod = top_module;
- const command_rec *c;
- I32 shift, alen = AvFILL(av);
-
- if(STRING_MEAL(key)) {
- SV *tmpsv;
- while((tmpsv = av_shift(av)) != &sv_undef)
- perl_eat_config_string(parms, config, tmpsv);
- continue;
- }
-
- if(!(c = find_command_in_modules((const char *)key, &tmod))) {
- fprintf(stderr, "command_rec for directive `%s' not found!\n", key);
- continue;
- }
-
- MP_TRACE_s(fprintf(stderr,
- "`@%s' directive is %s, (%d elements)\n",
- key, splain_args(c->args_how), (int)AvFILL(av)+1));
-
- switch (c->args_how) {
-
- case TAKE23:
- case TAKE2:
- shift = 2;
- break;
-
- case TAKE3:
- shift = 3;
- break;
-
- default:
- MP_TRACE_s(fprintf(stderr,
- "default: iterating over @%s\n", key));
- shift = 1;
- break;
- }
- if(shift > alen+1) shift = 1; /* elements are refs */
- perl_handle_command_av(av, shift, key, parms, config);
- }
- }
- SvREFCNT_dec(code);
- {
- SV *usv = perl_get_sv("Apache::Server::SaveConfig", FALSE);
- if(usv && SvTRUE(usv))
- ; /* keep it around */
- else
- perl_clear_symtab(symtab);
- }
- return NULL;
-}
-
-#endif /* PERL_SECTIONS */
-
-static int perl_hook_api(char *string)
-{
- char name[56];
- char *s;
-
- ap_cpystrn(name, string, sizeof(name));
- if (!(s = (char *)strstr(name, "Api"))) {
- return -1;
- }
- *s = '\0';
-
- if (strEQ(name, "Uri")) {
- /* s/^Uri$/URI/ */
- name[1] = toUPPER(name[1]);
- name[2] = toUPPER(name[2]);
- }
-
- /* XXX: assumes .xs is linked static */
- return perl_get_cv(form("Apache::%s::bootstrap", name), FALSE) != Nullcv;
-}
-
-int perl_hook(char *name)
-{
- switch (*name) {
- case 'A':
- if (strEQ(name, "Authen"))
-#ifdef PERL_AUTHEN
- return 1;
-#else
- return 0;
-#endif
- if (strEQ(name, "Authz"))
-#ifdef PERL_AUTHZ
- return 1;
-#else
- return 0;
-#endif
- if (strEQ(name, "Access"))
-#ifdef PERL_ACCESS
- return 1;
-#else
- return 0;
-#endif
- break;
- case 'C':
- if (strEQ(name, "ChildInit"))
-#ifdef PERL_CHILD_INIT
- return 1;
-#else
- return 0;
-#endif
- if (strEQ(name, "ChildExit"))
-#ifdef PERL_CHILD_EXIT
- return 1;
-#else
- return 0;
-#endif
- if (strEQ(name, "Cleanup"))
-#ifdef PERL_CLEANUP
- return 1;
-#else
- return 0;
-#endif
- break;
- case 'D':
- if (strEQ(name, "Dispatch"))
-#ifdef PERL_DISPATCH
- return 1;
-#else
- return 0;
-#endif
- if (strEQ(name, "DirectiveHandlers"))
-#ifdef PERL_DIRECTIVE_HANDLERS
- return 1;
-#else
- return 0;
-#endif
-
- break;
- case 'F':
- if (strEQ(name, "Fixup"))
-#ifdef PERL_FIXUP
- return 1;
-#else
- return 0;
-#endif
- break;
-#if MODULE_MAGIC_NUMBER >= 19970103
- case 'H':
- if (strEQ(name, "HeaderParser"))
-#ifdef PERL_HEADER_PARSER
- return 1;
-#else
- return 0;
-#endif
- break;
-#endif
-#if MODULE_MAGIC_NUMBER >= 19970103
- case 'I':
- if (strEQ(name, "Init"))
-#ifdef PERL_INIT
- return 1;
-#else
- return 0;
-#endif
- break;
-#endif
- case 'L':
- if (strEQ(name, "Log"))
-#ifdef PERL_LOG
- return 1;
-#else
- return 0;
-#endif
- break;
- case 'M':
- if (strEQ(name, "MethodHandlers"))
-#ifdef PERL_METHOD_HANDLERS
- return 1;
-#else
- return 0;
-#endif
- break;
- case 'P':
- if (strEQ(name, "PostReadRequest"))
-#ifdef PERL_POST_READ_REQUEST
- return 1;
-#else
- return 0;
-#endif
- break;
- case 'R':
- if (strEQ(name, "Restart"))
-#ifdef PERL_RESTART
- return 1;
-#else
- return 0;
-#endif
- case 'S':
- if (strEQ(name, "SSI"))
-#ifdef PERL_SSI
- return 1;
-#else
- return 0;
-#endif
- if (strEQ(name, "StackedHandlers"))
-#ifdef PERL_STACKED_HANDLERS
- return 1;
-#else
- return 0;
-#endif
- if (strEQ(name, "Sections"))
-#ifdef PERL_SECTIONS
- return 1;
-#else
- return 0;
-#endif
- break;
- case 'T':
- if (strEQ(name, "Trans"))
-#ifdef PERL_TRANS
- return 1;
-#else
- return 0;
-#endif
- if (strEQ(name, "Type"))
-#ifdef PERL_TYPE
- return 1;
-#else
- return 0;
-#endif
- break;
- }
-
- return perl_hook_api(name);
-}
-
diff --git a/tags/v1_29/src/modules/perl/perl_util.c b/tags/v1_29/src/modules/perl/perl_util.c
deleted file mode 100644
index 0d03671..0000000
--- a/tags/v1_29/src/modules/perl/perl_util.c
+++ /dev/null
@@ -1,949 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1996-2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
-
-#include "mod_perl.h"
-
-static HV *mod_perl_endhv = Nullhv;
-static int set_ids = 0;
-
-void perl_util_cleanup(void)
-{
- hv_undef(mod_perl_endhv);
- SvREFCNT_dec((SV*)mod_perl_endhv);
- mod_perl_endhv = Nullhv;
-
- set_ids = 0;
-}
-
-SV *array_header2avrv(array_header *arr)
-{
- AV *av;
- int i;
- dTHR;
-
- iniAV(av);
- if(arr) {
- for (i = 0; i < arr->nelts; i++) {
- av_push(av, newSVpv(((char **) arr->elts)[i], 0));
- }
- }
- return newRV_noinc((SV*)av);
-}
-
-array_header *avrv2array_header(SV *avrv, pool *p)
-{
- AV *av = (AV*)SvRV(avrv);
- I32 i;
- array_header *arr = make_array(p, AvFILL(av)-1, sizeof(char *));
-
- for(i=0; i<=AvFILL(av); i++) {
- SV *sv = *av_fetch(av, i, FALSE);
- char **entry = (char **) push_array(arr);
- *entry = pstrdup(p, SvPV(sv,na));
- }
-
- return arr;
-}
-
-table *hvrv2table(SV *rv)
-{
- if(SvROK(rv) && SvTYPE(SvRV(rv)) == SVt_PVHV) {
- SV *sv = perl_hvrv_magic_obj(rv);
- if(!sv) croak("HV is not magic!");
- return (table *)SvIV((SV*)SvRV(sv));
- }
- return (table *)SvIV((SV*)SvRV(rv));
-}
-
-static char *r_keys[] = { "_r", "r", NULL };
-
-static request_rec *r_magic_get(SV *sv)
-{
- MAGIC *mg = mg_find(sv, '~');
- return mg ? (request_rec *)mg->mg_ptr : NULL;
-}
-
-request_rec *sv2request_rec(SV *in, char *pclass, CV *cv)
-{
- request_rec *r = NULL;
- SV *sv = Nullsv;
-
- if(in == &sv_undef) return NULL;
-
- if(SvROK(in) && (SvTYPE(SvRV(in)) == SVt_PVHV)) {
- int i;
- for (i=0; r_keys[i]; i++) {
- int klen = strlen(r_keys[i]);
- if(hv_exists((HV*)SvRV(in), r_keys[i], klen) &&
- (sv = *hv_fetch((HV*)SvRV(in),
- r_keys[i], klen, FALSE))) {
- if (SvROK(sv) && (SvTYPE(SvRV(sv)) == SVt_PVHV)) {
- /* dig deeper */
- return sv2request_rec(sv, pclass, cv);
- }
- break;
- }
- }
- if(!sv)
- croak("method `%s' invoked by a `%s' object with no `r' key!",
- GvNAME(CvGV(cv)), HvNAME(SvSTASH(SvRV(in))));
- }
-
- if(!sv) sv = in;
- if(SvROK(sv) && (SvTYPE(SvRV(sv)) == SVt_PVMG)) {
- if(sv_derived_from(sv, pclass)) {
- if((r = r_magic_get(SvRV(sv)))) {
- /* ~ magic */
- }
- else {
- r = (request_rec *) SvIV((SV*)SvRV(sv));
- }
- }
- else {
- return NULL;
- }
- }
- else if((r = perl_request_rec(NULL))) {
- /*ok*/
- }
- else {
- croak("Apache->%s called without setting Apache->request!",
- GvNAME(CvGV(cv)));
- }
- return r;
-}
-
-pool *perl_get_util_pool(void)
-{
- request_rec *r = NULL;
-
- if((r = perl_request_rec(NULL)))
- return r->pool;
- else
- return perl_get_startup_pool();
- return NULL;
-}
-
-pool *perl_get_startup_pool(void)
-{
- SV *sv = perl_get_sv("Apache::__POOL", FALSE);
- if(sv) {
- IV tmp = SvIV((SV*)SvRV(sv));
- return (pool *)tmp;
- }
- return NULL;
-}
-
-server_rec *perl_get_startup_server(void)
-{
- SV *sv = perl_get_sv("Apache::__SERVER", FALSE);
- if(sv) {
- IV tmp = SvIV((SV*)SvRV(sv));
- return (server_rec *)tmp;
- }
- return NULL;
-}
-
-void mod_perl_untaint(SV *sv)
-{
- if(!tainting) return;
- if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) {
- MAGIC *mg = mg_find(sv, 't');
- if (mg)
- mg->mg_len &= ~1;
- }
-}
-
-/* same as Symbol::gensym() */
-SV *mod_perl_gensym (char *pack)
-{
- GV *gv = newGVgen(pack);
- SV *rv = newRV((SV*)gv);
- (void)hv_delete(gv_stashpv(pack, TRUE),
- GvNAME(gv), GvNAMELEN(gv), G_DISCARD);
- return rv;
-}
-
-SV *mod_perl_slurp_filename(request_rec *r)
-{
- dTHR;
- PerlIO *fp;
- SV *insv;
-
- ENTER;
- save_item(rs);
- sv_setsv(rs, &sv_undef);
-
- fp = PerlIO_open(r->filename, "r");
- insv = newSV(r->finfo.st_size);
- sv_gets(insv, fp, 0); /*slurp*/
- PerlIO_close(fp);
- LEAVE;
- return newRV_noinc(insv);
-}
-
-SV *mod_perl_tie_table(table *t)
-{
- HV *hv = newHV();
- SV *sv = sv_newmortal();
-
- sv_setref_pv(sv, "Apache::table", (void*)t);
- perl_tie_hash(hv, "Apache::Table", sv);
- return sv_bless(sv_2mortal(newRV_noinc((SV*)hv)),
- gv_stashpv("Apache::Table", TRUE));
-}
-
-SV *perl_hvrv_magic_obj(SV *rv)
-{
- HV *hv = (HV*)SvRV(rv);
- MAGIC *mg;
- if(SvMAGICAL(hv) && (mg = mg_find((SV*)hv, 'P')))
- return mg->mg_obj;
- else
- return Nullsv;
-}
-
-
-void perl_tie_hash(HV *hv, char *pclass, SV *sv)
-{
- dSP;
- SV *obj, *varsv = (SV*)hv;
- char *methname = "TIEHASH";
- dTHRCTX;
-
- ENTER;
- SAVETMPS;
- PUSHMARK(sp);
- XPUSHs(sv_2mortal(newSVpv(pclass,0)));
- if(sv) XPUSHs(sv);
- PUTBACK;
- perl_call_method(methname, G_EVAL | G_SCALAR);
- if(SvTRUE(ERRSV)) warn("perl_tie_hash: %s", SvPV(ERRSV,na));
-
- SPAGAIN;
-
- obj = POPs;
- sv_unmagic(varsv, 'P');
- sv_magic(varsv, obj, 'P', Nullch, 0);
-
- PUTBACK;
- FREETMPS;
- LEAVE;
-}
-
-/* execute END blocks */
-
-void perl_run_blocks(I32 oldscope, AV *subs)
-{
- STRLEN len;
- I32 i;
- dTHR;
- dTHRCTX;
-
- for(i=0; i<=AvFILL(subs); i++) {
- CV *cv = (CV*)*av_fetch(subs, i, FALSE);
- SV* atsv = ERRSV;
-
- MARK_WHERE("END block", (SV*)cv);
- PUSHMARK(stack_sp);
- perl_call_sv((SV*)cv, G_EVAL|G_DISCARD);
- UNMARK_WHERE;
- (void)SvPV(atsv, len);
- if (len) {
- if (subs == beginav)
- sv_catpv(atsv, "BEGIN failed--compilation aborted");
- else
- sv_catpv(atsv, "END failed--cleanup aborted");
- while (scopestack_ix > oldscope)
- LEAVE;
- }
- }
-}
-
-void mod_perl_clear_rgy_endav(request_rec *r, SV *sv)
-{
- STRLEN klen;
- char *key;
-
- if(!mod_perl_endhv) return;
-
- key = SvPV(sv,klen);
- if(hv_exists(mod_perl_endhv, key, klen)) {
- SV *entry = *hv_fetch(mod_perl_endhv, key, klen, FALSE);
- AV *av;
- if(!SvTRUE(entry) && !SvROK(entry)) {
- MP_TRACE_g(fprintf(stderr, "endav is empty for %s\n", r->uri));
- return;
- }
- av = (AV*)SvRV(entry);
- av_clear(av);
- SvREFCNT_dec((SV*)av);
- (void)hv_delete(mod_perl_endhv, key, klen, G_DISCARD);
- MP_TRACE_g(fprintf(stderr,
- "clearing END blocks for package `%s' (uri=%s)\n",
- key, r->uri));
- }
-}
-
-void perl_stash_rgy_endav(char *s, SV *rgystash)
-{
- AV *rgyendav = Nullav;
- STRLEN klen;
- char *key;
- dTHR;
-
- if(!rgystash)
- rgystash = perl_get_sv("Apache::Registry::curstash", FALSE);
-
- if(!rgystash || !SvTRUE(rgystash)) {
- MP_TRACE_g(fprintf(stderr,
- "Apache::Registry::curstash not set, can't stash END blocks for %s\n",
- s));
- return;
- }
-
- key = SvPV(rgystash,klen);
-
- if(mod_perl_endhv == Nullhv)
- mod_perl_endhv = newHV();
- else if(hv_exists(mod_perl_endhv, key, klen)) {
- SV *entry = *hv_fetch(mod_perl_endhv, key, klen, FALSE);
- if(SvTRUE(entry) && SvROK(entry))
- rgyendav = (AV*)SvRV(entry);
- }
-
- if(endav) {
- I32 i;
- if(rgyendav == Nullav)
- rgyendav = newAV();
-
- if(AvFILL(rgyendav) > -1)
- av_clear(rgyendav);
- else
- av_extend(rgyendav, AvFILL(endav));
-
- for(i=0; i<=AvFILL(endav); i++) {
- SV **svp = av_fetch(endav, i, FALSE);
- av_store(rgyendav, i, (SV*)newRV((SV*)*svp));
- }
- }
-
- if(rgyendav)
- hv_store(mod_perl_endhv, key, klen, (SV*)newRV((SV*)rgyendav), FALSE);
-}
-
-void perl_run_rgy_endav(char *s)
-{
- SV *rgystash = perl_get_sv("Apache::Registry::curstash", FALSE);
- AV *rgyendav = Nullav;
- STRLEN klen;
- char *key;
- dTHR;
-
- if(!rgystash || !SvTRUE(rgystash)) {
- MP_TRACE_g(fprintf(stderr,
- "Apache::Registry::curstash not set, can't run END blocks for %s\n",
- s));
- return;
- }
-
- key = SvPV(rgystash,klen);
-
- if(hv_exists(mod_perl_endhv, key, klen)) {
- SV *entry = *hv_fetch(mod_perl_endhv, key, klen, FALSE);
- if(SvTRUE(entry) && SvROK(entry))
- rgyendav = (AV*)SvRV(entry);
- }
-
- MP_TRACE_g(fprintf(stderr,
- "running %d END blocks for %s\n", rgyendav ? (int)AvFILL(rgyendav)+1 : 0, s));
- ENTER;
- save_aptr(&endav);
- if((endav = rgyendav))
- perl_run_blocks(scopestack_ix, endav);
- LEAVE;
- sv_setpv(rgystash,"");
-}
-
-void perl_run_endav(char *s)
-{
- dTHR;
- I32 n = 0;
- if(endav)
- n = AvFILL(endav)+1;
-
- MP_TRACE_g(fprintf(stderr, "running %d END blocks for %s\n",
- (int)n, s));
- if(endav) {
- curstash = defstash;
- call_list(scopestack_ix, endav);
- }
-}
-
-static PERL_MG_UFUNC(errgv_empty_set, ix, sv)
-{
- sv_setsv(sv, &sv_no);
- return TRUE;
-}
-
-void perl_call_halt(int status)
-{
- dTHR;
- struct ufuncs umg;
- int is_http_code =
- ((status >= 100) && (status < 600) && ERRSV_CAN_BE_HTTP);
- dTHRCTX;
-
- umg.uf_val = errgv_empty_set;
- umg.uf_set = errgv_empty_set;
- umg.uf_index = (IV)0;
-
- if(is_http_code) {
- croak("%d\n", status);
- }
- else {
- sv_magic(ERRSV, Nullsv, 'U', (char*) &umg, sizeof(umg));
-
- ENTER;
- SAVESPTR(diehook);
- diehook = Nullsv;
- croak("");
- LEAVE; /* we don't get this far, but croak() will rewind */
-
- sv_unmagic(ERRSV, 'U');
- }
-}
-
-/*
- * reload %INC: cannot do so while iterating over %INC incase
- * reloaded modules modify %INC at the file-scope
- * this approach also preserves order for modules loaded via PerlModule
- */
-void perl_reload_inc(server_rec *s, pool *sp)
-{
- dPSRV(s);
- HV *hash = GvHV(incgv);
- HE *entry;
- U8 old_warn = dowarn;
- pool *p = ap_make_sub_pool(sp);
- table *reload = ap_make_table(p, HvKEYS(hash));
- char **entries;
- int i = 0;
-
- dowarn = FALSE;
- entries = (char **)cls->PerlModule->elts;
- for (i=0; i < cls->PerlModule->nelts; i++) {
- SV *file = perl_module2file(entries[i]);
- ap_table_set(reload, SvPVX(file), "1");
- SvREFCNT_dec(file);
- }
-
- hv_iterinit(hash);
- while ((entry = hv_iternext(hash))) {
- ap_table_setn(reload, HeKEY(entry), "1");
- }
-
- {
- array_header *arr = ap_table_elts(reload);
- table_entry *elts = (table_entry *)arr->elts;
- SV *keysv = newSV(0);
- for (i=0; i < arr->nelts; i++) {
- sv_setpv(keysv, elts[i].key);
- if (!(entry = hv_fetch_ent(hash, keysv, FALSE, 0))) {
- MP_TRACE_g(fprintf(stderr,
- "%s not found in %%INC\n", elts[i].key));
- continue;
- }
- SvREFCNT_dec(HeVAL(entry));
- HeVAL(entry) = &sv_undef;
- MP_TRACE_g(fprintf(stderr, "reloading %s\n", HeKEY(entry)));
- perl_require_pv(HeKEY(entry));
- }
- SvREFCNT_dec(keysv);
- }
-
- dowarn = old_warn;
- ap_destroy_pool(p);
-}
-
-I32 perl_module_is_loaded(char *name)
-{
- I32 retval = FALSE;
- SV *key = perl_module2file(name);
- if((key && hv_exists_ent(GvHV(incgv), key, FALSE)))
- retval = TRUE;
- if(key)
- SvREFCNT_dec(key);
- return retval;
-}
-
-SV *perl_module2file(char *name)
-{
- SV *sv = newSVpv(name,0);
- char *s;
- for (s = SvPVX(sv); *s; s++) {
- if (*s == ':' && s[1] == ':') {
- *s = '/';
- Move(s+2, s+1, strlen(s+2)+1, char);
- --SvCUR(sv);
- }
- }
- sv_catpvn(sv, ".pm", 3);
- return sv;
-}
-
-int perl_require_module(char *name, server_rec *s)
-{
- dTHR;
- SV *sv = sv_newmortal();
- dTHRCTX;
-
- sv_setpvn(sv, "require ", 8);
- MP_TRACE_d(fprintf(stderr, "loading perl module '%s'...", name));
- sv_catpv(sv, name);
- perl_eval_sv(sv, G_DISCARD);
- if(s) {
- if(perl_eval_ok(s) != OK) {
- MP_TRACE_d(fprintf(stderr, "not ok\n"));
- return -1;
- }
- }
- else if(SvTRUE(ERRSV)) {
- MP_TRACE_d(fprintf(stderr, "not ok\n"));
- return -1;
- }
-
- MP_TRACE_d(fprintf(stderr, "ok\n"));
- return 0;
-}
-
-void perl_do_file(char *pv)
-{
- SV* sv = sv_newmortal();
- sv_setpv(sv, "require '");
- sv_catpv(sv, pv);
- sv_catpv(sv, "'");
- perl_eval_sv(sv, G_DISCARD);
- /*(void)hv_delete(GvHV(incgv), pv, strlen(pv), G_DISCARD);*/
-}
-
-int perl_load_startup_script(server_rec *s, pool *p, char *script, U8 my_warn)
-{
- dTHR;
- U8 old_warn = dowarn;
-
- if(!script) {
- MP_TRACE_d(fprintf(stderr, "no Perl script to load\n"));
- return OK;
- }
-
- MP_TRACE_d(fprintf(stderr, "attempting to require `%s'\n", script));
- dowarn = my_warn;
- curstash = defstash;
- perl_do_file(script);
- dowarn = old_warn;
- return perl_eval_ok(s);
-}
-
-void mp_magic_setenv(char *key, char *val, int is_tainted)
-{
- int klen = strlen(key);
- SV **ptr = hv_fetch(GvHV(envgv), key, klen, TRUE);
- if (ptr) {
- SvSetMagicSV(*ptr, newSVpv(val,0));
- if (is_tainted) {
- SvTAINTED_on(*ptr);
- }
- }
-}
-
-array_header *perl_cgi_env_init(request_rec *r)
-{
- table *envtab = r->subprocess_env;
- char *tz = NULL;
-
- add_common_vars(r);
- add_cgi_vars(r);
- /* resetup global request rec, because it may set to an (invalid) subrequest by ap_add_cgi_vars */
- perl_request_rec(r);
-
- if (!table_get(envtab, "TZ")) {
- if ((tz = getenv("TZ")) != NULL) {
- table_set(envtab, "TZ", tz);
- }
- }
- if (!table_get(envtab, "PATH")) {
- table_set(envtab, "PATH", DEFAULT_PATH);
- }
- table_set(envtab, "GATEWAY_INTERFACE", PERL_GATEWAY_INTERFACE);
-
- return table_elts(envtab);
-}
-
-#define untie_env sv_unmagic((SV*)GvHV(envgv), 'E')
-#define tie_env sv_magic((SV*)GvHV(envgv), (SV*)envgv, 'E', Nullch, 0)
-#define delete_env(ken, klen) \
- (void)hv_delete(GvHV(envgv), key, klen, G_DISCARD)
-
-void perl_clear_env(void)
-{
- char *key;
- I32 klen;
- SV *val;
- HV *hv = (HV*)GvHV(envgv);
-
- untie_env;
- if(!hv_exists(hv, "MOD_PERL", 8)) {
- hv_store(hv, "MOD_PERL", 8,
- newSVpv(MOD_PERL_STRING_VERSION,0), FALSE);
- hv_store(hv, "GATEWAY_INTERFACE", 17,
- newSVpv("CGI-Perl/1.1",0), FALSE);
- }
- (void)hv_iterinit(hv);
- while ((val = hv_iternextsv(hv, (char **) &key, &klen))) {
- if((*key == 'G') && strEQ(key, "GATEWAY_INTERFACE"))
- continue;
- else if((*key == 'M') && strnEQ(key, "MOD_PERL", 8))
- continue;
- else if((*key == 'T') && strnEQ(key, "TZ", 2))
- continue;
- else if((*key == 'P') && strEQ(key, "PATH"))
- continue;
- else if((*key == 'H') && strnEQ(key, "HTTP_", 5)) {
- tie_env;
- delete_env(key, klen);
- untie_env;
- continue;
- }
- delete_env(key, klen);
- }
- tie_env;
-}
-
-void mod_perl_init_ids(void) /* $$, $>, $), etc */
-{
- if(set_ids++) return;
- sv_setiv(GvSV(gv_fetchpv("$", TRUE, SVt_PV)), (I32)getpid());
-#ifndef WIN32
- uid = (int)getuid();
- euid = (int)geteuid();
- gid = (int)getgid();
- egid = (int)getegid();
- MP_TRACE_g(fprintf(stderr,
- "perl_init_ids: uid=%d, euid=%d, gid=%d, egid=%d\n",
- uid, euid, gid, egid));
-#endif
-}
-
-int perl_eval_ok(server_rec *s)
-{
- int status;
- SV *sv;
- dTHR;
- dTHRCTX;
-
- sv = ERRSV;
- if (SvTRUE(sv)) {
- if (SvMAGICAL(sv) && (SvCUR(sv) > 4) &&
- strnEQ(SvPVX(sv), " at ", 4))
- {
- /* Apache::exit was called */
- return DECLINED;
- }
- if (perl_sv_is_http_code(ERRSV, &status)) {
- return status;
- }
- MP_TRACE_g(fprintf(stderr, "perl_eval error: %s\n", SvPV(sv,na)));
- mod_perl_error(s, SvPV(sv, na));
- return SERVER_ERROR;
- }
- return OK;
-}
-
-int perl_sv_is_http_code(SV *errsv, int *status)
-{
- int retval = FALSE;
- STRLEN i=0, http_code=0;
- char *errpv;
- char cpcode[4];
- dTHR;
-
- if(!SvTRUE(errsv) || !ERRSV_CAN_BE_HTTP)
- return FALSE;
-
- errpv = SvPVX(errsv);
-
- for(i=0;i<=2;i++) {
- if(i >= SvCUR(errsv))
- break;
- if(isDIGIT(SvPVX(errsv)[i]))
- http_code++;
- else
- http_code--;
- }
-
- /* we've looked at the first 3 characters of $@
- * if they're not all digits, $@ is not an HTTP code
- */
- if(http_code != 3) {
- MP_TRACE_g(fprintf(stderr,
- "mod_perl: $@ doesn't look like an HTTP code `%s'\n",
- errpv));
- return FALSE;
- }
-
- /* nothin but 3 digits */
- if(SvCUR(errsv) == http_code)
- return TRUE;
-
- ap_cpystrn((char *)cpcode, errpv, 4);
-
- MP_TRACE_g(fprintf(stderr,
- "mod_perl: possible $@ HTTP code `%s' (cp=`%s')\n",
- errpv,cpcode));
-
- if((SvCUR(errsv) == 4) && (*(SvEND(errsv) - 1) == '\n')) {
- /* nothin but 3 digit code and \n */
- retval = TRUE;
- }
- else {
- char *tmp = errpv;
- tmp += 3;
-#ifndef PERL_MARK_WHERE
- if(strNE(SvPVX(GvSV(CopFILEGV(curcop))), "-e")) {
- SV *fake = newSV(0);
- sv_setpv(fake, ""); /* avoid -w warning */
- sv_catpvf(fake, " at %_ line ", GvSV(CopFILEGV(curcop)));
-
- if(strnEQ(SvPVX(fake), tmp, SvCUR(fake)))
- /* $@ is nothing but 3 digit code and the mess die tacks on */
- retval = TRUE;
-
- SvREFCNT_dec(fake);
- }
-#endif
- if(!retval && strnEQ(tmp, " at ", 4) && instr(errpv, " line "))
- /* well, close enough */
- retval = TRUE;
- }
-
- if(retval == TRUE) {
- *status = atoi(cpcode);
- MP_TRACE_g(fprintf(stderr,
- "mod_perl: $@ is an HTTP code `%d'\n", *status));
- }
-
- return retval;
-}
-
-#ifndef PERLLIB_SEP
-#define PERLLIB_SEP ':'
-#endif
-
-void perl_inc_unshift(char *p)
-{
- if(!p) return;
-
- while(p && *p) {
- SV *libdir = newSV(0);
- char *s;
-
- while(*p == PERLLIB_SEP) p++;
-
- if((s = strchr(p, PERLLIB_SEP)) != Nullch) {
- sv_setpvn(libdir, p, (STRLEN)(s - p));
- p = s + 1;
- }
- else {
- sv_setpv(libdir, p);
- p = Nullch;
- }
- av_unshift(GvAV(incgv), 1);
- av_store(GvAV(incgv), 0, libdir);
- }
-}
-
-#ifdef PERL_MARK_WHERE
-/* XXX find the right place for this! */
-static SV *perl_sv_name(SV *svp)
-{
- SV *sv = Nullsv;
- SV *RETVAL = Nullsv;
-
- if(svp && SvROK(svp) && (sv = SvRV(svp))) {
- switch(SvTYPE(sv)) {
- case SVt_PVCV:
- RETVAL = newSV(0);
- gv_fullname(RETVAL, CvGV(sv));
- break;
-
- default:
- break;
- }
- }
- else if(svp && SvPOK(svp)) {
- RETVAL = newSVsv(svp);
- }
-
- return RETVAL;
-}
-
-void mod_perl_mark_where(char *where, SV *sub)
-{
- dTHR;
- SV *name = Nullsv;
- if(CopLINE(curcop)) {
-#if 0
- fprintf(stderr, "already know where: %s line %d\n",
- SvPV(GvSV(CopFILEGV(curcop)),na), CopFILEGV(curcop));
-#endif
- return;
- }
-
- SAVECOPFILE(curcop);
- SAVECOPLINE(curcop);
-
- if(sub)
- name = perl_sv_name(sub);
-
- sv_setpv(GvSV(CopFILEGV(curcop)), "");
- if (name) {
- sv_catpvf(GvSV(CopFILEGV(curcop)), "%s subroutine `%_'", where, name);
- SvREFCNT_dec(name);
- }
- else {
- sv_catpvf(GvSV(CopFILEGV(curcop)), "%s subroutine <unknown>", where);
- }
-
- CopLINE_set(curcop, 1);
-
-}
-#endif
-
-#if MODULE_MAGIC_NUMBER < 19971226
-char *ap_cpystrn(char *dst, const char *src, size_t dst_size)
-{
-
- char *d, *end;
-
- if (!dst_size)
- return (dst);
-
- d = dst;
- end = dst + dst_size - 1;
-
- for (; d < end; ++d, ++src) {
- if (!(*d = *src)) {
- return (d);
- }
- }
-
- *d = '\0'; /* always null terminate */
-
- return (d);
-}
-
-#endif
-
-#if defined(WIN32) && defined(PERL_IS_5_6)
-void
-Perl_do_join(pTHX_ register SV *sv, SV *del, register SV **mark, register SV **sp)
-{
- SV **oldmark = mark;
- register I32 items = sp - mark;
- register STRLEN len;
- STRLEN delimlen;
- register char *delim = SvPV(del, delimlen);
- STRLEN tmplen;
-
- mark++;
- len = (items > 0 ? (delimlen * (items - 1) ) : 0);
- (void)SvUPGRADE(sv, SVt_PV);
- if (SvLEN(sv) < len + items) { /* current length is way too short */
- while (items-- > 0) {
- if (*mark && !SvGMAGICAL(*mark) && SvOK(*mark)) {
- SvPV(*mark, tmplen);
- len += tmplen;
- }
- mark++;
- }
- SvGROW(sv, len + 1); /* so try to pre-extend */
-
- mark = oldmark;
- items = sp - mark;
- ++mark;
- }
-
- if (items-- > 0) {
- char *s;
-
- if (*mark) {
- s = SvPV(*mark, tmplen);
- sv_setpvn(sv, s, tmplen);
- }
- else
- sv_setpv(sv, "");
- mark++;
- }
- else
- sv_setpv(sv,"");
- len = delimlen;
- if (len) {
- for (; items > 0; items--,mark++) {
- sv_catpvn(sv,delim,len);
- sv_catsv(sv,*mark);
- }
- }
- else {
- for (; items > 0; items--,mark++)
- sv_catsv(sv,*mark);
- }
- SvSETMAGIC(sv);
-}
-#endif
diff --git a/tags/v1_29/src/modules/perl/perlio.c b/tags/v1_29/src/modules/perl/perlio.c
deleted file mode 100644
index abdda74..0000000
--- a/tags/v1_29/src/modules/perl/perlio.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1996-2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
-
-#include "mod_perl.h"
-
-#define dHANDLE(name) GV *handle = gv_fetchpv(name, TRUE, SVt_PVIO)
-
-#ifdef PERL_REVISION
-# if ((PERL_REVISION == 5) && (PERL_VERSION >= 7))
-# define TIEHANDLE_SV(handle) (SV*)GvIOp((SV*)handle)
-# endif
-#endif
-
-#ifndef TIEHANDLE_SV
-# define TIEHANDLE_SV(handle) (SV*)handle
-#endif
-
-#define TIEHANDLE(name,obj) \
-{ \
- dHANDLE(name); \
- sv_unmagic(TIEHANDLE_SV(handle), 'q'); \
- sv_magic(TIEHANDLE_SV(handle), obj, 'q', Nullch, 0); \
-}
-
-#if 0
-#define TIED tied_handle
-
-static int tied_handle(char *name)
-{
- dHANDLE(name);
-
-/* XXX so Perl*Handler's can re-tie before PerlHandler is run?
- * then they'd also be reponsible for re-tie'ing to `Apache'
- * after all PerlHandlers are run, hmm must think.
- */
-
- MAGIC *mg;
- if (SvMAGICAL(handle) && (mg = mg_find((SV*)handle, 'q'))) {
- char *package = HvNAME(SvSTASH((SV*)SvRV(mg->mg_obj)));
- if(!strEQ(package, "Apache")) {
- fprintf(stderr, "%s tied to %s\n", GvNAME(handle), package);
- return TRUE;
- }
- }
- return FALSE;
-}
-#else
-#define TIED(name) 0
-#endif
-
-#ifdef USE_SFIO
-
-typedef struct {
- Sfdisc_t disc; /* the sfio discipline structure */
- request_rec *r;
-} Apache_t;
-
-static int sfapachewrite(f, buffer, n, disc)
- Sfio_t* f; /* stream involved */
- char* buffer; /* buffer to write from */
- int n; /* number of bytes to send */
- Sfdisc_t* disc; /* discipline */
-{
- /* feed buffer to Apache->print */
- CV *cv = GvCV(gv_fetchpv("Apache::print", FALSE, SVt_PVCV));
- dSP;
- ENTER;
- SAVETMPS;
- PUSHMARK(sp);
- XPUSHs(perl_bless_request_rec(((Apache_t*)disc)->r));
- XPUSHs(sv_2mortal(newSVpv(buffer,n)));
- PUTBACK;
- (void)(*CvXSUB(cv))(aTHXo_ cv);
- FREETMPS;
- LEAVE;
- return n;
-}
-
-static int sfapacheread(f, buffer, bufsiz, disc)
- Sfio_t* f; /* stream involved */
- char* buffer; /* buffer to read into */
- int bufsiz; /* number of bytes to read */
- Sfdisc_t* disc; /* discipline */
-{
- dSP;
- int count;
- int nrd;
- SV *sv = sv_newmortal();
- request_rec *r = ((Apache_t*)disc)->r;
- MP_TRACE_g(fprintf(stderr, "sfapacheread: want %d bytes\n", bufsiz));
- ENTER;SAVETMPS;
- PUSHMARK(sp);
- XPUSHs(perl_bless_request_rec(r));
- XPUSHs(sv);
- XPUSHs(sv_2mortal(newSViv(bufsiz)));
- PUTBACK;
- count = perl_call_pv("Apache::read", G_SCALAR|G_EVAL);
- SPAGAIN;
- if (SvTRUE(ERRSV)) {
- fprintf (stderr, "Apache::read died %s\n", SvPV(ERRSV, na));
- nrd = -1;
- POPs;
- }
- else {
- char *tmpbuf = SvPV(sv, nrd);
- if(count == 1) {
- nrd = POPi;
- }
- MP_TRACE_g(fprintf(stderr, "sfapacheread: got %d \"%.*s\"\n",
- nrd, nrd > 40 ? 40 : nrd, tmpbuf));
- if (nrd > bufsiz) {
- abort();
- }
- memcpy(buffer, tmpbuf, nrd);
- }
- PUTBACK;
- FREETMPS;LEAVE;
- return nrd;
-}
-
-Sfdisc_t * sfdcnewapache(request_rec *r)
-{
- Apache_t* disc;
-
- if(!(disc = (Apache_t*)malloc(sizeof(Apache_t))) )
- return (Sfdisc_t *)disc;
- MP_TRACE_g(fprintf(stderr, "sfdcnewapache(r)\n"));
- disc->disc.readf = (Sfread_f)sfapacheread;
- disc->disc.writef = (Sfwrite_f)sfapachewrite;
- disc->disc.seekf = (Sfseek_f)NULL;
- disc->disc.exceptf = (Sfexcept_f)NULL;
- disc->r = r;
- return (Sfdisc_t *)disc;
-}
-#endif
-
-void perl_soak_script_output(request_rec *r)
-{
- SV *sv = sv_newmortal();
- sv_setref_pv(sv, "Apache::FakeRequest", (void*)r);
-
- if(!perl_get_cv("Apache::FakeRequest::PRINT", FALSE))
- (void)perl_eval_pv("package Apache::FakeRequest; sub PRINT {}; sub PRINTF {}", TRUE);
-
-#ifdef USE_SFIO
- sfdisc(PerlIO_stdout(), SF_POPDISC);
-#endif
-
- TIEHANDLE("STDOUT", sv);
-
- /* we're most likely in the middle of send_cgi_header(),
- * flick this switch so send_http_header() isn't called
- */
- mod_perl_sent_header(r, TRUE);
-}
-
-void perl_stdout2client(request_rec *r)
-{
- dTHR;
-#ifdef USE_SFIO
- sfdisc(PerlIO_stdout(), SF_POPDISC);
- sfdisc(PerlIO_stdout(), sfdcnewapache(r));
- IoFLAGS(GvIOp(defoutgv)) |= IOf_FLUSH; /* $|=1 */
-#else
- IoFLAGS(GvIOp(defoutgv)) &= ~IOf_FLUSH; /* $|=0 */
-
- if(TIED("STDOUT")) return;
- MP_TRACE_g(fprintf(stderr, "tie *STDOUT => Apache\n"));
- TIEHANDLE("STDOUT", perl_bless_request_rec(r));
-#endif
-}
-
-void perl_stdin2client(request_rec *r)
-{
-#ifdef USE_SFIO
- sfdisc(PerlIO_stdin(), SF_POPDISC);
- sfdisc(PerlIO_stdin(), sfdcnewapache(r));
- sfsetbuf(PerlIO_stdin(), NULL, 0);
-#else
- if(TIED("STDIN")) return;
- MP_TRACE_g(fprintf(stderr, "tie *STDIN => Apache\n"));
- TIEHANDLE("STDIN", perl_bless_request_rec(r));
-#endif
-}
diff --git a/tags/v1_29/src/modules/win32/mod_perl.def b/tags/v1_29/src/modules/win32/mod_perl.def
deleted file mode 100644
index 5c7d8ee..0000000
--- a/tags/v1_29/src/modules/win32/mod_perl.def
+++ /dev/null
@@ -1,18 +0,0 @@
-LIBRARY
-
-EXPORTS
-
- sv2request_rec
- perl_request_rec
- mod_perl_tie_table
- perl_cmd_perl_FLAG
- perl_cmd_perl_TAKE2
- perl_cmd_perl_TAKE1
- perl_cmd_perl_TAKE123
- perl_perl_cmd_cleanup
- hvrv2table
- perl_call_handler
- perl_clear_symtab
- perl_get_startup_pool
- perl_perl_merge_dir_config
- array_header2avrv
diff --git a/tags/v1_29/src/modules/win32/mod_perl.dsp b/tags/v1_29/src/modules/win32/mod_perl.dsp
deleted file mode 100644
index b04fb83..0000000
--- a/tags/v1_29/src/modules/win32/mod_perl.dsp
+++ /dev/null
@@ -1,173 +0,0 @@
-# Microsoft Developer Studio Project File - Name="mod_perl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=mod_perl - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "mod_perl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "mod_perl.mak" CFG="mod_perl - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "mod_perl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "mod_perl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "mod_perl - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "\Perl\lib\CORE" /D "WIN32" /D "NDEBUG" /D "_WINSOCK2API_" /D "_MSWSOCK_" /D "_WINDOWS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release/mod_perl.so"
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release/mod_perl.so"
-
-!ELSEIF "$(CFG)" == "mod_perl - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\Perl\lib\CORE" /D "WIN32" /D "_DEBUG" /D "_WINSOCK2API_" /D "_MSWSOCK_" /D "_WINDOWS" /FR /YX /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/mod_perl.so" /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/mod_perl.so" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "mod_perl - Win32 Release"
-# Name "mod_perl - Win32 Debug"
-# Begin Source File
-
-SOURCE=..\perl\Apache.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Connection.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Constants.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\dirent.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\File.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Log.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\ModuleConfig.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\mod_perl.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mod_perl.def
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\mod_perl.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\mod_perl_opmask.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\perl_config.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\perl_util.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\perlio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\perlxsi.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Server.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Table.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\URI.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\perl\Util.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\Apache\ApacheCore.lib
-# End Source File
-# Begin Source File
-
-SOURCE=\Perl\lib\CORE\perl56.lib
-# End Source File
-# End Target
-# End Project
diff --git a/tags/v1_29/src/opcodes.txt b/tags/v1_29/src/opcodes.txt
deleted file mode 100644
index 7c9aa4c..0000000
--- a/tags/v1_29/src/opcodes.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-#default opcode mask
-backtick
-glob
-open
-close
-pipe_op
-fileno
-umask
-dbmopen
-dbmclose
-getc
-read
-enterwrite
-leavewrite
-sysopen
-sysseek
-sysread
-syswrite
-send
-recv
-socket
-sockpair
-bind
-connect
-listen
-accept
-shutdown
-chown
-chroot
-unlink
-chmod
-rename
-link
-symlink
-readlink
-mkdir
-rmdir
-open_dir
-readdir
-telldir
-seekdir
-rewinddir
-closedir
-fork
-wait
-waitpid
-system
-exec
-kill
-alarm
-sleep
-shmget
-shmctl
-shmread
-shmwrite
-msgget
-msgctl
-msgsnd
-msgrcv
-semget
-semctl
-semop
-syscall
diff --git a/tags/v1_29/t/.cvsignore b/tags/v1_29/t/.cvsignore
deleted file mode 100644
index 47c44de..0000000
--- a/tags/v1_29/t/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-report
-TEST
-logs
-httpd.conf
-httpd.conf.old
-httpd
-httpd_conf
-perlsections.pl
-
diff --git a/tags/v1_29/t/README b/tags/v1_29/t/README
deleted file mode 100644
index 3db55ac..0000000
--- a/tags/v1_29/t/README
+++ /dev/null
@@ -1,43 +0,0 @@
-Self test suite for the mod_perl library
-(adapted from the libwww-perl test suite)
--------------------------------------------
-
-Tests are invoked by running the ./TEST script, but usually you run
-the tests with "make test" at the top mod_perl directory which automates
-all of these steps for you. Use -v option for verbose tests.
-You might run an individual test like this:
-
- ./TEST -v net/http-get
-
-or all tests in a directory like this
-
- ./TEST net
-
-You enable network tests by creating the "net/config.pl" file. A good
-start is to make a copy of the "net/config.pl.dist" file. For network
-tests you should also make a link from the perl directory of your
-http server to the "net/perl" directory.
-
-You *must* have libwww-perl installed:
-http://www.perl.com/cgi-bin/cpan_mod?module=LWP
-
-You will also need to modify httpd.conf and start an httpd with the mod_perl
-configuration specified in httpd.conf-dist
-
-The following setup works for my site:
-
- cp conf/httpd.conf-dist conf/httpd.conf
- emacs conf/httpd.conf #modify for your system
- cp net/config.pl.dist net/config.pl
- emacs net/config.pl # fix if necessary
- httpd -X -d `pwd` &
- ./TEST net
- kill `cat /tmp/mod_perl_httpd.pid`
- rm -f /tmp/mod_perl_*
-
-
-
-
-
-
-
diff --git a/tags/v1_29/t/TEST.PL b/tags/v1_29/t/TEST.PL
deleted file mode 100644
index 9ba475f..0000000
--- a/tags/v1_29/t/TEST.PL
+++ /dev/null
@@ -1,103 +0,0 @@
-
-$|++;
-use Config;
-
-# First we check if we already are within the "t" directory
-if (-d "t") {
- # try to move into test directory
- chdir "t" or die "Can't chdir: $!";
-
- # fix all relative library locations
- foreach (@INC) {
- $_ = "../$_" unless m,^(/)|([a-f]:),i;
- }
-}
-# Pick up the library files from the ../blib directory
-unshift(@INC, "../blib/lib", "../blib/arch");
-#print "@INC\n";
-
-use Test::Harness;
-$Test::Harness::verbose = shift
- if $ARGV[0] =~ /^\d+$/ || $ARGV[0] eq "-v";
-
-if (@ARGV) {
- for (@ARGV) {
- if (-d $_) {
- push(@tests, <$_/*.t>);
- } else {
- $_ .= ".t" unless /\.t$/;
- push(@tests, $_);
- }
- }
-} else {
-
- #shutdown httpd before make aborts
- $SIG{'__DIE__'} = sub {
- return unless $_[0] =~ /^Failed/i;
- my $el = "../t/logs/httpd.pid";
- if(-e $el) {
- system "kill `cat $el`";
- }
- else {
- warn "can't stat $el $!\n";
- }
- warn "httpd terminated\n";
- };
-
- eval { require LWP::UserAgent; };
- if ($@) {
- print <<"EOM";
-$@
-I still can't find LWP::UserAgent, try:
-$^X -MCPAN -e "install q{LWP}"
-
- or
-
-http://www.perl.com/cgi-bin/cpan_mod?module=LWP
-
-Must skip important tests without LWP...
-
-EOM
- sleep(2);
- exit;
- }
- else {
- push(@tests, <modules/*.t>, <internal/*.t>);
- }
-}
-
-unshift @INC, '.';
-require Apache::testold;
-Apache::testold->import('simple_fetch');
-use subs 'simple_fetch';
-
-unless (simple_fetch "/test.html") {
- if ($^O eq "solaris" and $Config{myhostname} eq "ramona") {
- print "go hang in the chill room $ENV{USER}, ramona is doggin...";
- }
- else {
- print "still waiting for server to warm up...";
- }
- for (1..4) {
- sleep $_;
- if (simple_fetch "/test.html") {
- print "ok\n";
- }
- else {
- print "...";
- }
- }
-}
-
-unless (simple_fetch "/test.html") {
- print "not ok\n";
- die "server failed to start! (please examine t/logs/error_log)";
-}
-
-runtests @tests;
-
-use File::Find;
-my $dir = -e "t" ? ".." : ".";
-find(sub {
- /core/ and die "uh,oh httpd dumped core!\n";
-}, $dir);
diff --git a/tags/v1_29/t/TEST.win32 b/tags/v1_29/t/TEST.win32
deleted file mode 100644
index 81567eb..0000000
--- a/tags/v1_29/t/TEST.win32
+++ /dev/null
@@ -1,189 +0,0 @@
-#AUTHOR: Peter Tillemans <pti@MAIL.NET4ALL.BE>
-
-use strict;
-use Cwd;
-use File::Copy;
-use File::Find;
-use Win32::Process;
-use Win32;
-use Config;
-use File::Basename 'dirname';
-require File::Spec;
-use ExtUtils::MakeMaker;
-
-#
-# Config part
-#
-
-my $apache = 'apache';
-my $fullapache = find_apache();
-
-my $ap_path = dirname $fullapache;
-$ENV{PATH} = join ";", $ap_path, $ENV{PATH};
-
-my $fullperl = $Config{perlpath};
-
-print "Running tests with:\n";
-print " perl=$fullperl\n apache=$fullapache\n";
-
-my $port = 8529;
-
-sub ErrorReport {
- print Win32::FormatMessage( Win32::GetLastError() );
-}
-
-#
-# prepare config files
-#
-
-my $conf = 't/conf/httpd.conf';
-my $win32_conf = $conf . '-win32';
-my $bak = $conf . '.bak';
-copy($win32_conf, $conf)
- or die "Copy of $win32_conf to $conf failed: $!";
-
-#
-#source or binary distribution
-#
-
-for (qw(src/modules/win32/Release
- src/modules/win32/Debug
- win32/modules)) {
- my $dll = "$_/mod_perl.so";
- next unless -e $dll;
- copy $dll, "t/modules/mod_perl.so";
- last;
-}
-
-#
-# create some bogus files and a place to dump the logfiles
-#
-
-mkdir("/tmp","755") unless -d "/tmp";
-for my $d (qw(logs conf)) {
- mkdir("t/$d","755") unless -d "t/$d";
-}
-for my $f (qw(srm.conf access.conf mime.types)) {
- local *FH;
- open FH, ">t/conf/$f"; close FH;
-}
-
-# change the paths so everybody agrees on which files to use
-# this is to make sure apache knows which files to take :
-# apparently apache uner Win32
-# change directories to the installation directory so "./t"
-# references do not work
-
-my $pwd = cwd();
-unless (-e $bak) {
- copy($conf, $bak) or die "Copying $conf to $bak failed: $!";
-}
-open(BAK, $bak) or die "Open of $bak for reading failed: $!";
-open(CONF, ">$conf") or die "Open of $conf for writing failed: $!";
-while (<BAK>) {
- s#\./t#$pwd/t#;
- print CONF $_;
-}
-close BAK;
-close CONF;
-
-#
-# start ourselves a server to pound on
-#
-
-my $HttpdObj;
-Win32::Process::Create($HttpdObj,
- $fullapache,
- "$apache -X -d $pwd/t -f $pwd/t/conf/httpd.conf",
- 0,
- NORMAL_PRIORITY_CLASS,
- ".") || die ErrorReport();
-
-print << "END";
-httpd listening on port $port
-will write error_log to: t/logs/mod_perl_error_log
-letting apache warm up...
-END
-
-sleep 2;
-print "done\n";
-
-#
-# Ok, start pounding
-#
-system "$fullperl t/TEST @ARGV";
-
-#
-# stop server again
-#
-$HttpdObj->Kill(0);
-
-#
-# remove traces
-#
-
-print "letting apache cool down...\n";
-sleep 2;
-find(\&cleanup, '/tmp/');
-sub cleanup {/^(mod_perl|CGItemp)/ && unlink($_)}
-unlink $bak;
-unlink "$pwd/t/logs/mod_perl_httpd.pid";
-
-sub find_apache {
- my $apache;
- my $exe = 'Apache.exe';
- SEARCH: {
- my $candidate;
- for (File::Spec->path) {
- $candidate = File::Spec->catfile($_, $exe);
- if (-e $candidate and check_win32_apache($candidate)) {
- $apache = $candidate;
- last SEARCH;
- }
- }
- my @drives = drives();
- last SEARCH unless (@drives > 0);
- for my $drive (@drives) {
- for ('Apache', 'Program Files/Apache',
- 'Program Files/Apache Group/Apache') {
- $candidate = File::Spec->catfile($drive, $_, $exe);
- if (-e $candidate and check_win32_apache($candidate)) {
- $apache = $candidate;
- last SEARCH;
- }
- }
- }
- }
- unless (-e $apache) {
- $apache = prompt("Please supply the full path to Apache.exe:",
- $apache);
- if (-d $apache) {
- $apache = File::Spec->catfile($apache, $exe);
- }
- }
- die "Can't find $exe!"
- unless (-e $apache and check_win32_apache($apache));
-
- $apache = Win32::GetShortPathName($apache);
- $apache =~ s!\\!/!g;
- return $apache;
-}
-
-sub check_win32_apache {
- my $apache = shift;
- my $vers = qx{"$apache" -v};
- return ($vers =~ m!Apache/1.3!) ? 1 : 0;
-}
-
-sub drives {
- my @drives = ();
- eval{require Win32API::File;};
- return map {"$_:\\"} ('C' .. 'Z') if $@;
- my @r = Win32API::File::getLogicalDrives();
- return unless @r > 0;
- for (@r) {
- my $t = Win32API::File::GetDriveType($_);
- push @drives, $_ if ($t == 3 or $t == 4);
- }
- return @drives > 0 ? @drives : undef;
-}
diff --git a/tags/v1_29/t/TestDirectives/.cvsignore b/tags/v1_29/t/TestDirectives/.cvsignore
deleted file mode 100644
index f5486f6..0000000
--- a/tags/v1_29/t/TestDirectives/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-TestDirectives.xs
-Makefile
-TestDirectives.c
-TestDirectives.bs
\ No newline at end of file
diff --git a/tags/v1_29/t/TestDirectives/Makefile.PL b/tags/v1_29/t/TestDirectives/Makefile.PL
deleted file mode 100644
index 63ed666..0000000
--- a/tags/v1_29/t/TestDirectives/Makefile.PL
+++ /dev/null
@@ -1,48 +0,0 @@
-package Apache::TestDirectives;
-use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
-
-BEGIN {
- use lib qw{../../lib};
-}
-
-use strict;
-use Apache::src ();
-use Apache::ExtUtils qw(command_table);
-
-my $class = __PACKAGE__;
-
-my @directives = (
- [Port => "A TCP port number"], #we'll decline this one
- [TestCmd => "Two TestCmd args"],
- [AnotherCmd => "Stuff for another command"],
- [CmdIterate => "No limit here"],
- ["<Container" => "whatever"],
- ["</Container>" => "end whatever"],
- {
- name => "YAC",
- func => "another_cmd",
- cmd_data => "info for YAC",
- errmsg => "Yet another comand",
- args_how => "TAKE2",
- req_override => "RSRC_CONF",
- },
-);
-
-my $proto_perl2c = Apache::ExtUtils->proto_perl2c;
-
-while(my($pp,$cp) = each %$proto_perl2c) {
- next unless $pp;
- push @directives, [$cp, "Test for $cp"];
-}
-
-command_table \@directives;
-
-WriteMakefile(
- 'NAME' => $class,
- 'VERSION_FROM' => 'TestDirectives.pm', # finds $VERSION
- 'LIBS' => [''], # e.g., '-lm'
- 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
- 'INC' => Apache::src->new->inc,
-);
diff --git a/tags/v1_29/t/TestDirectives/TestDirectives.pm b/tags/v1_29/t/TestDirectives/TestDirectives.pm
deleted file mode 100644
index ca06d2c..0000000
--- a/tags/v1_29/t/TestDirectives/TestDirectives.pm
+++ /dev/null
@@ -1,127 +0,0 @@
-package Apache::TestDirectives;
-
-use strict;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-
-use DynaLoader ();
-use Apache::Constants qw(DECLINE_CMD);
-
-eval {
- require Apache::ModuleConfig;
-};
-use Data::Dumper 'Dumper';
-
-@ISA = qw(DynaLoader TestDirectives::Base);
-
-$VERSION = '0.01';
-
-if($ENV{MOD_PERL}) {
- bootstrap Apache::TestDirectives $VERSION;
-}
-
-sub attr {
- my($self,$k,$v) = @_;
- $self->{$k} = $v;
-}
-
-sub Port ($$$) {
- my($cfg, $parms, $port) = @_;
- warn "$cfg->Port will be $port\n";
- $cfg->{Port} = $port;
- return DECLINE_CMD();
-}
-
-sub TestCmd ($$$$) {
- my($cfg, $parms, $one, $two) = @_;
- #warn "TestCmd called with args: `$one', `$two'\n";
- $cfg->attr(TestCmd => [$one,$two]);
- $parms->server->isa("Apache::Server") or die "parms->server busted";
- my $or = $parms->override;
- my $limit = $parms->limited;
- #warn Dumper($cfg), $/;
-}
-
-sub AnotherCmd () {
- die "prototype check broken [@_]" if @_ > 0;
-}
-
-sub CmdIterate ($$@) {
- my($cfg, $parms, @data) = @_;
- $cfg->{CmdIterate} = [@data];
- $cfg->{path} = $parms->path;
-}
-
-sub another_cmd {
- my($cfg, $parms, @data) = @_;
- warn "($cfg, $parms, @data)\n";
- $parms->info =~ /YAC/ or die "parms->info busted";
- $cfg->{parms_info_from_another_cmd} = $parms->info;
- warn "$cfg->YAC called\n";
-}
-
-sub Container ($$$;*) {
- my($cfg, $parms, $arg, $fh) = @_;
- $arg =~ s/>//;
- warn "ARG=$arg\n";
- #while($parms->getline($line)) {
- while(defined(my $line = <$fh>)) {
- last if $line =~ m:</Container>:i;
- warn "LINE=`$line'\n";
- }
-}
-
-sub Container_END () {
- die "</Container> outside a <Container>\n";
-}
-
-use Apache::ExtUtils ();
-my $proto_perl2c = Apache::ExtUtils->proto_perl2c;
-
-my $code = "";
-while(my($pp,$cp) = each %$proto_perl2c) {
- next unless $pp;
- $code .= <<SUB;
-sub $cp ($pp) {
- warn "$cp called with args: ", (map "`\$_', ", \@_), "\n";
- my(\$cfg, \$parms, \@args) = \@_;
- \$cfg->attr($cp => [\@args]) if ref(\$cfg);
-}
-SUB
-}
-
-eval $code; die $@ if $@;
-
-package TestDirectives::Base;
-
-sub DIR_CREATE {
- my($class, $parms) = @_;
- my $info = $parms->info;
- my $o = $parms->override;
- warn "$class->new called info=`$info',override=`$o'\n";
- return bless {
- FromNew => __PACKAGE__,
- path => $parms->path || "",
- }, $class;
-}
-
-sub DIR_MERGE {
- my($base, $add) = @_;
- my %new = ();
- @new{ keys %$base, keys %$add} =
- (values %$base, values %$add);
-
- return bless \%new, ref($base);
-}
-
-*SERVER_MERGE = \&DIR_MERGE;
-
-sub SERVER_CREATE {
- my($class, $parms) = @_;
- warn "$class->SERVER_CREATE\n";
- return bless {
- ServerClass => __PACKAGE__,
- }, $class;
-}
-
-1;
-__END__
diff --git a/tags/v1_29/t/conf/.cvsignore b/tags/v1_29/t/conf/.cvsignore
deleted file mode 100644
index 0fe026a..0000000
--- a/tags/v1_29/t/conf/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-httpd.conf
-LoadModule.conf
-dev-null
diff --git a/tags/v1_29/t/conf/httpd.conf-dist b/tags/v1_29/t/conf/httpd.conf-dist
deleted file mode 100644
index 84a48bb..0000000
--- a/tags/v1_29/t/conf/httpd.conf-dist
+++ /dev/null
@@ -1,317 +0,0 @@
-#PerlOpmask default
-
-=pod
-
-=head1 NAME
-
-mod_perl test configuration file
-
-=head1 DESCRIPTION
-
-umm, we use this to test mod_perl
-
-=over to apache
-
- #-Tw
- PerlTaintCheck On
- PerlWarn On
- PerlFreshRestart On
-
-=back to pod
-
-=over 4
-
-=item Test that mod_perl skips this
-
-=back
-
-=cut
-
-<Directory />
-AllowOverride None
-</Directory>
-<Directory ./t>
-AllowOverride All
-</Directory>
-
-#make sure all regex stuff works
-#BrowserMatch Mozilla/2 nokeepalive
-
-#PerlPassEnv PERL5LIB PERL5OPT
-
-#PerlPostReadRequestHandler Apache::StatINC
-#PerlRestartHandler Apache::Symbol
-#PerlFreshRestart On
-PerlSetVar UndefOnReload On
-
-#Configuration directives specific to mod_perl
-ServerRoot ./t
-User nobody
-Group nogroup
-Port 8529
-ServerName localhost
-DocumentRoot ./t/docs
-
-#mod_perl stuff
-
-
-PerlPassEnv TERM EDITOR NOCHANCE USER PERL5LIB
-PerlSetEnv KeyForPerlSetEnv OK
-PerlSetVar KeyForPerlSetVar OK
-
-PerlRequire docs/startup.pl
-PerlRequire docs/stacked.pl
-
-=pod
-<Perl>
- push @INC, map { "t/TestDirectives/blib/$_" } qw(arch lib);
- require Apache::TestDirectives;
-</Perl>
-TestCmd one two
-=cut
-
-#we do this to test that `PerlSendHeader Off' will work
-<Files ~ "\.pl$">
- PerlHandler Apache::Registry
- PerlSendHeader On
- Options +ExecCGI
-</Files>
-
-Alias /perl/ ./t/net/perl/
-Alias /lexinfo/ ./t/net/perl/
-Alias /perl_xs/ ./t/net/perl/
-Alias /dirty-perl/ ./t/net/perl/
-
-Alias /cgi-bin/ ./t/net/perl/
-
-<Location /dirmagic>
-PerlHandler -My::DirIndex
-</Location>
-
-<Location /perl>
-ErrorDocument 500 /perl/server_error.pl
-SetHandler perl-script
-PerlHandler Apache::Registry::handler
-Options +ExecCGI
-PerlSendHeader Off
-</Location>
-
-<Location /lexinfo>
-SetHandler perl-script
-PerlHandler Apache::RegistryLexInfo->handler
-Options +ExecCGI
-PerlSendHeader Off
-</Location>
-
-<Location /perl_xs>
-ErrorDocument 500 /perl_xs/server_error.pl
-SetHandler perl-script
-PerlHandler Apache::RegistryXS
-Options +ExecCGI
-PerlSendHeader Off
-</Location>
-
-<Location /dirty-perl>
-Options +ExecCGI
-SetHandler perl-script
-PerlHandler Apache::PerlRun
-PerlSendHeader On
-</Location>
-
-<Location /perl/noenv>
-SetHandler perl-script
-PerlHandler Apache::Registry::handler
-Options +ExecCGI
-PerlSendHeader Off
-PerlSetupEnv Off
-</Location>
-
-<Location /perl_xs/noenv>
-SetHandler perl-script
-PerlHandler Apache::RegistryXS
-Options +ExecCGI
-PerlSendHeader Off
-PerlSetupEnv Off
-</Location>
-
-<Location /cgi-bin>
-SetHandler cgi-script
-Options +ExecCGI
-</Location>
-
-<Location /perl/io>
-SetHandler perl-script
-PerlHandler Apache::Registry::handler
-Options +ExecCGI
-PerlSendHeader On
-PerlSetupEnv On
-</Location>
-
-<Location /perl_xs/io>
-SetHandler perl-script
-PerlHandler Apache::RegistryXS
-Options +ExecCGI
-PerlSendHeader On
-PerlSetupEnv On
-</Location>
-
-<Location /perl/perl-status>
-PerlSetVar StatusOptionsAll On
-SetHandler perl-script
-PerlHandler +Apache::Status
-PerlSetEnv PERL5LIB /home/dougm/lib/perl
-</Location>
-
-<Location /perl_xs/perl-status>
-PerlSetVar StatusPeek On
-PerlSetVar StatusGraph On
-PerlSetVar StatusDumper On
-SetHandler perl-script
-PerlHandler Apache::Status
-</Location>
-
-#PerlSetEnv PERL_RLIMIT_CPU 25
-#PerlChildInitHandler Apache::Resource
-
-#PerlChildInitHandler My::child_init
-#PerlChildExitHandler My::child_exit
-
-#end mod_perl stuff
-
-ErrorLog logs/error_log
-PidFile logs/httpd.pid
-ResourceConfig conf/srm.conf
-#mod_ssl has a problem with /dev/null
-TypesConfig conf/dev-null
-
-AddType text/x-server-parsed-html .shtml
-AddType text/html .html
-
-AddType text/perl-module .pm
-Action text/perl-module /perl/action.pl
-
-#PerlModule Apache::Registry
-#PerlModule Apache::Safe
-
-#<Location /perl>
-#Options ExecCGI
-#SetHandler perl-script
-#PerlHandler Apache::Registry::handler
-#PerlDispatchHandler Apache::Safe::handler
-#</Location>
-
-#protect mod_include #perl's
-#<Files *.shtml>
-#PerlDispatchHandler Apache::Safe::handler
-#</Files>
-
-#test some other modules if available
-<Location /subr>
-SetHandler perl-script
-PerlHandler Apache::Sandwich
-PerlSetVar HEADER /test.html
-PerlSetVar FOOTER "/perl/cgi.pl?PARAM=1 /perl/io/perlio.pl"
-</Location>
-
-<Location /STAGE>
-
-ErrorDocument 403 /stage-redir
-ErrorDocument 404 /stage-redir
-
-</Location>
-
-#Andreas' Apache::Sandwich
-<Location /stage-redir>
-# the name of this location must match the ErrorDocument redirects
-# above
-
-# PerlSetVar apache_stage_regex " ^ (/STAGE/[^/]*) (.*) $ "
-
-# This regex has to split a staged URI into two parts. It is
-# evaluated with the /ox switch in effect, so this will NOT be a
-# per-directory variable. The first part will be thrown away and
-# just the second part will be served if the original URI cannot
-# be accessed. In case of 301 and 302 redirects the first part
-# will be prepended again. The default regex is defined as above
-# which means that URIS will be split into "/STAGE/anyuser" and
-# the rest.
-
-SetHandler perl-script
-PerlHandler Apache::Stage
-Options +ExecCGI
-
-</Location>
-
-#Apache::ePerl
-<Files ~ ".+\.iphtml$">
- Options +ExecCGI
- SetHandler perl-script
- PerlHandler Apache::ePerl
-</Files>
-
-AddType text/html .ehtml
-#HTML::Embperl
-<Files *.ehtml>
- SetHandler perl-script
- PerlHandler HTML::Embperl
- Options +ExecCGI
-</Files>
-
-#Apache::EP
-<Files *.ep>
- SetHandler perl-script
- #PerlFixupHandler "sub { $INC{'DBI.pm'} ||= 1; require Apache::EP; }"
- PerlHandler Apache::EP->handler
- Options +ExecCGI
-</Files>
-
-<IfModule apache_ssl.c>
-SSLDisable
-SSLCacheServerPath /tmp
-SSLCacheServerPort /tmp/gcache_port
-</IfModule>
-
-<IfModule mod_ssl.c>
-SSLEngine Off
-SSLSessionCache none
-
-SSLRandomSeed startup builtin
-SSLRandomSeed connect builtin
-#SSLLog logs/ssl_engine_log
-#SSLLogLevel info
-</IfModule>
-
-<Location /status>
-SetHandler server-status
-</Location>
-
-<Location /info>
-SetHandler server-info
-</Location>
-
-<Location /manual/mod>
-SetHandler perl-script
-PerlHandler Apache::ModuleDoc
-</Location>
-
-<Location /object>
-SetHandler perl-script
-PerlHandler $My::Obj->method
-</Location>
-
-<Location /death>
-PerlHandler Apache::Death
-SetHandler perl-script
-</Location>
-
-#libapreq
-#LoadModule testapreq_module modules/libtestapreq.so
-<Location /apreq-form-test>
-SetHandler apreq-form
-</Location>
-<Location /apreq-upload-test>
-SetHandler apreq-upload
-</Location>
-<Location /apreq-cookie-test>
-SetHandler apreq-cookie
-</Location>
diff --git a/tags/v1_29/t/conf/httpd.conf-win32 b/tags/v1_29/t/conf/httpd.conf-win32
deleted file mode 100644
index 29d2722..0000000
--- a/tags/v1_29/t/conf/httpd.conf-win32
+++ /dev/null
@@ -1,284 +0,0 @@
-
-#make sure all regex stuff works
-
-#BrowserMatch Mozilla/2 nokeepalive
-
-
-#PerlFreshRestart On
-
-#Configuration directives specific to mod_perl
-
-ServerRoot "./t"
-
-Port 8529
-
-ServerName localhost
-
-DocumentRoot "./t/docs"
-
-
-#mod_perl stuff
-
-LoadModule perl_module modules/mod_perl.so
-
-#-Tw
-
-PerlTaintCheck On
-
-PerlWarn On
-
-
-PerlSetEnv KeyForPerlSetEnv OK
-
-PerlSetVar KeyForPerlSetVar OK
-
-PerlRequire docs/init.pl
-
-PerlRequire docs/startup.pl
-
-PerlRequire docs/stacked.pl
-
-PerlTransHandler PerlTransHandler
-
-
-
-
-
-Alias /perl/ ./t/net/perl/
-
-Alias /dirty-perl/ ./t/net/perl/
-
-ScriptAlias /cgi-bin/ ./t/net/perl/
-
-#ScriptAlias /cgi-bin/ ./t/net/perl/
-
-<Location /dirty-perl>
-Options +ExecCGI
-SetHandler perl-script
-PerlHandler Apache::PerlRun
-PerlSendHeader On
-</Location>
-
-<Location /perl/noenv>
-SetHandler perl-script
-PerlHandler Apache::Registry::handler
-Options +ExecCGI
-PerlSendHeader Off
-PerlSetupEnv Off
-</Location>
-
-<Location /dirmagic>
-PerlHandler My::DirIndex
-</Location>
-
-<Location /perl>
-
-SetHandler perl-script
-
-PerlHandler Apache::Registry
-
-Options ExecCGI
-
-</Location>
-
-
-#<Location /cgi-bin>
-
-#SetHandler cgi-script
-
-#Options ExecCGI
-
-#</Location>
-
-
-<Location /perl/io>
-
-SetHandler perl-script
-
-PerlHandler Apache::Registry
-
-Options ExecCGI
-
-PerlSendHeader On
-
-PerlSetupEnv On
-
-</Location>
-
-
-<Location /perl/perl-status>
-
-SetHandler perl-script
-
-PerlHandler Apache::Status
-
-</Location>
-
-
-#PerlChildInitHandler My::child_init
-
-#PerlChildExitHandler My::child_exit
-
-
-#end mod_perl stuff
-
-
-#
-
-ErrorLog logs/mod_perl_error_log
-
-PidFile logs/mod_perl_httpd.pid
-
-AccessConfig conf/access.conf
-
-ResourceConfig conf/srm.conf
-
-TypesConfig conf/mime.types
-
-TransferLog logs/xferlog
-
-ScoreBoardFile logs/scoreboard
-
-
-AddType text/x-server-parsed-html .shtml
-
-AddType text/html .html
-
-AddType text/perl-module .pm .PM
-
-
-Action text/perl-module /perl/action.pl
-
-
-#PerlModule Apache::Registry
-
-#PerlModule Apache::Safe
-
-
-#<Location /perl>
-
-#Options ExecCGI
-
-#SetHandler perl-script
-
-#PerlHandler Apache::Registry::handler
-
-#PerlDispatchHandler Apache::Safe::handler
-
-#</Location>
-
-
-#protect mod_include #perl's
-
-#<Files *.shtml>
-
-#PerlDispatchHandler Apache::Safe::handler
-
-#</Files>
-
-
-#test some other modules if available
-
-<Location /subr>
-
-SetHandler perl-script
-
-PerlHandler Apache::Sandwich
-
-PerlSetVar HEADER /test.html
-
-PerlSetVar FOOTER "/perl/cgi.pl?PARAM=1 /perl/io/perlio.pl"
-
-</Location>
-
-
-<Location /STAGE>
-
-
-ErrorDocument 403 /stage-redir
-
-ErrorDocument 404 /stage-redir
-
-
-</Location>
-
-
-#Andreas' Apache::Sandwich
-
-<Location /stage-redir>
-
-# the name of this location must match the ErrorDocument redirects
-
-# above
-
-
-# PerlSetVar apache_stage_regex " ^ (/STAGE/[^/]*) (.*) $ "
-
-
-# This regex has to split a staged URI into two parts. It is
-
-# evaluated with the /ox switch in effect, so this will NOT be a
-
-# per-directory variable. The first part will be thrown away and
-
-# just the second part will be served if the original URI cannot
-
-# be accessed. In case of 301 and 302 redirects the first part
-
-# will be prepended again. The default regex is defined as above
-
-# which means that URIS will be split into "/STAGE/anyuser" and
-
-# the rest.
-
-
-SetHandler perl-script
-
-PerlHandler Apache::Stage
-
-Options ExecCGI
-
-
-</Location>
-
-
-#Apache::ePerl
-
-<Files ~ ".+\.iphtml$">
-
- Options +ExecCGI
-
- SetHandler perl-script
-
- PerlHandler Apache::ePerl
-
-</Files>
-
-
-AddType text/html .ehtml
-
-#HTML::Embperl
-
-<Files ~ "\.ehtml$">
-SetHandler perl-script
-PerlHandler HTML::Embperl
-Options +ExecCGI
-</Files>
-
-<Location /perl/noenv>
-SetHandler perl-script
-PerlHandler Apache::Registry::handler
-Options +ExecCGI
-PerlSendHeader Off
-PerlSetupEnv Off
-</Location>
-
-<Location /death>
-PerlHandler Apache::Death
-SetHandler perl-script
-</Location>
-
-<Location /chain>
-SetHandler perl-script
-PerlHandler Stacked::one Stacked::two Stacked::three Stacked::four
-</Location>
diff --git a/tags/v1_29/t/conf/httpd.conf.pl b/tags/v1_29/t/conf/httpd.conf.pl
deleted file mode 100644
index 75c7680..0000000
--- a/tags/v1_29/t/conf/httpd.conf.pl
+++ /dev/null
@@ -1,287 +0,0 @@
-#PerlOpmask default
-
-<IfModule mod_dll.c>
-LoadModule perl_module modules/mod_perl.so
-</IfModule>
-
-AddType text/x-server-parsed-html .shtml
-AddType text/perl-module .pm
-
-Action text/perl-module /perl/action.pl
-
-PerlRequire docs/startup.pl
-PerlRequire docs/stacked.pl
-
-PerlSetEnv Tops Uno
-PerlChildInitHandler "sub { die 'PerlSetEnv busted' unless $ENV{Tops} eq 'Uno' }"
-
-PerlPassEnv TEST_PERL_DIRECTIVES
-
-#-Tw
-PerlTaintCheck On
-PerlWarn On
-
-PerlSetVar KeyForPerlSetVar OK
-PerlSetEnv KeyForPerlSetEnv OK
-
-<Perl>
-#!perl
-use Apache ();
-use Apache::Registry ();
-use Apache::RegistryNG ();
-
-for (qw(TEST NOCHANCE)) {
- if(Apache->define($_)) {
- print "IfDefine $_\n";
- }
-}
-
-Apache::Server->register_cleanup(sub {
- warn "Apache::Server registered cleanup called for $$\n";
- 0;
-});
-
-if($ENV{TEST_PERL_DIRECTIVES}) {
- #t/TestDirectives/TestDirectives.pm
- push @INC, map { "t/TestDirectives/blib/$_" } qw(arch lib);
- require Apache::TestDirectives;
- require Apache::ExtUtils;
-
- my $proto_perl2c = Apache::ExtUtils->proto_perl2c;
-
- $PerlConfig .= "YAC yet another\n";
-
- $PerlConfig .= "<Location /perl>\n";
- while(my($pp,$cp) = each %$proto_perl2c) {
- my $arg = "A";
- $pp =~ s/^\$\$//;
- 1 while $pp =~ s/(\$|\@)/$arg++ . " "/ge;
- $PerlConfig .= "$cp $pp\n";
- }
-
- $PerlConfig .= <<EOF;
-TestCmd one two
-AnotherCmd
-CmdIterate A B C D E F
-</Location>
-<Container /for/whatever>
-
-it's
- miller
-time
-#make that a scotch
-</Container>
-
-<Location /perl/io>
-TestCmd PerlIO IsStdio
-</Location>
-EOF
-}
-
-$My::config_is_perl = 1;
-
-my $dir = $Apache::Server::CWD;
-$dir .= "/t"; # if -d "t";
-my $Is_Win32 = ($^O eq "MSWin32");
-
-sub prompt ($;$) {
- my($mess,$def) = @_;
- print "$mess [$def]";
- STDIN->untaint;
- chomp(my $ans = <STDIN>);
- $ans || $def;
-}
-
-$ServerRoot = $dir;
-
-$User = $Is_Win32 ? "nobody" : (getpwuid($>) || $>);
-$Group = $Is_Win32 ? "nogroup" : (getgrgid($)) || $));
-
-if($User eq "root") {
- my $other = (getpwnam('nobody'))[0];
- $User = $other if $other;
-}
-if($User eq "root") {
- print "Cannot run tests as User `$User'\n";
- $User = prompt "Which User?", "nobody";
- $Group = prompt "Which Group?", $Group;
-}
-print "Will run tests as User: '$User' Group: '$Group'\n";
-
-require 'net/config.pl';
-my $srv = $net::httpserver;
-($srv = $net::httpserver) =~ s/\D+$//;
-$Port = (split ":", $srv, 2)[1];
-$Port ||= 8529;
-print "Will bind to Port $Port\n";
-
-$DocumentRoot = "$dir/docs";
-$ServerName = "localhost";
-
-push @AddType, ["text/x-server-parsed-html" => ".shtml"];
-
-for (qw(/perl /cgi-bin /dirty-perl /perl_xs)) {
- push @Alias, [$_ => "$dir/net/perl/"];
-}
-
-my @mod_perl = (
- SetHandler => "perl-script",
- PerlHandler => "Apache::RegistryNG->handler",
- Options => "ExecCGI",
-);
-
-$Location{"/dirmagic"} = {
- PerlHandler => "My::DirIndex",
-};
-
-$Location{"/dirty-perl"} = {
- SetHandler => "perl-script",
- PerlHandler => "Apache::PerlRun",
- Options => "+ExecCGI ",
- PerlSendHeader => "On",
-};
-
-for (qw(perl perl_xs)) {
- $Location{"/$_"} = {
- @mod_perl,
- PerlSetEnv => [KeyForPerlSetEnv => "OK"],
- #PerlSetVar => [KeyForPerlSetVar => "OK"],
- };
-}
-
-for (qw(perl perl_xs)) {
- $Location{"/$_/noenv"} = {
- @mod_perl,
- PerlSetupEnv => "Off",
- };
-}
-
-$LocationMatch{"/(cgi|slow)-bin"} = {
- SetHandler => "cgi-script",
- Options => "ExecCGI",
-};
-
-sub My::Files::handler {
- my $r = shift;
- $r->send_http_header('text/plain');
- printf "%s pulled out of thin air at %s",
- $r->filename, scalar localtime $r->request_time;
-}
-
-sub My::Directory::handler {
- my $r = shift;
- $r->send_http_header('text/plain');
- printf "%s says to take a hike", $r->filename =~ m:(\w+)/public:;
-}
-
-$FilesMatch{".(date|time)\$"} = {
- SetHandler => 'perl-script',
- PerlHandler => 'My::Files',
-};
-
-$DirectoryMatch{"public_html"} = {
- SetHandler => 'perl-script',
- PerlHandler => 'My::Directory',
-};
-
-#just make sure we can parse this
-
-chomp(my $hostname = `hostname`);
-if($hostname =~ /ramona/) {
- $NameVirtualHost = '209.228.11.20:8529';
- $VirtualHost{"$NameVirtualHost:8529"} = [
- {
- ServerName => 'ramona.criticalpath.net',
- DocumentRoot => '/home/ix',
- ServerAdmin => 'ix',
- },
- {
- ServerName => 'ramona.eng.cp.net',
- DocumentRoot => '/home/dougm',
- ServerAdmin => 'dougm',
- },
- ];
-
- $Location{"/perl/io"} = {
- @mod_perl,
- PerlSendHeader => "On",
- PerlSetupEnv => "On",
- };
- $Location{"/perl_xs/io"} = {
- @mod_perl,
- PerlSendHeader => "On",
- PerlSetupEnv => "On",
- };
-}
-else {
- $VirtualHost{"localhost"} = {
- Location => {
- "/perl/io" => {
- @mod_perl,
- PerlSendHeader => "On",
- PerlSetupEnv => "On",
- },
- "/perl_xs/io" => {
- @mod_perl,
- PerlSendHeader => "On",
- PerlSetupEnv => "On",
- },
- },
- };
-}
-
-#$Location{"/perl/io"} = {
-# @mod_perl,
-# PerlSendHeader => "On",
-# PerlSetupEnv => "On",
-#};
-
-for (qw(perl perl_xs)) {
- $Location{"/$_/perl-status"} = {
- SetHandler => "perl-script",
- PerlHandler => "Apache::Status",
- };
-}
-
-for (qw(status info)) {
- $Location{"/server-$_"} = {
- SetHandler => "server-$_",
- };
-}
-
-$ErrorLog = "logs/error_log";
-$PidFile = "logs/httpd.pid";
-
-$AccessConfig = $TypesConfig = $ScoreBoardFile = "$dir/docs/null.txt";
-
-$LockFile = "logs/mod_perl.lock";
-
-#push @PerlChildInitHandler, "My::child_init";
-#push @PerlChildExitHandler, "My::child_exit";
-
-$Location{"/STAGE"} = {
- ErrorDocument => [
- [403 => "/stage-redir"],
- [404 => "/stage-redir"],
- ],
-};
-
-$Location{"/stage-redir"} = {
- @mod_perl,
- PerlHandler => "Apache::Stage",
-};
-
-$PerlTransHandler = "PerlTransHandler::handler";
-
-$Location{"/chain"} = {
- @mod_perl,
- PerlHandler => [map { "Stacked::$_" } qw(one two three four)],
-};
-
-$Location{"/death"} = {
- @mod_perl,
- PerlHandler => "Apache::Death",
-};
-
-</Perl>
-
diff --git a/tags/v1_29/t/conf/mod_perl_srm.conf b/tags/v1_29/t/conf/mod_perl_srm.conf
deleted file mode 100644
index 0e845cc..0000000
--- a/tags/v1_29/t/conf/mod_perl_srm.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-PerlTransHandler PerlTransHandler::handler
diff --git a/tags/v1_29/t/docs/.cvsignore b/tags/v1_29/t/docs/.cvsignore
deleted file mode 100644
index f87d557..0000000
--- a/tags/v1_29/t/docs/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-test.shtml
-blib.pl
-stacked
-hooks.txt
-.htaccess
diff --git a/tags/v1_29/t/docs/LoadClass.pm b/tags/v1_29/t/docs/LoadClass.pm
deleted file mode 100644
index 31a9516..0000000
--- a/tags/v1_29/t/docs/LoadClass.pm
+++ /dev/null
@@ -1,19 +0,0 @@
-
-package LoadClass;
-#testing PERL_METHOD_HANDLERS
-{
- package BaseClass;
- #so 5.005-tobe doesn't complain:
- #No such package "BaseClass" in @ISA assignment at ...
-}
-
-@ISA = qw(BaseClass);
-
-sub method ($$) {
- my($class, $r) = @_;
- #warn "$class->method called\n";
- 0;
-}
-
-1;
-__END__
diff --git a/tags/v1_29/t/docs/STAGE/u1/nada.txt b/tags/v1_29/t/docs/STAGE/u1/nada.txt
deleted file mode 100644
index 1fa1684..0000000
--- a/tags/v1_29/t/docs/STAGE/u1/nada.txt
+++ /dev/null
@@ -1 +0,0 @@
-nada
diff --git a/tags/v1_29/t/docs/auth/.htaccess b/tags/v1_29/t/docs/auth/.htaccess
deleted file mode 100644
index 375a411..0000000
--- a/tags/v1_29/t/docs/auth/.htaccess
+++ /dev/null
@@ -1,14 +0,0 @@
-
-AuthName mod_perl
-AuthType Basic
-PerlAuthenHandler Apache::AuthenTest
-PerlAuthzHandler Apache::Constants::OK
-require valid-user
-
-#<Perl>
-#$AuthName = "mod_perl";
-#$AuthType = "Basic";
-#$PerlAuthenHandler = "Apache::AuthenTest";
-#$require = "valid-user";
-#</Perl>
-
diff --git a/tags/v1_29/t/docs/badsyntax.pl b/tags/v1_29/t/docs/badsyntax.pl
deleted file mode 100644
index d9a401e..0000000
--- a/tags/v1_29/t/docs/badsyntax.pl
+++ /dev/null
@@ -1,9 +0,0 @@
-package Apache::BadSyntax;
-
-for (1..2) {
-
-sub foo;
-
-1;
-
-__END__
diff --git a/tags/v1_29/t/docs/book.gif b/tags/v1_29/t/docs/book.gif
deleted file mode 100644
index 611242c..0000000
--- a/tags/v1_29/t/docs/book.gif
+++ /dev/null
Binary files differ
diff --git a/tags/v1_29/t/docs/content.html b/tags/v1_29/t/docs/content.html
deleted file mode 100644
index a0aba93..0000000
--- a/tags/v1_29/t/docs/content.html
+++ /dev/null
@@ -1 +0,0 @@
-OK
\ No newline at end of file
diff --git a/tags/v1_29/t/docs/content.shtml b/tags/v1_29/t/docs/content.shtml
deleted file mode 100644
index bb9f898..0000000
--- a/tags/v1_29/t/docs/content.shtml
+++ /dev/null
@@ -1 +0,0 @@
-<!--#include virtual="/perl/echo?OK" -->
\ No newline at end of file
diff --git a/tags/v1_29/t/docs/dirmagic/cal.txt b/tags/v1_29/t/docs/dirmagic/cal.txt
deleted file mode 100644
index 6c56067..0000000
--- a/tags/v1_29/t/docs/dirmagic/cal.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- 1998
-
- Jan Feb Mar
- S M Tu W Th F S S M Tu W Th F S S M Tu W Th F S
- 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5 6 7
- 4 5 6 7 8 9 10 8 9 10 11 12 13 14 8 9 10 11 12 13 14
-11 12 13 14 15 16 17 15 16 17 18 19 20 21 15 16 17 18 19 20 21
-18 19 20 21 22 23 24 22 23 24 25 26 27 28 22 23 24 25 26 27 28
-25 26 27 28 29 30 31 29 30 31
-
- Apr May Jun
- S M Tu W Th F S S M Tu W Th F S S M Tu W Th F S
- 1 2 3 4 1 2 1 2 3 4 5 6
- 5 6 7 8 9 10 11 3 4 5 6 7 8 9 7 8 9 10 11 12 13
-12 13 14 15 16 17 18 10 11 12 13 14 15 16 14 15 16 17 18 19 20
-19 20 21 22 23 24 25 17 18 19 20 21 22 23 21 22 23 24 25 26 27
-26 27 28 29 30 24 25 26 27 28 29 30 28 29 30
- 31
- Jul Aug Sep
- S M Tu W Th F S S M Tu W Th F S S M Tu W Th F S
- 1 2 3 4 1 1 2 3 4 5
- 5 6 7 8 9 10 11 2 3 4 5 6 7 8 6 7 8 9 10 11 12
-12 13 14 15 16 17 18 9 10 11 12 13 14 15 13 14 15 16 17 18 19
-19 20 21 22 23 24 25 16 17 18 19 20 21 22 20 21 22 23 24 25 26
-26 27 28 29 30 31 23 24 25 26 27 28 29 27 28 29 30
- 30 31
- Oct Nov Dec
- S M Tu W Th F S S M Tu W Th F S S M Tu W Th F S
- 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5
- 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12
-11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19
-18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
-25 26 27 28 29 30 31 29 30 27 28 29 30 31
-
-
-
-
diff --git a/tags/v1_29/t/docs/env.iphtml b/tags/v1_29/t/docs/env.iphtml
deleted file mode 100644
index 7388d97..0000000
--- a/tags/v1_29/t/docs/env.iphtml
+++ /dev/null
@@ -1,32 +0,0 @@
-<html>
-<head>
-<title>demo.env</title>
-</head>
-<body>
-<blockquote>
-<h1>demo.env</h1>
-<p>
-<!--
-##
-## ePerl Demo: printing of the CGI/ePerl environment
-## Copyright (c) 1996,1997 Ralf S. Engelschall, All Rights Reserved.
-##
-## This just prints out the CGI environment provided
-## by the Webserver as a sorted list consisting of
-## key/value pairs.
-##
--->
-
-Our CGI/ePerl environment currently looks like this:
-
-<pre>
-<? my $key;
- foreach $key (sort(keys(%ENV))) {
- print "$key=$ENV{$key}\n";
- }
-!>
-</pre>
-
-</blockquote>
-</body>
-</html>
diff --git a/tags/v1_29/t/docs/error.txt b/tags/v1_29/t/docs/error.txt
deleted file mode 100644
index 7641adc..0000000
--- a/tags/v1_29/t/docs/error.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-sorry pal.
\ No newline at end of file
diff --git a/tags/v1_29/t/docs/lists.ehtml b/tags/v1_29/t/docs/lists.ehtml
deleted file mode 100644
index ad967b1..0000000
--- a/tags/v1_29/t/docs/lists.ehtml
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-
-<head>
-<meta http-equiv="Content-Type"
-content="text/html; charset=iso-8859-1">
-<title>Lists</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<p>[- @k = keys %INC -]<br>
-[- @v = values %INC -]<br>
-</p>
-<hr>
-<P>OL Tag</P>
-<ol>
- <li>[+ $k[$row] +] = [+ $v[$row] +]</li>
-</ol>
-
-<hr>
-<P>UL Tag</P>
-<ul>
- <li>[+ $k[$row] +] = [+ $v[$row] +]</li>
-</ul>
-
-<hr>
-<form method="POST">
- <P>Select Tag</P>
-
- If you request this document with list.htm?sel=x you can specify which
- module of the dropdownlist is initialy selected<BR>
- eg. lists.htm?sel=Apache.pm
-
- <p><select name="sel" size="1">
- <option value="[+ $k[$row] +]">[+ $v[$row] +]</option>
- </select></p>
-</form>
-
-<hr>
-<P>DL Tag</P>
-<dl>
- <dt>[+ $k[$row] +]</dt>
- <dd>[+ $v[$row] +]</dd>
-</dl>
-
-<hr>
-<P>MENU Tag</P>
-<menu>
- <li>[+ $k[$row] +] = [+ $v[$row] +]</li>
-</menu>
-
-<hr>
-<P>DIR Tag</P>
-<dir>
- <li>[+ $k[$row] +] = [+ $v[$row] +]</li>
-</dir>
-</body>
-</html>
diff --git a/tags/v1_29/t/docs/null.txt b/tags/v1_29/t/docs/null.txt
deleted file mode 100644
index 5cef389..0000000
--- a/tags/v1_29/t/docs/null.txt
+++ /dev/null
@@ -1 +0,0 @@
-#carry on, nothing to see here
\ No newline at end of file
diff --git a/tags/v1_29/t/docs/rgy-include.shtml b/tags/v1_29/t/docs/rgy-include.shtml
deleted file mode 100644
index 8edaed2..0000000
--- a/tags/v1_29/t/docs/rgy-include.shtml
+++ /dev/null
@@ -1 +0,0 @@
-<!--#perl sub="Apache::Include" arg="/perl/ssi.pl" arg="1..3" arg="ok 1" arg="ok 2" -->
diff --git a/tags/v1_29/t/docs/rl.pl b/tags/v1_29/t/docs/rl.pl
deleted file mode 100644
index d456d06..0000000
--- a/tags/v1_29/t/docs/rl.pl
+++ /dev/null
@@ -1,27 +0,0 @@
-#test Apache::RegistryLoader
-
-{
- use Apache::RegistryLoader ();
- use DirHandle ();
- use strict;
-
- my $rl = Apache::RegistryLoader->new(trans => sub {
- my $uri = shift;
- $Apache::Server::CWD."/t/net${uri}";
- });
-
- my $path = Apache->server_root_relative("net/perl");
- my $d = DirHandle->new($path) or die "Can't open $path $!";
-
- for my $file ($d->read) {
- next if $file eq "hooks.pl";
- next unless $file =~ /\.pl$/;
- Apache->untaint($file);
- my $status = $rl->handler("/perl/$file");
- unless($status == 200) {
- warn "pre-load of `/perl/$file' failed, status=$status\n";
- }
- }
-}
-
-1;
diff --git a/tags/v1_29/t/docs/stacked.pl b/tags/v1_29/t/docs/stacked.pl
deleted file mode 100644
index 9a55ecc..0000000
--- a/tags/v1_29/t/docs/stacked.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-
-package Stacked;
-
-use vars '$i';
-
-sub handler {
- my $r = shift;
- for my $cv (qw(two three four)) {
- $r->push_handlers(PerlHandler => \&{$cv});
- }
- 0;
-}
-
-sub one {
- my $r = shift;
- $r->content_type("text/plain");
- $r->send_http_header;
-
- $i = 1;
- print "1..4\n";
- $r->print("ok $i\n");
- 0;
-}
-
-sub two {
- ++$i;
- shift->print("ok $i\n");
- 0;
-}
-
-sub three {
- ++$i;
- shift->write_client("ok $i\n");
- 0;
-}
-
-sub four {
- ++$i;
- print "ok $i\n";
- 0;
-}
-
-1;
-
-
diff --git a/tags/v1_29/t/docs/startup.pl b/tags/v1_29/t/docs/startup.pl
deleted file mode 100644
index 61dc525..0000000
--- a/tags/v1_29/t/docs/startup.pl
+++ /dev/null
@@ -1,273 +0,0 @@
-#!perl
-
-unless (defined $ENV{MOD_PERL}) {
- die "\$ENV{MOD_PERL} not set!";
-}
-
-BEGIN {
- use lib map { "$Apache::Server::CWD/$_" } qw(t/docs blib/lib blib/arch);
- require "blib.pl" if -e "./t/docs/blib.pl";
- #Perl ignores w/ -T
- if ($ENV{PERL5LIB} and $ENV{PASS_PERL5LIB}) {
- unshift @INC, map { Apache->untaint($_) } split ":", $ENV{PERL5LIB};
- }
-
- $Apache::Server::Starting or warn "Server is not starting !?\n";
- \$Apache::Server::Starting == \$Apache::ServerStarting or
- warn "GV alias broken\n";
- \$Apache::Server::ReStarting == \$Apache::ServerReStarting or
- warn "GV alias broken\n";
-}
-
-if ($] >= 5.005 and -e "t/docs/local.pl") {
- eval {
- require "local.pl";
- }; $@='' if $@;
-}
-
-use Socket (); #test DynaLoader vs. XSLoader workaroud
-use Apache ();
-use Apache::Registry ();
-unless ($INC{'Apache.pm'} =~ /blib/) {
- die "Wrong Apache.pm loaded: $INC{'Apache.pm'}";
-}
-
-my $version = defined $^V ? sprintf("v%vd", $^V) : $];
-Apache::add_version_component("Perl/$version");
-
-# BSD/OS 3.1 gets confused with some dynamically loaded code inside evals,
-# so make sure IO::File is loaded here, rather than later within an eval.
-# this should not harm any other platforms, since IO::File will be used
-# by them anyhow.
-use IO::File ();
-
-Apache::Constants->export(qw(HTTP_MULTIPLE_CHOICES));
-
-eval {
- require Apache::PerlRunXS;
-}; $@ = '' if $@;
-
-
-{
- last;
- Apache::warn("use Apache 'warn' is ok\n");
-
- my $s = Apache->server;
-
- my($host,$port) = map { $s->$_() } qw(server_hostname port);
- $s->log_error("starting server $host on port $port");
-
- my $admin = $s->server_admin;
- $s->warn("report any problems to server_admin $admin");
-}
-
-#use HTTP::Status ();
-#use Apache::Symbol ();
-#Apache::Symbol->make_universal;
-
-$Apache::DoInternalRedirect = 1;
-$Apache::ERRSV_CAN_BE_HTTP = 1;
-#$Apache::Server::AddPerlVersion = 1;
-#warn "ServerStarting=$Apache::ServerStarting\n";
-#warn "ServerReStarting=$Apache::ServerReStarting\n";
-
-#use Apache::Debug level => 4;
-use mod_perl 1.03_01;
-
-if(defined &main::subversion) {
- die "mod_perl.pm is broken\n";
-}
-
-if($ENV{PERL_TEST_NEW_READ}) {
- *Apache::READ = \&Apache::new_read;
-}
-
-unless($ENV{KeyForPerlSetEnv} and
- $ENV{KeyForPerlSetEnv} eq "OK") {
- warn "PerlSetEnv is broken\n";
-}
-
-%net::callback_hooks = ();
-require "net/config.pl";
-if($net::callback_hooks{PERL_SAFE_STARTUP}) {
- eval "open \$0";
- unless ($@ =~ /open trapped by operation mask/) {
- die "opmask not set";
- }
-}
-else {
- require "docs/rl.pl";
-}
-#for testing perl mod_include's
-
-$Access::Cnt = 0;
-sub main::pid { print $$ }
-sub main::access { print ++$Access::Cnt }
-
-$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not set!";
-
-sub Outside::code {4}
-%Outside::hash = (one => 1);
-@Outside::array = qw(one);
-$Outside::scalar = 'one';
-
-#will be redef'd during tests
-sub PerlTransHandler::handler {-1}
-
-#for testing PERL_HANDLER_METHODS
-#see httpd.conf and t/docs/LoadClass.pm
-
-require "docs/LoadClass.pm";
-
-sub MyClass::method ($$) {
- my($class, $r) = @_;
- #warn "$class->method called\n";
- 0;
-}
-
-sub BaseClass::handler ($$) {
- my($class, $r) = @_;
- #warn "$class->handler called\n";
- 0;
-}
-
-{
- package BaseClass;
- #so 5.005-tobe doesn't complain:
- #No such package "BaseClass" in @ISA assignment at ...
-}
-
-
-$MyClass::Object = bless {}, "MyClass";
-@MyClass::ISA = qw(BaseClass);
-
-#testing child init/exit hooks
-
-sub My::child_init {
- my $r = shift;
- eval {
- my $s = $r->server;
- my $sa = $s->server_admin;
- $s->warn("[notice] child_init for process $$, report any problems to $sa\n");
- }; $@='' if $@;
- 0;
-}
-
-sub My::child_exit {
- warn "[notice] child process $$ terminating\n";
-}
-
-sub My::restart {
- my $r = shift;
- my $s = $r->server;
- my $sa = $s->server_admin;
- push @HTTP::Status::ISA, "Apache::Symbol";
- HTTP::Status->undef_functions;
-}
-
-sub Apache::AuthenTest::handler {
- use Apache::Constants ':common';
- my $r = shift;
-
- $r->custom_response(AUTH_REQUIRED, "/error.txt");
-
- my($res, $sent_pwd) = $r->get_basic_auth_pw;
- return $res if $res; #decline if not Basic
-
- my $user = lc $r->user;
- $r->notes("DoAuthenTest", 1);
-
- unless($user eq "dougm" and $sent_pwd eq "mod_perl") {
- $r->note_basic_auth_failure;
- return AUTH_REQUIRED;
- }
-
- return OK;
-}
-
-use Apache::Constants qw(DECLINED DIR_MAGIC_TYPE);
-
-sub My::DirIndex::handler {
- my $r = shift;
- return DECLINED unless $r->content_type and
- $r->content_type eq DIR_MAGIC_TYPE;
- require DirHandle;
- my $dh = DirHandle->new($r->filename) or die $!;
- my @entries = $dh->read;
- my $x = @entries;
- $r->send_http_header('text/plain');
- print "1..$x\n";
- my $i = 1;
- for my $e (@entries) {
- print "ok $i #($e)\n";
- ++$i;
- }
- 1;
-}
-
-sub My::ProxyTest::handler {
- my $r = shift;
- unless ($r->proxyreq and $r->uri =~ /proxytest/) {
- #warn sprintf "ProxyTest: proxyreq=%d, uri=%s\n",
- $r->proxyreq, $r->uri;
- }
- return -1 unless $r->proxyreq;
- return -1 unless $r->uri =~ /proxytest/;
- $r->handler("perl-script");
- $r->push_handlers(PerlHandler => sub {
- my $r = shift;
- $r->send_http_header("text/plain");
- $r->print("1..1\n");
- $r->print("ok 1\n");
- $r->print("URI=`", $r->uri, "'\n");
- });
- return 0;
-}
-
-if(Apache->can_stack_handlers) {
- Apache->push_handlers(PerlChildExitHandler => sub {
- warn "[notice] push'd PerlChildExitHandler called, pid=$$\n";
- });
-}
-
-END {
- warn "[notice] END block called for startup.pl\n";
-}
-
-package Apache::Death;
-my $say_ok = <<EOF;
-*** The following [error] is expected, no cause for alarm ***
-EOF
-
-sub handler {
- my $r = shift;
-
- my $args = $r->args || "";
- if ($args =~ /die/) {
- warn $say_ok;
- delete $INC{"badsyntax.pl"};
- require "badsyntax.pl"; # contains syntax error
- }
- if($args =~ /croak/) {
- warn $say_ok;
- Carp::croak("Apache::Death");
- }
-
- $r->content_type('text/html');
- $r->send_http_header();
- print "<h1>Script completed</h1>\n";
- return 0;
-}
-
-package Destruction;
-
-sub new { bless {} }
-
-sub DESTROY {
- warn "[notice] Destruction->DESTROY called for \$global_object\n"
-}
-
-#prior to 1.3b1 (and the child_exit hook), this object's DESTROY method would not be invoked
-$global_object = Destruction->new;
-
-1;
diff --git a/tags/v1_29/t/docs/subr/.cvsignore b/tags/v1_29/t/docs/subr/.cvsignore
deleted file mode 100644
index dcaf716..0000000
--- a/tags/v1_29/t/docs/subr/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-index.html
diff --git a/tags/v1_29/t/docs/subr/.exists b/tags/v1_29/t/docs/subr/.exists
deleted file mode 100644
index 814a35e..0000000
--- a/tags/v1_29/t/docs/subr/.exists
+++ /dev/null
@@ -1 +0,0 @@
-Thu May 28 10:42:33 EDT 1998
diff --git a/tags/v1_29/t/docs/test.ep b/tags/v1_29/t/docs/test.ep
deleted file mode 100644
index 164f731..0000000
--- a/tags/v1_29/t/docs/test.ep
+++ /dev/null
@@ -1,71 +0,0 @@
-<ep-package name="HTML::EP::Locale">
-<html><head><title>
-<ep-language de="Administration" en="Administration"></title></head>
-<body bgcolor=#ffffff>
-<h1><ep-language de="Administration" en="Administration"></h1>
-<font size=-1>
-<ep-language language="de">
-<a href="test.ep?language=en">English</a>
-</ep-language>
-<ep-language language="en">
-<a href="test.ep?language=de">Deutsch</a>
-</ep-language>
-</font>
-<ul>
-<li><ep-language language="de">
- Zustellung von E-Mail: Normalerweise wird E-Mail nur zu bestimmten
- Zeitpunkten zugestellt. Falls Sie dagegen eine dringende Mail
- erwarten oder versenden möchten, können Sie die Zustellung
- <a href="/cgi-bin/nph-mail.cgi">jetzt</a> erzwingen.
- </ep-language>
- <ep-language language="en">
- E-Mail Delivery: By default E-Mail will be delivered at certain
- times only. However, you can force delivery in case you are
- expecting or sending some urgent mail
- <a href="/cgi-bin/nph-mail.cgi">here</a>.
- </ep-language>
-<li><ep-language language="de">
- Neue Benutzer eintragen, vorhandene Benutzer ändern oder löschen
- können Sie in der
- <a href="user.ep?language=$_ep_language$">Benutzerverwaltung</a>.
- </ep-language>
- <ep-language language="en">
- Adding new users, modify or delete existing users: This is the
- <a href="user.ep?language=$_ep_language$">User administration</a>
- </ep-language>
-<li><ep-language language="de">
- Ferner können Sie mehrere Benutzer zu einer Gruppe zusammenfassen:
- Mails an die Gruppe werden an alle Gruppenmitglieder weitergeleitet.
- Die <a href="group.ep?language=$_ep_language$">Gruppenverwaltung</a>
- finden Sie hier.
- </ep-language>
- <ep-language language="en">
- Likewise you can build a group of users that can be reached via a
- common email address. This is done with the
- <a href="group.ep?language=$_ep_language$">Group administration</a>.
- </ep-language>
-<li><ep-language language="de">
- Es ist möglich, nicht gelesene Mails nach einem vorgegebenen Zeitraum,
- z.B. 24 Stunden, an die dem Benutzer zugeordnete Gruppe senden zu
- lassen. Dies wird <a href="mail2group.ep?language=$_ep_language$">hier</a>
- eingestellt.
- </ep-language>
- <ep-language language="en">
- It is possible to forward mails to a group associated to the user,
- if it wasn't read for a given time (for example 24 hours). This
- system is administrated
- <a href="mail2group.ep?language=$_ep_language$">here</a>.
- </ep-language>
-<li><ep-language de="Die Verwaltung des WWW-Proxyservers"
- en="The administration of the WWW proxy server">
- <a href="http://squid.nlanr.net">Squid</a>
- <ep-language de="können Sie" en="is happening">
- <a href="squid.ep?language=$_ep_language$">
- <ep-language de="hier" en="here"></a>
- <ep-language de="vornehmen. Es gibt auch eine"
- en="There also is a more">
- <a href="squid_simple.ep?language=$_ep_language$">
- <ep-language de="einfachere Variante" en="simple version"></a>.
-</ul>
-</body>
-</html>
diff --git a/tags/v1_29/t/docs/test.html b/tags/v1_29/t/docs/test.html
deleted file mode 100644
index fc92674..0000000
--- a/tags/v1_29/t/docs/test.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- And so it was decided the camel should be given magical multi-colored
- feathers so it could fly and journey to once unknown worlds.
- And so it was done...
-
-<hr>
-<!-- for testing perl mod_include's -->
-Child <!--#perl sub="main::pid" --> accessed
-<!--#perl sub="main::access" --> times. <br>
-
-<hr>
-
-<!--#perl sub="sub { print qq(__ANON__ works [@_])}" -->
-<p>
-<!--#perl sub="Apache::Include" arg="/perl/ssi.pl" -->
-
-<!--#include virtual="/perl/io/ssi1.pl" -->
-
-<!--#include virtual="/perl/io/ssi2.pl" -->
-
-<!--#perl sub="SSI::one" -->
-
-<!--#perl sub="SSI::two" -->
\ No newline at end of file
diff --git a/tags/v1_29/t/internal/api.t b/tags/v1_29/t/internal/api.t
deleted file mode 100644
index 3d6c6f4..0000000
--- a/tags/v1_29/t/internal/api.t
+++ /dev/null
@@ -1,3 +0,0 @@
-use Apache::testold;
-
-print fetch "http://$net::httpserver$net::perldir/api.pl?arg1=one&arg2=two";
diff --git a/tags/v1_29/t/internal/auth.t b/tags/v1_29/t/internal/auth.t
deleted file mode 100644
index cf2e6c6..0000000
--- a/tags/v1_29/t/internal/auth.t
+++ /dev/null
@@ -1,38 +0,0 @@
-use Apache::testold;
-
-my $ua = Apache::UserAgent->new;
-my $url = URI::URL->new("http://$net::httpserver/auth/.htaccess");
-my $i;
-my $request = HTTP::Request->new(GET => $url);
-
-unless($net::callback_hooks{PERL_AUTHEN}) {
- print "1..1\nok 1\n";
- exit(0);
-}
-
-print "1..2\n";
-
-my $response = $ua->request($request, undef, undef);
-
-test ++$i, $response->is_success;
-#print $response->as_string;
-$ua->creds(qw(bad one));
-
-$response = $ua->request($request, undef, undef);
-
-test ++$i, $response->is_error;
-
-BEGIN {
-package Apache::UserAgent;
-@ISA = qw(LWP::UserAgent);
-@creds = qw(dougm mod_perl);
-
-sub get_basic_credentials { shift->creds }
-
-sub creds {
- shift;
- @creds = @_ if @_;
- @creds;
-}
-
-}
diff --git a/tags/v1_29/t/internal/croak.t b/tags/v1_29/t/internal/croak.t
deleted file mode 100644
index bb83d02..0000000
--- a/tags/v1_29/t/internal/croak.t
+++ /dev/null
@@ -1,14 +0,0 @@
-use Apache::testold;
-
-my $i = 0;
-print "1..12\n";
-
-for (1..2) {
- test ++$i, simple_fetch "/death/";
- test ++$i, !simple_fetch "/death/?die";
- test ++$i, simple_fetch "/death/";
-
- test ++$i, simple_fetch "/death/";
- test ++$i, !simple_fetch "/death/?croak";
- test ++$i, simple_fetch "/death/";
-}
diff --git a/tags/v1_29/t/internal/dirmagic.t b/tags/v1_29/t/internal/dirmagic.t
deleted file mode 100644
index d1d3c4f..0000000
--- a/tags/v1_29/t/internal/dirmagic.t
+++ /dev/null
@@ -1,3 +0,0 @@
-use Apache::testold;
-
-print fetch "/dirmagic";
diff --git a/tags/v1_29/t/internal/error.t b/tags/v1_29/t/internal/error.t
deleted file mode 100644
index 1dc8641..0000000
--- a/tags/v1_29/t/internal/error.t
+++ /dev/null
@@ -1,23 +0,0 @@
-use Apache::testold;
-#we're testing an experimental feature that doesn't work for some folks
-#will revisit later
-unless (defined $ENV{USER} and $ENV{USER} eq 'dougm') {
- print "1..1\nok 1\n";
- exit;
-}
-
-skip_test if WIN32;
-
-my $qs = "This_is_not_a_real_error";
-my $content = fetch "/perl/throw_error.pl?$qs";
-
-my $i = 0;
-
-print "1..2\n";
-
-print $content;
-test ++$i, $content =~ /$qs/;
-
-#make sure ErrorDocuments don't create a recursive error
-test ++$i, $content !~ /Additionally/;
-
diff --git a/tags/v1_29/t/internal/headers.t b/tags/v1_29/t/internal/headers.t
deleted file mode 100644
index 817d8bb..0000000
--- a/tags/v1_29/t/internal/headers.t
+++ /dev/null
@@ -1,66 +0,0 @@
-
-use Apache::testold;
-
-if($] < 5.003_02) {
- print "1..1\nok 1;\n";
- exit;
-}
-
-my $ua = new LWP::UserAgent; # create a useragent to test
-my $base = "http://$net::httpserver$net::perldir";
-my $s = "$base/io/perlio.pl";
-
-my $tests = 11;
-my $cgi;
-
-if(have_module "CGI") {
- (my $v = $CGI::VERSION) =~ s/b\d+$//;
- if($v >= 2.37) {
- $cgi++;
- $tests += 2;
- $v = $CGI::VERSION; #avoid -w arning
- }
-}
-
-print "1..$tests\n";
-my $i = 0;
-
-for (1..4) {
- test $_, fetch($ua, "$s?$_") == $_;
-}
-
-my $str = join "\n", ("A".."D"), "";
-
-test 5, fetch($ua, "$s?5") eq $str;
-
-$i = 5;
-
-my $req = new HTTP::Request('GET', $s);
-$r = $ua->request($req, undef, undef);
-
-test ++$i, $r->header("Server");
-test ++$i, $r->header("X-Perl-Script") eq "perlio.pl";
-
-$req = new HTTP::Request('GET', "$base/test");
-$r = $ua->request($req, undef, undef);
-
-test ++$i, $r->header("Server");
-test ++$i, $r->header("X-Perl-Script") eq "test";
-
-if($cgi) {
- $req = new HTTP::Request('GET', "$base/cgi.pl?PARAM=1");
- $r = $ua->request($req, undef, undef);
- test ++$i, $r->header("Server");
- test ++$i, $r->header("X-Perl-Script") eq "cgi.pl";
-}
-
-$req = new HTTP::Request('GET', "$base/raw.pl");
-$r = $ua->request($req, undef, undef);
-
-test ++$i, not $r->header("Server");
-test ++$i, $r->header("Content-type");
-
-
-
-
-
diff --git a/tags/v1_29/t/internal/hooks.t b/tags/v1_29/t/internal/hooks.t
deleted file mode 100644
index 6589156..0000000
--- a/tags/v1_29/t/internal/hooks.t
+++ /dev/null
@@ -1,79 +0,0 @@
-use File::Copy qw(cp);
-
-
-#version 1.5 that ships with 5.003 is broken!
-undef &cp, *cp = sub { system "cp @_"; } if $File::Copy::VERSION < 2.0;
-
-use ExtUtils::testlib;
-BEGIN { require "net/config.pl"; }
-require LWP::UserAgent;
-require URI::URL;
-
-#first one queries httpd for enabled hooks,
-#generating a hook::handler() for each and writing t/docs/.htaccess
-#next request invokes each handler, each appending to t/docs/hooks.txt
-my $stacked_test = -d "../docs/stacked" or -d "./docs/stacked";
-if($stacked_test) {
- push @urls, qw(/stacked/test.html) ;
- for (qw(.. .)) {
- cp "$_/docs/LoadClass.pm", "../$_/blib/lib" if -e "$_/docs/LoadClass.pm";
- }
-}
-
-@urls = ("$net::perldir/hooks.pl", "/test.html");
-
-my $ua = new LWP::UserAgent; # create a useragent to test
-
-my($request,$response,$str,$hook_tests,$loc,%Seen);
-$hook_tests = 0;
-
-foreach $loc (@urls) {
- $url = new URI::URL("http://$net::httpserver$loc");
-
- $request = new HTTP::Request('GET', $url);
-
- print "GET $url\n\n";
-
- $response = $ua->request($request, undef, undef);
-
- $str = $response->as_string;
-
- print "$str\n";
-
- die "$str\n" unless $response->is_success;
- $hook_tests = $response->content if $response->content =~ /^\d+$/;
-}
-
-unless ($hook_tests > 0) { #no callbacks enabled, fine.
- print "1..1\nok 1\n";
- print "no callbacks defined, skipping tests...\n";
- exit;
-}
-
-print "1..$hook_tests\n";
-$i = 0;
-#if mod_mime is configured shared and mod_perl static,
-#PerlTypeHandler wont be run
-my $forgive = 1;
-
-open HOOKS, "docs/hooks.txt";
-while(<HOOKS>) {
- chomp;
- s/^\s*//; s/\s*$//;
- next unless $_;
- next if $Seen{$_}++;
- $i++;
- print "ok $i\n";
- last if $i >= $hook_tests;
-}
-close HOOKS;
-
-if ($i < $hook_tests) {
- for (1..$forgive) {
- ++$i; print "ok $i\n";
- }
-}
-
-END {
- unlink "docs/.htaccess";
-}
diff --git a/tags/v1_29/t/internal/http-get.t b/tags/v1_29/t/internal/http-get.t
deleted file mode 100755
index 912dff8..0000000
--- a/tags/v1_29/t/internal/http-get.t
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/local/bin/perl -w
-#
-# Check GET via HTTP.
-#
-
-my $num_tests = 10;
-my(@test_scripts) = qw(test perl-status);
-%get_only = map { $_,1 } qw(perl-status);
-
-my(@sys_tests) = qw(syswrite_1 syswrite_2 syswrite_3);
-
-if($] > 5.005_03) {
- $num_tests += (3 + @sys_tests);
- push @test_scripts, qw(io/perlio.pl);
-}
-
-print "1..$num_tests\n";
-
-use Apache::testold;
-require LWP::UserAgent;
-
-my $ua = new LWP::UserAgent; # create a useragent to test
-
-my($request,$response,$str);
-
-foreach $s (@test_scripts) {
- $netloc = $net::httpserver;
- $script = $PERL_DIR . "/$s";
-
- $url = new URI::URL("http://$netloc$script?query");
-
- $request = new HTTP::Request('GET', $url);
-
- print "GET $url\n\n";
-
- $response = $ua->request($request, undef, undef);
-
- $str = $response->as_string;
- print "$str\n";
- die "$1\n" if $str =~ /(Internal Server Error)/;
-
-
- test ++$i, ($response->is_success);
- next if $get_only{$s};
-
- test ++$i, ($str =~ /^REQUEST_METHOD=GET$/m);
- test ++$i, ($str =~ /^QUERY_STRING=query$/m);
-
- if ($s eq 'io/perlio.pl') {
- foreach my $h (@sys_tests) {
- $url = new URI::URL("http://$netloc$script?$h");
-
- $request = new HTTP::Request('GET', $url);
-
- print "GET $url\n\n";
-
- $response = $ua->request($request, undef, undef);
-
- $str = $response->as_string;
- print "$str\n";
- if ($h eq 'syswrite_noheader') {
- test ++$i, $str =~ /(Internal Server Error)/;
- } else {
- die "$1\n" if $str =~ /(Internal Server Error)/;
- test ++$i, ($response->is_success);
- }
- }
- }
-}
-
-my $mp_version;
-my $server = $response->header("Server");
-++$mp_version while $server =~ /(mod_perl)/g;
-test ++$i, $mp_version == 1;
-print "Server: ", $response->header("Server"), "\n";
-
-#test PerlSetupEnv Off
-test ++$i, fetch("$PERL_DIR/noenv/test.pl") !~ /SERVER_SOFTWARE/m;
-
-print "pounding a bit...\n";
-for (1..3) {
- test ++$i, ($ua->request($request, undef, undef)->is_success);
-}
-
-test ++$i, fetch("/perl/test?0") =~ /SCALAR_ARGS=0/;
-
-# avoid -w warning
-$dummy = $net::httpserver;
-$dummy = $net::perldir;
-
-
diff --git a/tags/v1_29/t/internal/http-post.t b/tags/v1_29/t/internal/http-post.t
deleted file mode 100755
index ebe24a9..0000000
--- a/tags/v1_29/t/internal/http-post.t
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/local/bin/perl -w
-#
-# Check POST via HTTP.
-#
-
-use Config;
-
-my $num_tests = 5;
-my(@test_scripts) = qw(test);
-
-#if($Config{usesfio} eq "true" or $] >= 5.003_93) {
-if($] >= 5.003_93) {
- $num_tests += 2;
- push @test_scripts, qw(io/perlio.pl);
-}
-
-print "1..$num_tests\n";
-
-use Apache::testold;
-require LWP::UserAgent;
-
-my $ua = new LWP::UserAgent; # create a useragent to test
-
-my($request,$response,$str,$form);
-
-foreach $script (@test_scripts) {
- $netloc = $net::httpserver;
- $script = $PERL_DIR . "/$script";
-
- $ua = new LWP::UserAgent; # create a useragent to test
-
- $url = new URI::URL("http://$netloc$script");
-
- $form = 'searchtype=Substring';
-
- $request = new HTTP::Request('POST', $url, undef, $form);
- $request->header('Content-Type', 'application/x-www-form-urlencoded');
-
- $response = $ua->request($request, undef, undef);
-
- $str = $response->as_string;
- print "$str\n";
-
- die "$1\n" if $str =~ /(Internal Server Error)/;
-
- test ++$i, ($response->is_success and $str =~ /^REQUEST_METHOD=POST$/m);
- test ++$i, ($str =~ /^CONTENT_LENGTH=(\d+)$/m && $1 == length($form));
-}
-
-print "pounding a bit...\n";
-for (1..3) {
- test ++$i, ($ua->request($request, undef, undef)->is_success);
-}
-
-
-# avoid -w warning
-$dummy = $net::httpserver;
-$dummy = $net::perldir;
diff --git a/tags/v1_29/t/internal/proxy.t b/tags/v1_29/t/internal/proxy.t
deleted file mode 100644
index 60ee65d..0000000
--- a/tags/v1_29/t/internal/proxy.t
+++ /dev/null
@@ -1,24 +0,0 @@
-
-use Apache::testold;
-
-#hrm, deal with this later
-print "1..1\nok 1\n";
-exit 0;
-
-unless(defined $ENV{USER} and $ENV{USER} eq "dougm" and
- $net::callback_hooks{PERL_TRANS} and
- $net::callback_hooks{PERL_STACKED_HANDLERS} and
- $net::callback_hooks{MMN} > 19980270)
-{
- print "1..1\nok 1\n";
- exit 0;
-}
-
-my $url = "http://$net::httpserver/"."proxytest";
-my $ua = LWP::UserAgent->new;
-$ua->proxy([qw(http)], "http://$net::httpserver");
-
-my $request = HTTP::Request->new('GET', $url);
-my $response = $ua->request($request, undef, undef);
-print $response->content;
-
diff --git a/tags/v1_29/t/internal/redirect.t b/tags/v1_29/t/internal/redirect.t
deleted file mode 100644
index e57ee80..0000000
--- a/tags/v1_29/t/internal/redirect.t
+++ /dev/null
@@ -1,102 +0,0 @@
-use Apache::testold;
-use Config;
-
-{
- package NoRedirect::UA;
-
- @ISA = qw(LWP::UserAgent);
-
- sub redirect_ok {0}
-}
-
-if(not $net::Is_Win32 and $Config{usesfio} eq "true") {
- print "1..1\n";
- print "ok 1\n";
- exit;
-}
-
-my $ua = NoRedirect::UA->new;
-
-my $url = "http://$net::httpserver$net::perldir/io/redir.pl";
-my $qredirect = "";
-
-my($request,$response);
-
-my $tests = 4;
-
-$CGI::VERSION ||= 0;
-
-if(have_module("CGI") && ($CGI::VERSION >= 2.37)) {
- $qredirect = "http://$net::httpserver$net::perldir/qredirect.pl";
- $tests += 2;
-}
-
-print "1..$tests\n";
-
-$request = HTTP::Request->new(GET => "$url?internal");
-$response = $ua->request($request, undef, undef);
-
-unless (($response->code == 200) && ($response->content =~ /camel/)) {
- print "not ";
-}
-
-print "ok 1\n";
-
-
-$request = HTTP::Request->new(GET => "$url?remote");
-$response = $ua->request($request, undef, undef);
-
-unless ($response->is_redirect && ($response->header("Location") =~ /perl.apache.org/)) {
- print "not ";
-}
-print "ok 2\n";
-
-#print $response->as_string;
-
-$request = HTTP::Request->new(GET => "$url?content");
-$response = $ua->request($request, undef, undef);
-
-unless ($response->content eq "OK") {
- print "not ";
-}
-
-print "ok 3\n";
-
-print "content=`", $response->content, "'\n";
-
-#test internal redirect
-$request = HTTP::Request->new(GET => "http://$net::httpserver$net::perldir/io/redir1.pl");
-$response = $ua->request($request, undef, undef);
-unless ($response->content eq 'OK') {
- print "not ";
-}
-print "ok 4\n";
-print "content=`", $response->content, "'\n";
-
-if ($qredirect) {
-
- $request = HTTP::Request->new(GET => $qredirect);
- $response = $ua->request($request, undef, undef);
-
- if ($response->content =~ /Location: http/) {
- print "not ";
- }
-
- print "ok 5\n";
-
- print "content=`", $response->content, "'\n";
-
- $ua = LWP::UserAgent->new;
- $request = HTTP::Request->new(GET => $qredirect);
- $response = $ua->request($request, undef, undef);
-
- unless ($response->content eq "OK") {
- print "not ";
- }
-
- print "ok 6\n";
-
- print "content=`", $response->content, "'\n";
-
-
-}
diff --git a/tags/v1_29/t/internal/rwrite.t b/tags/v1_29/t/internal/rwrite.t
deleted file mode 100644
index 2b386f3..0000000
--- a/tags/v1_29/t/internal/rwrite.t
+++ /dev/null
@@ -1,18 +0,0 @@
-
-use Apache::testold;
-
-my $sent = fetch "/perl/rwrite.pl";
-my $i = 0;
-
-my $string = "";
-for ('A'..'Z') {
- $string .= $_ x 1000;
-}
-
-print "1..2\n";
-
-test ++$i, length($sent) == length($string);
-test ++$i, $sent eq $string;
-
-
-
diff --git a/tags/v1_29/t/internal/stacked.t b/tags/v1_29/t/internal/stacked.t
deleted file mode 100644
index 131252a..0000000
--- a/tags/v1_29/t/internal/stacked.t
+++ /dev/null
@@ -1,7 +0,0 @@
-use Apache::testold;
-
-skip_test unless $net::callback_hooks{PERL_STACKED_HANDLERS} and
- $net::callback_hooks{PERL_FIXUP};
-die "can't open http://$net::httpserver/$net::perldir/stacked\n"
- unless simple_fetch "/stacked/test.html";
-print fetch "/chain/";
diff --git a/tags/v1_29/t/internal/table.t b/tags/v1_29/t/internal/table.t
deleted file mode 100644
index 398accc..0000000
--- a/tags/v1_29/t/internal/table.t
+++ /dev/null
@@ -1,3 +0,0 @@
-use Apache::testold;
-
-print fetch "$PERL_DIR/tie_table.pl";
diff --git a/tags/v1_29/t/internal/taint.t b/tags/v1_29/t/internal/taint.t
deleted file mode 100644
index a17287c..0000000
--- a/tags/v1_29/t/internal/taint.t
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/local/bin/perl -w
-
-my(@tests) = qw{
- args env header_in
-};
-
-my $num_tests = scalar @tests;
-print "1..$num_tests\n";
-
-use Apache::testold;
-
-my $ua = new LWP::UserAgent; # create a useragent to test
-
-my($request,$response,$str,$i);
-
-foreach $q (@tests) {
- $netloc = $net::httpserver;
- $script = $net::perldir . "/taint.pl";
-
- $url = new URI::URL("http://$netloc$script?$q");
-
- $request = new HTTP::Request('GET', $url);
-
- print "GET $url\n\n";
-
- $response = $ua->request($request, undef, undef);
-
- $str = $response->as_string;
- print "$str\n";
- die "$1\n" if $str =~ /(Internal Server Error)/;
-
-
- test ++$i, ($response->is_success);
-}
-
-# avoid -w warning
-$dummy = $net::httpserver;
-$dummy = $net::perldir;
diff --git a/tags/v1_29/t/modules/.cvsignore b/tags/v1_29/t/modules/.cvsignore
deleted file mode 100644
index 387a4de..0000000
--- a/tags/v1_29/t/modules/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-ssi.t
\ No newline at end of file
diff --git a/tags/v1_29/t/modules/actions.t b/tags/v1_29/t/modules/actions.t
deleted file mode 100644
index e289776..0000000
--- a/tags/v1_29/t/modules/actions.t
+++ /dev/null
@@ -1,19 +0,0 @@
-
-use Apache::testold;
-
-my $ua = LWP::UserAgent->new; # create a useragent to test
-
-print "1..1\n";
-
-my $module = "/LoadClass.pm";
-
-my $c = fetch($ua, "http://$net::httpserver$module");
-
-print "fetch: `$c'\n";
-
-unless ($c =~ /^OK ${module}$/i) {
- print "not ";
-}
-
-print "ok 1\n";
-
diff --git a/tags/v1_29/t/modules/cgi.t b/tags/v1_29/t/modules/cgi.t
deleted file mode 100644
index 4697ba9..0000000
--- a/tags/v1_29/t/modules/cgi.t
+++ /dev/null
@@ -1,99 +0,0 @@
-
-use Apache::testold;
-
-skip_test unless have_module "CGI";
-
-$ua = new LWP::UserAgent; # create a useragent to test
-
-my $tests = 4;
-my $test_mod_cgi = 0;
-unless($net::callback_hooks{USE_DSO}) {
- #XXX: hrm, fails under dso?!?
- $tests++;
- $test_mod_cgi = 1;
-}
-
-my $i = $tests;
-my $have_com = 0;
-
-eval {
- unless (defined $ENV{USER} and $ENV{USER} eq "dougm") {
- #these tests fail for some other folks, not sure why!
- #since our file upload test passes,
- #my guess is a libwww-perl problem
- die "skipping 6-7";
- }
- require HTTP::Request::Common;
- $HTTP::Request::Common::VERSION ||= '1.00'; #-w
- if($CGI::VERSION >= 2.39 and
- $HTTP::Request::Common::VERSION >= 1.08)
- {
- $tests += 2;
- $have_com = 1;
- }
-};
-
-print "1..$tests\nok 1\n";
-print fetch($ua, "http://$net::httpserver$net::perldir/cgi.pl?PARAM=2");
-print fetch($ua, "http://$net::httpserver$net::perldir/cgi.pl?PARAM=%33");
-print upload($ua, "http://$net::httpserver$net::perldir/cgi.pl", "4 #(fileupload)");
-if($test_mod_cgi) {
- print fetch($ua, "http://$net::httpserver/cgi-bin/cgi.pl?PARAM=5");
-}
-
-sub upload {
- my $ua = shift;
- my $url = new URI::URL(shift);
- my $abc = shift;
- my $curl = new URI::URL "http:";
- my $CRLF = "\015\012";
- my $bound = "Eeek!";
- my $req = new HTTP::Request "POST", $url;
- my $content =
- join(
- "",
- "--$bound${CRLF}",
- "Content-Disposition: form-data; name=\"HTTPUPLOAD\"; filename=\"b\"${CRLF}",
- "Content-Type: text/plain${CRLF}${CRLF}",
- $abc,
- $CRLF,
- "--$bound--${CRLF}"
- );
- $req->header("Content-Length",length($content));
- $req->content_type("multipart/form-data; boundary=$bound");
- $req->content($content);
- $ua->request($req)->content;
-}
-
-if ($have_com) {
- my $url = "http://$net::httpserver$net::perldir/file_upload.cgi";
- my $file = "";
- for my $path (@INC) {
- last if -e ($file = "$path/pod/perlfunc.pod");
- }
-
- $file = $0 unless -e $file;
- my $lines = 0;
- local *FH;
- open FH, $file or die "open $file $!";
- ++$lines while (<FH>);
- close FH;
-
- my $response = $ua->request(HTTP::Request::Common::POST($url,
- Content_Type => 'form-data',
- Content => [count => 'count lines',
- filename => [$file],
- ]));
-
- my $page = $response->content;
- print $response->as_string unless $response->is_success;
- test ++$i, ($page =~ m/Lines:\s+<\D+>(\d+)/m);
- print "$file should have $lines lines (file_upload.cgi says: $1)\n";
- test ++$i, $1 == $lines;
-}
-elsif($CGI::VERSION < 2.39) {
- print "you should upgrade CGI.pm from $CGI::VERSION to 2.39 or higher\n";
-}
-
-
-
diff --git a/tags/v1_29/t/modules/constants.t b/tags/v1_29/t/modules/constants.t
deleted file mode 100644
index e670fee..0000000
--- a/tags/v1_29/t/modules/constants.t
+++ /dev/null
@@ -1,3 +0,0 @@
-use Apache::testold;
-
-print fetch "http://$net::httpserver$net::perldir/constants.pl";
diff --git a/tags/v1_29/t/modules/cookie.t b/tags/v1_29/t/modules/cookie.t
deleted file mode 100644
index d4563c8..0000000
--- a/tags/v1_29/t/modules/cookie.t
+++ /dev/null
@@ -1,23 +0,0 @@
-use strict;
-use Apache::testold;
-use Apache::src ();
-
-my $Is_dougm = (defined($ENV{USER}) && ($ENV{USER} eq "dougm"));
-
-skip_test unless have_module "Apache::Cookie";
-skip_test unless have_module "CGI::Cookie";
-
-unless (Apache::src->mmn_eq) {
- skip_test if not $Is_dougm;
-}
-
-my $ua = LWP::UserAgent->new;
-
-my $cookie = "one=bar-one&a; two=bar-two&b; three=bar-three&c";
-my $url = "http://$net::httpserver$net::perldir/request-cookie.pl";
-my $request = HTTP::Request->new('GET', $url);
-$request->header(Cookie => $cookie);
-my $response = $ua->request($request, undef, undef);
-
-print $response->content;
-
diff --git a/tags/v1_29/t/modules/embperl.t b/tags/v1_29/t/modules/embperl.t
deleted file mode 100644
index b6f314f..0000000
--- a/tags/v1_29/t/modules/embperl.t
+++ /dev/null
@@ -1,13 +0,0 @@
-use Apache::src ();
-use Apache::testold;
-
-skip_test unless have_module "HTML::Embperl";
-
-unless (Apache::src->mmn_eq) {
- skip_test;
-}
-
-print "1..1\n";
-
-my $res = simple_fetch "/lists.ehtml";
-test 1, $res;
diff --git a/tags/v1_29/t/modules/eperl.t b/tags/v1_29/t/modules/eperl.t
deleted file mode 100644
index 943ba4e..0000000
--- a/tags/v1_29/t/modules/eperl.t
+++ /dev/null
@@ -1,9 +0,0 @@
-
-use Apache::testold;
-
-skip_test unless have_module "Parse::ePerl";
-
-print "1..1\n";
-
-test 1, simple_fetch "/env.iphtml";
-
diff --git a/tags/v1_29/t/modules/file.t b/tags/v1_29/t/modules/file.t
deleted file mode 100644
index 3f47e38..0000000
--- a/tags/v1_29/t/modules/file.t
+++ /dev/null
@@ -1,5 +0,0 @@
-
-use Apache::testold;
-skip_test unless have_module "Apache::File";
-print fetch "http://$net::httpserver$net::perldir/file.pl";
-
diff --git a/tags/v1_29/t/modules/httpdconf.t b/tags/v1_29/t/modules/httpdconf.t
deleted file mode 100644
index bc03057..0000000
--- a/tags/v1_29/t/modules/httpdconf.t
+++ /dev/null
@@ -1,28 +0,0 @@
-
-use Apache::testold;
-
-$^W=0;
-
-my $i = 0;
-
-print "1..5\n";
-
-use Apache::httpd_conf ();
-
-mkdir httpd_conf => 0755;
-
-my $conf = Apache::httpd_conf->new(base => "httpd_conf");
-$conf->write(Port => 8888);
-
-
-test ++$i, $conf->Port == 8888;
-
-for (qw(conf/httpd.conf)) {
- test ++$i, -e "httpd_conf/$_";
-}
-
-for (qw(DocumentRoot ErrorLog Port)) {
- print "$_ = ", $conf->$_(), "\n";
- test ++$i, $conf->$_();
-}
-
diff --git a/tags/v1_29/t/modules/include.t b/tags/v1_29/t/modules/include.t
deleted file mode 100644
index 99a18e3..0000000
--- a/tags/v1_29/t/modules/include.t
+++ /dev/null
@@ -1,6 +0,0 @@
-
-use Apache::testold;
-skip_test if $net::callback_hooks{USE_DSO};
-my $ua = LWP::UserAgent->new; # create a useragent to test
-
-print fetch($ua, "http://$net::httpserver$net::perldir/io/include.pl");
diff --git a/tags/v1_29/t/modules/log.t b/tags/v1_29/t/modules/log.t
deleted file mode 100644
index 6bbce9d..0000000
--- a/tags/v1_29/t/modules/log.t
+++ /dev/null
@@ -1,5 +0,0 @@
-
-use Apache::testold;
-
-print fetch "http://$net::httpserver$net::perldir/log.pl";
-
diff --git a/tags/v1_29/t/modules/module.t b/tags/v1_29/t/modules/module.t
deleted file mode 100644
index bf192e1..0000000
--- a/tags/v1_29/t/modules/module.t
+++ /dev/null
@@ -1,11 +0,0 @@
-use Apache::testold;
-use Apache::src ();
-
-skip_test unless have_module "Apache::Module";
-
-unless (Apache::src->mmn_eq) {
- skip_test;
-}
-
-print fetch "/perl/module.pl";
-
diff --git a/tags/v1_29/t/modules/perlrun.t b/tags/v1_29/t/modules/perlrun.t
deleted file mode 100644
index cd27db4..0000000
--- a/tags/v1_29/t/modules/perlrun.t
+++ /dev/null
@@ -1,6 +0,0 @@
-use Apache::testold;
-
-fetch "/dirty-perl/dirty-script.cgi";
-
-print fetch "/dirty-perl/dirty-test.cgi";
-
diff --git a/tags/v1_29/t/modules/perlrunxs.t b/tags/v1_29/t/modules/perlrunxs.t
deleted file mode 100644
index 916a057..0000000
--- a/tags/v1_29/t/modules/perlrunxs.t
+++ /dev/null
@@ -1,29 +0,0 @@
-use Apache::testold;
-
-skip_test if $] >= 5.005; #will fix later
-skip_test unless $net::callback_hooks{PERL_RUN_XS};
-
-#print fetch "/perl_xs/api.pl";
-
-$ENV{PERL_DIR} = "/perl_xs";
-
-my $dir = "";
-for (qw(.. .)) {
- $dir = $_;
- last if -d "$dir/internal";
-}
-
-my $i = 0;
-my @internal = map { "$dir/internal/$_" }
-qw(api.t http-get.t http-post.t table.t);
-my $tests = @internal;
-print "1..$tests\n";
-
-for (@internal) {
- my($max, $failed) = run_test($_, 1);
- test ++$i, not @$failed;
- if(@$failed) {
- print "Test $_ failed tests ", join(", ", @$failed), "\n";
- }
-}
-
diff --git a/tags/v1_29/t/modules/psections.t b/tags/v1_29/t/modules/psections.t
deleted file mode 100644
index a046904..0000000
--- a/tags/v1_29/t/modules/psections.t
+++ /dev/null
@@ -1,42 +0,0 @@
-
-use Apache::testold;
-
-skip_test unless have_module "Data::Dumper";
-skip_test unless have_module "Devel::Symdump";
-
-%Apache::ReadConfig:: = ();
-
-$^W=0;
-
-my $i = 0;
-
-print "1..2\n";
-
-require Apache::httpd_conf;
-
-require Apache::PerlSections;
-
-use IO::File ();
-
-my $file = "perlsections.pl";
-my $fh = IO::File->new(">$file") or die "can't open $file $!\n";
-
-$fh->print(Apache::PerlSections->dump);
-
-$fh->close;
-
-my $in = IO::File->new($file) or die "can't open $file $!\n";
-
-eval join '', <$in>;
-
-$in->close;
-
-test ++$i, not $@;
-
-die $@ if $@;
-
-test ++$i, -s $file;
-
-
-
-
diff --git a/tags/v1_29/t/modules/request.t b/tags/v1_29/t/modules/request.t
deleted file mode 100644
index ed8c94a..0000000
--- a/tags/v1_29/t/modules/request.t
+++ /dev/null
@@ -1,150 +0,0 @@
-use strict;
-use Apache::testold;
-use Apache::src ();
-use Cwd qw(fastcwd);
-
-my $Is_dougm = (defined($ENV{USER}) && ($ENV{USER} eq "dougm"));
-
-skip_test unless have_module "Apache::Request", '0.20';
-
-unless (Apache::src->mmn_eq) {
- skip_test if not $Is_dougm;
-}
-
-require HTTP::Request::Common;
-require CGI;
-
-$HTTP::Request::Common::VERSION ||= '1.00'; #-w
-unless ($CGI::VERSION >= 2.39 and
- $HTTP::Request::Common::VERSION >= 1.08) {
- print "CGI.pm: $CGI::VERSION\n";
- print "HTTP::Request::Common: $HTTP::Request::Common::VERSION\n";
- skip_test;
-}
-
-my $PWD = fastcwd;
-my @binary = "$PWD/docs/book.gif";
-
-my $test_pods = $ENV{UPLOAD_PODS} || ($Is_dougm ? 20 : 3);
-my $tests = 2;
-
-unless ($USE_SFIO) {
- $tests += ($test_pods * 2) + (@binary * 2);
-}
-
-print "1..$tests\n";
-my $i = 0;
-my $ua = LWP::UserAgent->new;
-
-use DirHandle ();
-
-for my $cv (\&post_test, \&get_test) {
- $cv->();
-}
-
-exit(0) if $USE_SFIO;
-
-if ($Is_dougm) {
- for (@binary) {
- upload_test($_);
- }
- #try various sizes
- my $dir = "";
- for my $path (@INC, $ENV{PERL_POD_LIB}) {
- last if -d ($dir = "$path/pod");
- }
- my $dh = DirHandle->new($dir) or die $!;
- my $num = $test_pods;
- for ($dh->read) {
- next unless /\.pod$/;
- last unless $num-- > 0;
- upload_test($_);
- }
-}
-else {
- for (qw(perlfunc.pod perlpod.pod perlxs.pod), @binary) {
- upload_test($_);
- }
-}
-
-sub post_test {
- my $enc = 'application/x-www-form-urlencoded';
- param_test(sub {
- my($url, $data) = @_;
- HTTP::Request::Common::POST($url,
- Content_Type => $enc,
- Content => $data,
- );
- });
-}
-
-sub get_test {
- my $enc = 'application/x-www-form-urlencoded';
-
- param_test(sub {
- my($url, $data) = @_;
- HTTP::Request::Common::GET("$url?$data");
- });
-}
-
-sub param_test {
- my $cv = shift;
- my $url = "http://$net::httpserver$net::perldir/request-param.pl";
- my $data =
- "ONE=ONE_value&TWO=TWO_value&" .
- "THREE=M1&THREE=M2&THREE=M3";
-
- my $response = $ua->request($cv->($url, $data));
-
- my $page = $response->content;
- print $response->as_string unless $response->is_success;
- my $expect = <<EOF;
-param ONE => ONE_value
-param TWO => TWO_value
-param THREE => M1,M2,M3
-EOF
- my $ok = $page eq $expect;
- test ++$i, $ok;
- print $response->as_string unless $ok;
-}
-
-sub upload_test {
- my $podfile = shift || "func";
- my $url = "http://$net::httpserver$net::perldir/request-upload.pl";
- my $file = "";
- if (-e $podfile) {
- $file = $podfile;
- }
- else {
- for my $path (@INC) {
- last if -e ($file = "$path/pod/$podfile");
- }
- }
-
- $file = $0 unless -e $file;
- my $lines = 0;
- local *FH;
- open FH, $file or die "open $file $!";
- binmode FH; #for win32
- ++$lines while defined <FH>;
- close FH;
- my(@headers);
- if ($Is_dougm) {
- my $dir = "$ENV{HOME}/public_html/tmp/uploads";
- mkdir $dir, 0755;
- push @headers, "X-Upload-Tmp" => $dir if -d $dir;
- }
- my $response = $ua->request(HTTP::Request::Common::POST($url,
- @headers,
- Content_Type => 'multipart/form-data',
- Content => [count => 'count lines',
- filename => [$file],
- ]));
-
- my $page = $response->content;
- print $response->as_string unless $response->is_success;
- test ++$i, ($page =~ m/Lines:\s+(\d+)/m);
- print "$file should have $lines lines (request-upload.pl says: $1)\n"
- unless $1 == $lines;
- test ++$i, $1 == $lines;
-}
diff --git a/tags/v1_29/t/modules/sandwich.t b/tags/v1_29/t/modules/sandwich.t
deleted file mode 100644
index b9af652..0000000
--- a/tags/v1_29/t/modules/sandwich.t
+++ /dev/null
@@ -1,11 +0,0 @@
-
-use Apache::testold;
-
-skip_test unless have_module "Apache::Sandwich";
-
-my $n = 0;
-
-print "1..1\n";
-
-test ++$n, simple_fetch "/subr/index.html";
-
diff --git a/tags/v1_29/t/modules/src.t b/tags/v1_29/t/modules/src.t
deleted file mode 100644
index 37c3d1a..0000000
--- a/tags/v1_29/t/modules/src.t
+++ /dev/null
@@ -1,37 +0,0 @@
-use ExtUtils::testlib;
-
-use Apache::testold;
-use Apache::src;
-
-my $i = 0;
-
-skip_test if (WIN32 and !Apache::src->mmn_eq);
-
-print "1..6\n";
-
-my $src = Apache::src->new;
-
-test ++$i, $src;
-
-print "dir=", $src->dir, "\n";
-test ++$i, -d $src->dir;
-
-print "main=", $src->main, "\n";
-test ++$i, -e join("/", $src->main, "httpd.h");
-
-my $mmn = $src->module_magic_number;
-print "module_magic_number = $mmn\n";
-test ++$i, $mmn;
-
-my $v = $src->httpd_version;
-print "httpd_version = $v\n";
-test ++$i, $v;
-
-print $src->inc, "\n";
-
-for (split /\s+/, $src->inc) {
- s/^-I//;
- -d $_ or die "can't stat $_ $!\n";
-}
-
-test ++$i, 1;
diff --git a/tags/v1_29/t/modules/ssi.test b/tags/v1_29/t/modules/ssi.test
deleted file mode 100644
index db6331e..0000000
--- a/tags/v1_29/t/modules/ssi.test
+++ /dev/null
@@ -1,26 +0,0 @@
-
-use Apache::testold;
-
-skip_test unless fetch("/perl/have_module.pl?mod_include.c");
-
-my $ua = LWP::UserAgent->new; # create a useragent to test
-
-my $plan = fetch($ua, "http://$net::httpserver/rgy-include.shtml");
-
-# make sure that planning header is correct
-# under DSO #perl directive is not available in mod_include
-if ($plan =~ /^1/) {
- print $plan;
-}
-else {
- skip_test;
-}
-
-my $c = fetch($ua, "http://$net::httpserver/content.shtml");
-
-unless ($c eq "OK") {
- print "not ";
-}
-
-print "ok 3\n";
-
diff --git a/tags/v1_29/t/modules/stage.t b/tags/v1_29/t/modules/stage.t
deleted file mode 100644
index 120af1d..0000000
--- a/tags/v1_29/t/modules/stage.t
+++ /dev/null
@@ -1,9 +0,0 @@
-
-use Apache::testold;
-
-skip_test unless have_module "Apache::Stage";
-
-print "1..2\n";
-
-test 1, simple_fetch "/STAGE/u1/test.html";
-test 2, not simple_fetch "/STAGE/u1/nochance.html";
diff --git a/tags/v1_29/t/modules/status.t b/tags/v1_29/t/modules/status.t
deleted file mode 100644
index 472fab6..0000000
--- a/tags/v1_29/t/modules/status.t
+++ /dev/null
@@ -1,33 +0,0 @@
-use Apache::testold;
-
-my @tests = qw{
- script
- inc
- rgysubs
- env
- myconfig
- hooks
-};
-
-push @tests, qw{
- inh_tree
- isa_tree
- symdump
-} if have_module "Devel::Symdump";
-
-my $url = "/perl/perl-status";
-
-my $tests = @tests+1;
-print "1..$tests\n";
-my $i = 0;
-
-for my $loc ($url, (map "$url?$_", @tests)) {
- my $str = fetch $loc;
- print "fetch $loc\n";
- unless($str =~ /Perl version/) {
- print $str;
- die "fetch $loc failed!\n";
- }
- die "$1\n" if $str =~ /(Internal Server Error)/;
- test ++$i, 1;
-}
diff --git a/tags/v1_29/t/modules/symbol.t b/tags/v1_29/t/modules/symbol.t
deleted file mode 100644
index 2305f04..0000000
--- a/tags/v1_29/t/modules/symbol.t
+++ /dev/null
@@ -1,12 +0,0 @@
-
-use Apache::testold;
-
-skip_test unless have_module "Devel::Symdump";
-
-#there should _not_ be "Subroutine defined ..." warnings!
-
-for (1,2) {
- print fetch "/perl/sym.pl?$_";
-}
-
-
diff --git a/tags/v1_29/t/modules/uri.t b/tags/v1_29/t/modules/uri.t
deleted file mode 100644
index cd76c0b..0000000
--- a/tags/v1_29/t/modules/uri.t
+++ /dev/null
@@ -1,5 +0,0 @@
-
-use Apache::testold;
-
-print fetch "http://$net::httpserver$net::perldir/uri.pl";
-
diff --git a/tags/v1_29/t/modules/util.t b/tags/v1_29/t/modules/util.t
deleted file mode 100644
index 535275a..0000000
--- a/tags/v1_29/t/modules/util.t
+++ /dev/null
@@ -1,5 +0,0 @@
-
-use Apache::testold;
-
-print fetch "http://$net::httpserver$net::perldir/util.pl";
-
diff --git a/tags/v1_29/t/net/.cvsignore b/tags/v1_29/t/net/.cvsignore
deleted file mode 100644
index e11a863..0000000
--- a/tags/v1_29/t/net/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-config.pl
diff --git a/tags/v1_29/t/net/config.pl.dist b/tags/v1_29/t/net/config.pl.dist
deleted file mode 100644
index 8b7d6ca..0000000
--- a/tags/v1_29/t/net/config.pl.dist
+++ /dev/null
@@ -1,33 +0,0 @@
-package net;
-
-BEGIN {
- for( qw(HTTP_PROXY http_proxy) ) {
- delete $ENV{$_};
- }
-}
-
-$Is_Win32 = ($^O eq "MSWin32");
-
-# Configure these for your local system
-$httpserver = "localhost:8529";
-$perldir = "/perl";
-#######################################
-%callback_hooks = ();
-
-{
- package main;
-
- # avoid -w warnings
- sub dummy_sub {
- return($net::httpserver,
- $net::perldir,
- $net::Is_Win32,
- %net::callback_hooks,
- );
- }
-}
-
-1;
-
-
-
diff --git a/tags/v1_29/t/net/perl/.cvsignore b/tags/v1_29/t/net/perl/.cvsignore
deleted file mode 100644
index 26327e1..0000000
--- a/tags/v1_29/t/net/perl/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-cgi.pl
diff --git a/tags/v1_29/t/net/perl/action.pl b/tags/v1_29/t/net/perl/action.pl
deleted file mode 100755
index df512c8..0000000
--- a/tags/v1_29/t/net/perl/action.pl
+++ /dev/null
@@ -1,6 +0,0 @@
-#!perl
-my $r = Apache->request;
-$r->content_type("text/plain");
-$r->send_http_header;
-
-$r->print("OK ", $r->path_info);
diff --git a/tags/v1_29/t/net/perl/api.pl b/tags/v1_29/t/net/perl/api.pl
deleted file mode 100755
index bb8837e..0000000
--- a/tags/v1_29/t/net/perl/api.pl
+++ /dev/null
@@ -1,320 +0,0 @@
-#!perl
-use Apache ();
-use Apache::Constants qw(:server :common :methods);
-use Apache::testold;
-use strict;
-
-Apache->register_cleanup(sub {0});
-my $r;
-
-if(Apache->module("Apache::Request")) {
- $r = Apache::Request->new(shift);
-}
-else {
- $r = Apache->request;
-}
-
-
-my $is_xs = ($r->uri =~ /_xs/);
-
-my $tests = 81;
-my $is_win32 = WIN32;
-$tests += 4 unless $is_win32;
-my $test_get_set = Apache->can('set_handlers') && ($tests += 4);
-my $test_custom_response = (MODULE_MAGIC_NUMBER >= 19980324) && ($tests += 4);
-my $test_dir_config = $INC{'Apache/TestDirectives.pm'} && ($tests += 9);
-
-my $i;
-
-$r->content_type("text/plain");
-$r->content_languages([qw(en)]);
-$r->no_cache(1);
-$r->send_http_header;
-
-$r->print("1..$tests\n");
-
-test ++$i, $ENV{MOD_PERL};
-print "ENV{MOD_PERL} = $ENV{MOD_PERL}\n";
-
-#backward compat
-%ENV = $r->cgi_env;
-my $envk = keys %ENV;
-#print "cgi_env ($envk):\n";
-#print map { "$_ = $ENV{$_}\n" } keys %ENV;
-
-$r->subprocess_env; #test void context
-$envk = keys %ENV;
-#print "subprocess_env ($envk):\n";
-#print map { "$_ = $ENV{$_}\n" } keys %ENV;
-
-test ++$i, $r->as_string;
-print $r->as_string;
-print "r == $r\n";
-test ++$i, $r->filename eq $0;
-test ++$i, -d $Apache::Server::CWD;
-print "\$Apache::Server::CWD == $Apache::Server::CWD\n";
-print "\$0 == $0\n";
-
-if($Apache::Server::Starting) {
- warn "Apache::ServerStarting var is broken\n";
-}
-if($Apache::Server::ReStarting) {
- warn "Apache::ReServerStarting var is broken\n";
-}
-
-unless ($is_win32) {
- my $ft_s = -s $INC{'Apache.pm'};
- $r->finfo;
- my $ft_def = -s _;
- print "Apache.pm == $ft_s, $0 == $ft_def\n";
- test ++$i, $ft_s != $ft_def;
- test ++$i, (-s $r->finfo) == $ft_def;
- test ++$i, -T $r->finfo;
- test ++$i, not -B $r->finfo;
-}
-
-my $the_request = $r->the_request;
-my $request_string = $r->method . ' ' .
- $r->uri . '?' .
- $r->args . ' ' .
- $r->protocol;
-$r->the_request($request_string);
-test ++$i, $the_request eq $r->the_request;
-printf "old=$the_request, new=%s\n", $r->the_request;
-$r->the_request(undef);
-test ++$i, not $r->the_request;
-test ++$i, not defined $r->the_request;
-
-my $doc_root = $r->document_root;
-$r->document_root('/tmp');
-test ++$i, $r->document_root eq '/tmp';
-$r->document_root($doc_root);
-test ++$i, $r->document_root eq $doc_root;
-
-my $loc = $r->location;
-print "<Location $loc>\n";
-test ++$i, $loc and $r->uri =~ m:^$loc:;
-
-test ++$i, $r->get_remote_host;
-test ++$i, $r->get_server_port;
-
-test ++$i, SERVER_VERSION =~ /mod_perl/;
-
-test ++$i, $r->last;
-test ++$i, $ENV{GATEWAY_INTERFACE};
-test ++$i, defined $ENV{KeyForPerlSetEnv};
-test ++$i, scalar $r->cgi_var('GATEWAY_INTERFACE');
-test ++$i, defined($r->seqno);
-test ++$i, $r->protocol;
-#hostname
-test ++$i, $r->status;
-test ++$i, $r->status_line;
-test ++$i, $r->method eq "GET";
-#test ++$i, $r->method_number
-
-# args
-test ++$i, $r->args eq 'arg1=one&arg2=two';
-$r->args('foo=bar');
-test ++$i, $r->args eq 'foo=bar';
-$r->args(undef);
-test ++$i, not $r->args;
-test ++$i, not defined $r->args;
-
-$r->subprocess_env(SetKey => 'value');
-test ++$i, $r->subprocess_env('SetKey') eq 'value';
-my(%headers_in) = $r->headers_in;
-test ++$i, keys %headers_in;
-test ++$i, $r->header_in('UserAgent') || $r->header_in('User-Agent');
-$r->header_in('X-Hello' => "goodbye");
-test ++$i, $r->header_in("X-Hello") eq "goodbye";
-
-$r->header_out('X-Camel-Message' => "I can fly");
-test ++$i, $r->header_out("X-Camel-Message") eq "I can fly";
-my(%headers_out) = $r->headers_out;
-test ++$i, keys %headers_out;
-
-my(%err_headers_out) = $r->headers_out;
-test ++$i, keys %err_headers_out;
-#test ++$i, $r->err_header_out("Content-Type");
-$r->err_header_out('X-Die' => "uhoh");
-test ++$i, $r->err_header_out("X-Die") eq "uhoh";
-
-for (1..3) {
- test ++$i, not $r->pnotes("NO_CHANCE");
- $r->pnotes(KEY => [qw(one two)]);
- my $val = $r->pnotes('KEY');
- test ++$i, $val && (ref($val) eq 'ARRAY');
- $val = $r->pnotes;
- test ++$i, $val && (ref($val) eq 'HASH');
- while(my($kk,$vv) = each %$val) {
- test ++$i, $kk && $vv;
- }
-# use Data::Dumper;
-# print Dumper $val;
-}
-
-$r->notes("FOO", 1);
-$r->notes("ANoteKey", "TRUE");
-test ++$i, $r->notes("ANoteKey");
-test ++$i, $r->content_type;
-test ++$i, $r->handler;
-
-$r->header_out(ByeBye => "TRUE");
-test ++$i, $r->header_out("ByeBye");
-$r->header_out(ByeBye => undef);
-test ++$i, not $r->header_out("ByeBye");
-
-#content_encoding
-test ++$i, $r->content_languages;
-#no_cache
-test ++$i, $r->uri;
-test ++$i, $r->filename;
-#test ++$i, $r->path_info;
-#test ++$i, $r->query_string;
-
-#just make sure we can actually call these
-test ++$i, $r->satisfies || 1;
-test ++$i, $r->some_auth_required || 1;
-
-$r->allowed(1 << M_GET);
-test ++$i, $r->allowed & (1 << M_GET);
-test ++$i, ! ($r->allowed & (1 << M_PUT));
-$r->allowed($r->allowed | (1 << M_PUT));
-test ++$i, $r->allowed & (1 << M_PUT);
-
-#dir_config
-
-my $c = $r->connection;
-test ++$i, $c;
-test ++$i, $c->remote_ip;
-test ++$i, $c->remote_addr;
-test ++$i, $c->local_addr;
-
-#Connection::remote_host
-#Connection::remote_logname
-#Connection::user
-#Connection::auth_type
-
-test ++$i, $r->server_root_relative;
-
-my $s = $r->server;
-test ++$i, $s;
-test ++$i, $s->server_admin;
-test ++$i, $s->server_hostname;
-test ++$i, $s->port;
-my $port = $s->port;
-for (32768, 65535) {
- $s->port($_);
- test ++$i, $s->port; # == $_;
-}
-$s->port($port);
-test ++$i, $s->port == $port;
-
-test ++$i, $s->timeout;
-
-for (my $srv = $r->server; $srv; $srv = $srv->next) {
- my $name = $srv->server_hostname;
-}
-
-++$i;
-my $str = "ok $i\n";
-$r->print(\$str);
-
-test ++$i, $r->define("FOO") || 1; #just make sure we can call it
-for (qw(TEST NOCHANCE)) {
- if(Apache->define($_)) {
- print "IfDefine $_\n";
- }
-}
-test ++$i, $r->module("Apache");
-test ++$i, not Apache->module("Not::A::Chance");
-test ++$i, Apache->module("Apache::Constants");
-test ++$i, not Apache->module("mod_nochance.c");
-test ++$i, Apache->module("mod_perl.c");
-
-#just make sure we can call this one
-if($test_custom_response) {
- test ++$i, $r->custom_response(403, "no chance") || 1;
- test ++$i, $r->custom_response(403) =~ /chance/;
- test ++$i, $r->custom_response(403, undef) || 1;
- test ++$i, not defined $r->custom_response(403);
-}
-
-if($test_get_set) {
- $r->set_handlers(PerlLogHandler => ['My::Logger']);
- my $handlers = $r->get_handlers('PerlLogHandler');
- test ++$i, @$handlers >= 1;
- $r->set_handlers(PerlLogHandler => undef);
- $handlers = $r->get_handlers('PerlLogHandler');
- test ++$i, @$handlers == 0;
- $handlers = $r->get_handlers('PerlHandler');
- test ++$i, @$handlers == 1;
- $r->set_handlers('PerlHandler', $handlers);
-
- $r->set_handlers(PerlTransHandler => DONE); #make sure a per-server config thing works
- $handlers = $r->get_handlers('PerlTransHandler');
- test ++$i, @$handlers == 0;
-}
-
-if($test_dir_config) {
- require Data::Dumper;
- require Apache::ModuleConfig;
- my $dc = Apache::ModuleConfig->get($r);
- test ++$i, not $dc;
-
- {
- package Apache::TestDirectives;
- use Apache::testold 'test';
- my $scfg = Apache::ModuleConfig->get($r->server);
- test ++$i, $scfg;
- test ++$i, __PACKAGE__->isa($scfg->{ServerClass});
- print Data::Dumper::Dumper($scfg);
- }
- for my $cv (
- sub {
- package Apache::TestDirectives;
- Apache::ModuleConfig->get(Apache->request);
- },
- sub {
- Apache::ModuleConfig->get($r, "Apache::TestDirectives");
- })
- {
- my $cfg = $cv->();
- $r->print(Data::Dumper::Dumper($cfg));
- test ++$i, "$cfg" =~ /HASH/;
- test ++$i, keys(%$cfg) >= 3;
- test ++$i, $cfg->{FromNew};
- unless ($cfg->{SetFromScript}) {
- $cfg->{SetFromScript} = [$0,$$];
- }
- }
-}
-
-@My::Req::ISA = qw(Apache);
-
-my $hr = bless {
- _r => $r,
-}, "My::Req";
-
-test ++$i, $hr->filename;
-delete $hr->{_r};
-my $uri;
-
-eval {
- $uri = $hr->uri;
-};
-test ++$i, not $uri;
-print $@ if $@;
-
-use Apache::testold qw($USE_THREAD);
-if ($USE_THREAD) {
- #under Solaris at least, according to Brian P Millett <bpm@ec-group.com>
- warn "XXX: need to fix \$r->exit in t/net/api w/ threads\n";
-}
-else {
- $r->exit unless $is_xs;
-}
-
-
-
-
diff --git a/tags/v1_29/t/net/perl/cgi.pl.PL b/tags/v1_29/t/net/perl/cgi.pl.PL
deleted file mode 100644
index 5d4f808..0000000
--- a/tags/v1_29/t/net/perl/cgi.pl.PL
+++ /dev/null
@@ -1,23 +0,0 @@
-#!perl
-use CGI ();
-use strict;
-
-my $r = CGI->new;
-
-#warn "Running cgi.pl with $CGI::VERSION";
-
-my($param) = $r->param('PARAM');
-my($httpupload) = $r->param('HTTPUPLOAD');
-
-$r->print( $r->header(-type => "text/plain",
- "-X-Perl-Script" => "cgi.pl") );
-$r->print( "ok $param\n" ) if $param;
-
-my($content);
-if ($httpupload) {
- no strict;
- local $/;
- $content = <$httpupload>;
- $r->print( "ok $content\n" );
- close $httpupload; # needed on win32?
-}
diff --git a/tags/v1_29/t/net/perl/constants.pl b/tags/v1_29/t/net/perl/constants.pl
deleted file mode 100755
index 2a62978..0000000
--- a/tags/v1_29/t/net/perl/constants.pl
+++ /dev/null
@@ -1,82 +0,0 @@
-#!perl
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
-
-######################### We start with some black magic to print on failure.
-
-# Change 1..1 below to 1..last_test_to_print .
-# (It may become useful if the test is moved to ./t subdirectory.)
-
-eval { require Apache::Constants::Exports };
-Apache::Constants->export(qw(HTTP_MULTIPLE_CHOICES));
-use Apache::Constants qw(MODULE_MAGIC_NUMBER);
-use strict qw(vars);
-shift->send_http_header("text/plain");
-
-my $version = SERVER_VERSION;
-
-if($version =~ /1\.1\.\d/) {
- print "1..1\nok 1\n";
- print "skipping tests against $version\n";
- die "";
-}
-
-my(%SEEN, @export, $key, $val);
-while(($key,$val) = each %Apache::Constants::EXPORT_TAGS) {
- #warn "importing tag $key\n";
- Apache::Constants->import(":$key");
- push @export, grep {!$SEEN{$_}++} @$val;
-}
-
-push @export, grep {!$SEEN{$_}++} @Apache::Constants::EXPORT;
-for my $sym (@Apache::Constants::EXPORT_OK) {
- next if $SEEN{$sym}++;
- Apache::Constants->import($sym) unless defined &$sym;
-}
-
-#skip some 1.3 stuff that 1.2 didn't have
-my %skip = map { $_,1 } qw(DONE REMOTE_DOUBLE_REV DECLINE_CMD DIR_MAGIC_TYPE
- SERVER_VERSION SERVER_SUBVERSION SERVER_BUILT);
-
-#if(MODULE_MAGIC_NUMBER < 19981108) {
-if(1) {
- for(qw(M_PATCH M_PROPFIND M_PROPPATCH M_MKCOL M_COPY
- M_MOVE M_LOCK M_UNLOCK))
- {
- $skip{$_}++;
- }
-}
-
-my $tests = (1 + @export) - keys %skip;
-$tests += 1; #extras
-
-print "1..$tests\n";
-#$loaded = 1;
-print "ok 1\n";
-my $ix = 2;
-
-my($sym);
-
-
-for $sym (sort @export) {
- next if $skip{$sym};
- my $val = &$sym;
- my $name = "";
- eval {
- $name = Apache::Constants->name($val);
- };
- print defined $val ? "" : "not ", "ok $ix #($name|$sym: $val)\n";
- $ix++;
- last if $ix >= $tests;
-}
-
-my $added = HTTP_MULTIPLE_CHOICES();
-print defined $added ? "" : "not ", "ok $ix\n";
-
-######################### End of black magic.
-
-# Insert your test code below (better if it prints "ok 13"
-# (correspondingly "not ok 13") depending on the success of chunk 13
-# of the test code):
-
-
diff --git a/tags/v1_29/t/net/perl/dirty-lib b/tags/v1_29/t/net/perl/dirty-lib
deleted file mode 100755
index 5536be2..0000000
--- a/tags/v1_29/t/net/perl/dirty-lib
+++ /dev/null
@@ -1,5 +0,0 @@
-sub not_ina_package {
- 1;
-}
-
-1;
diff --git a/tags/v1_29/t/net/perl/dirty-script.cgi b/tags/v1_29/t/net/perl/dirty-script.cgi
deleted file mode 100755
index ab49cfb..0000000
--- a/tags/v1_29/t/net/perl/dirty-script.cgi
+++ /dev/null
@@ -1,33 +0,0 @@
-#!perl
-local $^W = 0;
-unshift @INC,
- -e "dirty-lib" ? '.' :
- Apache->server_root_relative("net/perl");
-require "dirty-lib";
-shift @INC;
-
-unless (defined(¬_ina_package) && not_ina_package()) {
- die "%INC save/restore broken";
-}
-
-print "Content-type: text/plain\n\n";
-
-open FH, $0 or die $!;
-
-sub subroutine {}
-*code_alias = \&Outside::code;
-*hash_alias = \%Outside::hash;
-*array_alias = \@Outside::array;
-*scalar_alias = \$Outside::scalar;
-
-push @array, 1;
-
-$scalar++;
-
-$hash{key}++;
-
-print __PACKAGE__, " is dirty";
-
-exit;
-
-__END__
diff --git a/tags/v1_29/t/net/perl/dirty-test.cgi b/tags/v1_29/t/net/perl/dirty-test.cgi
deleted file mode 100755
index 74f9bad..0000000
--- a/tags/v1_29/t/net/perl/dirty-test.cgi
+++ /dev/null
@@ -1,32 +0,0 @@
-#!perl
-
-unshift @INC,
- -e "dirty-lib" ? '.' :
- Apache->server_root_relative("net/perl");
-require "dirty-lib";
-shift @INC;
-
-unless (defined(¬_ina_package) && not_ina_package()) {
- die "%INC save/restore broken";
-}
-
-package Apache::ROOT::dirty_2dperl::dirty_2dscript_2ecgi;
-
-use Apache::testold qw(test);
-
-print "Content-type: text/plain\n\n";
-
-print "1..9\n";
-
-my $i = 0;
-
-test ++$i, not defined &subroutine;
-test ++$i, not @array;
-test ++$i, not %hash;
-test ++$i, not defined $scalar;
-test ++$i, not defined fileno(FH);
-test ++$i, Outside::code() == 4;
-test ++$i, keys %Outside::hash == 1;
-test ++$i, @Outside::array == 1;
-test ++$i, $Outside::scalar eq 'one';
-
diff --git a/tags/v1_29/t/net/perl/echo b/tags/v1_29/t/net/perl/echo
deleted file mode 100755
index 37f88d1..0000000
--- a/tags/v1_29/t/net/perl/echo
+++ /dev/null
@@ -1,8 +0,0 @@
-#!perl
-my $r = Apache->request;
-$r->content_type("text/plain");
-$r->send_http_header;
-
-my $s = $r->args;
-
-$r->print($s);
diff --git a/tags/v1_29/t/net/perl/file.pl b/tags/v1_29/t/net/perl/file.pl
deleted file mode 100755
index aabf46c..0000000
--- a/tags/v1_29/t/net/perl/file.pl
+++ /dev/null
@@ -1,34 +0,0 @@
-#!perl
-use strict;
-use Apache::testold;
-
-my $r = shift;
-$r->send_http_header('text/plain');
-
-unless(have_module "Apache::File") {
- print "1..0\n";
- return;
-}
-
-# untaint $ENV{PATH}
-$ENV{'PATH'} = '/bin:/usr/bin';
-require Apache::File;
-
-print "1..6\n";
-my $fh = Apache::File->new;
-my $i = 0;
-test ++$i, $fh;
-test ++$i, $fh->open($r->filename);
-test ++$i, !$fh->open($r->filename.".nochance");
-test ++$i, !Apache::File->new($r->filename.".yeahright");
-#my $tmp = Apache::File->tmp;
-#test ++$i, $tmp;
-#++$i;
-#print $tmp "ok $i\n";
-#seek $tmp, 0, 0;
-#print scalar(<$tmp>);
-test ++$i, Apache::File->tmpfile;
-
-$r->update_mtime;
-test ++$i, $r->mtime;
-print scalar localtime $r->mtime;
diff --git a/tags/v1_29/t/net/perl/file_upload.cgi b/tags/v1_29/t/net/perl/file_upload.cgi
deleted file mode 100755
index 38e9305..0000000
--- a/tags/v1_29/t/net/perl/file_upload.cgi
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/local/bin/perl
-
-use CGI qw(:standard);
-use CGI::Carp qw/fatalsToBrowser/;
-
-print header();
-print start_html("File Upload Example");
-print strong("Version "),$CGI::VERSION,p;
-
-print h1("File Upload Example"),
- 'This example demonstrates how to prompt the remote user to
- select a remote file for uploading. ',
- strong("This feature only works with Netscape 2.0 browsers."),
- p,
- 'Select the ',cite('browser'),' button to choose a text file
- to upload. When you press the submit button, this script
- will count the number of lines, words, and characters in
- the file.';
-
-@types = ('count lines','count words','count characters');
-
-# Start a multipart form.
-print start_multipart_form(),
- "Enter the file to process:",
- filefield('filename','',45),
- br,
- checkbox_group('count',\@types,\@types),
- p,
- reset,submit('submit','Process File'),
- endform;
-
-# Process the form if there is a file name entered
-if ($file = param('filename')) {
- $tmpfile=tmpFileName($file);
- $mimetype = uploadInfo($file)->{'Content-Type'};
- print hr(),
- h2($file),
- h3($tmpfile),
- h4("MIME Type:",em($mimetype));
-
- my($lines,$words,$characters,@words) = (0,0,0,0);
- while (<$file>) {
- $lines++;
- $words += @words=split(/\s+/);
- $characters += length($_);
- }
- close $file;
- grep($stats{$_}++,param('count'));
- if (%stats) {
- print strong("Lines: "),$lines,br if $stats{'count lines'};
- print strong("Words: "),$words,br if $stats{'count words'};
- print strong("Characters: "),$characters,br if $stats{'count characters'};
- } else {
- print strong("No statistics selected.");
- }
-}
-
-# print cite("URL parameters: "),url_param();
-
-print hr(),
- a({href=>"../cgi_docs.html"},"CGI documentation"),
- hr,
- address(
- a({href=>'/~lstein'},"Lincoln D. Stein")),
- br,
- 'Last modified July 17, 1996',
- end_html;
-
diff --git a/tags/v1_29/t/net/perl/have_module.pl b/tags/v1_29/t/net/perl/have_module.pl
deleted file mode 100755
index 33e9b1c..0000000
--- a/tags/v1_29/t/net/perl/have_module.pl
+++ /dev/null
@@ -1,8 +0,0 @@
-#!perl
-my $r = shift;
-$r->send_http_header('text/plain');
-my $module = $r->args;
-
-if (Apache->module($module)) {
- print "OK\n";
-}
diff --git a/tags/v1_29/t/net/perl/hooks.pl b/tags/v1_29/t/net/perl/hooks.pl
deleted file mode 100755
index d390e65..0000000
--- a/tags/v1_29/t/net/perl/hooks.pl
+++ /dev/null
@@ -1,89 +0,0 @@
-#!perl
-use Apache ();
-my $tests = 0;
-
-my $r = Apache->request;
-$r->content_type("text/html");
-$r->send_http_header;
-my $doc_root = $r->document_root;
-
-my $ht_access = "$doc_root/.htaccess";
-my $hooks_file = "$doc_root/hooks.txt";
-
-sub wipe_file {
- local *FH;
- open FH, ">$_[0]";
- print FH " ";
- close FH;
-}
-
-for ($ht_access, $hooks_file) {
- wipe_file($_);
-}
-
-local *FH;
-if(Apache::perl_hook("Authen")) {
- open FH, ">$ht_access";
- print FH <<EOF;
-AuthType Basic
-AuthName mod_perl_tests
-
-<Limit GET>
-require valid-user
-</Limit>
-
-EOF
- close FH;
-}
-
-
-my($hook, $package, $retval);
-
-#hmm, Cleanup doesn't seem to work in .htaccess with register_cleanup()
-for (qw(Access Authen Authz Fixup
- HeaderParser Init Log Type Trans)) {
- next unless Apache::perl_hook($_);
- $tests++;
- $retval = -1; #we want to decline Trans, but ok for Authen, etc.
- $hook = "Perl${_}Handler";
- $package = $hook; #"Apache::$hook";
- unless ($_ eq "Trans") { #must be in server configs
- $retval = 0;
- open FH, ">>$ht_access" or die "can't open $ht_access";
- print FH "$hook $package\n";
- close FH;
- }
-
- undef &{"$package\:\:handler"}; #avoid warnings
- eval <<"PACKAGE";
-package $package;
-
-sub $package\:\:handler {
- my(\$r) = \@_;
- return -1 unless \$r->is_main;
- open FH, ">>$hooks_file" or die "can't open $hooks_file";
- print FH "$hook ok\n";
- close FH;
- return $retval;
-}
-
-PACKAGE
-
- $r->print($@) if $@;
-}
-
-#if(Apache::perl_hook("Log") and Apache::perl_hook("Fixup")) {
-# undef &PerlLogHandler::handler;
-# @PerlLogHandler::ISA = qw(PerlFixupHandler);
-# $r->warn("PerlLogHandler isa PerlFixupHandler");
-#}
-
-if($My::config_is_perl) {
- $tests--;
- #warn "XXX: skipping hook test for <Perl> config of \$PerlTransHandler\n";
-}
-
-$r->print($tests);
-
-
-
diff --git a/tags/v1_29/t/net/perl/io/dir_config.pl b/tags/v1_29/t/net/perl/io/dir_config.pl
deleted file mode 100755
index cb91b9a..0000000
--- a/tags/v1_29/t/net/perl/io/dir_config.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-#!perl
-use strict;
-use Apache::testold;
-use Data::Dumper ();
-use Apache::ModuleConfig ();
-
-my $r = shift;
-my $i = 0;
-$r->send_http_header("text/plain");
-
-my $cfg = Apache::ModuleConfig->get($r, "Apache::TestDirectives");
-
-$r->print(Data::Dumper::Dumper($cfg));
-test ++$i, "$cfg" =~ /HASH/;
-test ++$i, keys(%$cfg) >= 3;
-test ++$i, $cfg->{FromNew};
-unless ($cfg->{SetFromScript}) {
- $cfg->{SetFromScript} = [$0,$$];
-}
-
-my $scfg = Apache::ModuleConfig->get($r->server, "Apache::TestDirectives");
-$r->print(Data::Dumper::Dumper($scfg));
diff --git a/tags/v1_29/t/net/perl/io/include.pl b/tags/v1_29/t/net/perl/io/include.pl
deleted file mode 100755
index 9fa4694..0000000
--- a/tags/v1_29/t/net/perl/io/include.pl
+++ /dev/null
@@ -1,11 +0,0 @@
-#!perl
-
-use Apache::Include ();
-print "Content-type: text/plain\n\n";
-
-print "1..4\n";
-print "ok 1\n";
-#Apache::Include->virtual("/perl/cgi.pl?PARAM=2");
-Apache::Include->virtual("/cgi-bin/cgi.pl?PARAM=2");
-print "ok 3\n";
-Apache::Include->virtual("/cgi-bin/cgi.pl?PARAM=4");
diff --git a/tags/v1_29/t/net/perl/io/perlio.pl b/tags/v1_29/t/net/perl/io/perlio.pl
deleted file mode 100755
index d78b361..0000000
--- a/tags/v1_29/t/net/perl/io/perlio.pl
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/user/local/bin/perl
-
-use Config;
-
-#we're in Apache::Registry
-#our perl is configured use sfio so we can
-#print() to STDOUT
-#and
-#read() from STDIN
-
-#we've also set (per-directory config):
-#PerlSendHeader On
-#PerlSetupEnv On
-
-my $r = shift;
-my $sub = "test_$ENV{QUERY_STRING}";
-if (defined &{$sub}) {
- &{$sub}($r);
-}
-else {
- print "Status: 200 Bottles of beer on the wall\n",
- "X-Perl-Version: $]\n";
- print "X-Perl-Script: perlio.pl\n";
- print "X-Message: hello\n";
- print "Content-type: text/plain\n\n";
-
- print "perlio test...\n";
- print "\$^X is $^X\n" if $^X;
-
- if($] >= 5.005 && $Config{usesfio} ne "true") {
- my $msg = "1234WRITEmethod";
- syswrite STDOUT, $msg, 5, 4;
- print " to STDOUT works with $] without sfio\n";
- }
-
- my $loc = $r->location;
- print "<Location $loc>\n";
- my(@args);
-
- if (@args = split(/\+/, $ENV{QUERY_STRING})) {
- print "ARGS: ",
- join(", ", map { $_ = qq{"$_"} } @args), "\n\n";
- } else {
- print "No command line arguments passed to script\n\n";
- }
-
- my($key,$val);
- while (($key,$val) = each %ENV) {
- print "$key=$val\n";
- }
-
-
- if ($ENV{CONTENT_LENGTH}) {
- $len = $ENV{CONTENT_LENGTH};
- read(STDIN, $content, $len);
- print "\nContent\n-------\n$content";
- }
-}
-
-sub test_1 {
- print "Content-type: text/html\n",
- "X-sub: " . "test_1\n";
- print "\r\n";
- print "1";
-}
-
-sub test_2 {
- my $msg = <<"EOF";
-X-sub: test_2
-Content-type: text/html
-
-2
-EOF
- chomp $msg;
- print $msg;
-}
-
-sub test_3 {
- my $h = {
- "Content-type" => "text/plain",
- "X-sub" => "test_3",
- };
- for (keys %$h) {
- print "$_: $h->{$_}\r\n";
- }
- print "\r\n";
- print "3";
-}
-
-sub test_4 {
- my $h = {
- "Content-type" => "text/plain",
- "X-sub" => "test_4",
- };
- for (keys %$h) {
- print "$_", ": ", $h->{$_}, "\r\n";
-# print "$_", ": ", $h->{$_};
-# print "\r\n";
- }
- print "\r\n4";
-}
-
-sub test_5 {
- print <<EOF;
-X-Message: parsethis
-Content-type: text/html
-
-A
-B
-C
-D
-EOF
-
-}
-
-sub test_syswrite_1 {
- test_syswrite(shift);
-}
-
-sub test_syswrite_2 {
- test_syswrite(shift,160);
-}
-
-sub test_syswrite_3 {
- test_syswrite(shift,80, 2000);
-}
-
-sub test_syswrite {
- my $r = shift;
- my $len = shift;
- my $offset = shift;
- my $msg = "";
-
-# my $m = "ENTERING test_syswrite ";
-# $m .= "LEN = $len " if $len;
-# $m .= "OFF = $offset" if $offset;
-# print STDERR $m, "\n";
-
- print "Status: 200 Bottles of beer on the wall\n",
- "X-Perl-Version: $]\n";
- print "X-Perl-Script: perlio.pl\n";
- print "X-Message: hello\n";
- print "Content-type: text/plain\n\n";
-
- for ('A'..'Z') {
- $msg .= $_ x 80;
- }
- my $bytes_sent =
- defined($offset) ? syswrite STDOUT, $msg, $len, $offset :
- defined($len) ? syswrite STDOUT, $msg, $len :
- syswrite STDOUT, $msg, length($msg);
-
- my $real_b = $r->bytes_sent;
- print "REAL Bytes sent = $real_b\n";
- die "Syswrite error. Bytes wrote=$bytes_sent. Real bytes sent = $real_b\n"
- unless $bytes_sent == $real_b;
-}
-
-sub test_syswrite_noheader {
- print STDERR "********* This is not a real error. Ignore. *********\n";
- my $msg = "1234WRITEmethod";
- syswrite STDOUT, $msg, 5, 4;
-}
-
-
-
-
-
diff --git a/tags/v1_29/t/net/perl/io/redir.pl b/tags/v1_29/t/net/perl/io/redir.pl
deleted file mode 100755
index 7d8ecae..0000000
--- a/tags/v1_29/t/net/perl/io/redir.pl
+++ /dev/null
@@ -1,16 +0,0 @@
-#!perl
-#test internal redirects
-
-my %loc = (
- internal => "/test.html",
- remote => "http://perl.apache.org/",
- content => "/content.html",
-);
-
-my $ix = $ENV{QUERY_STRING} || "internal";
-
-print "Content-type: text/plain\n";
-print "Location: $loc{$ix}\n\n";
-
-print "shouldn't see this";
-
diff --git a/tags/v1_29/t/net/perl/io/redir1.pl b/tags/v1_29/t/net/perl/io/redir1.pl
deleted file mode 100755
index 7d96c25..0000000
--- a/tags/v1_29/t/net/perl/io/redir1.pl
+++ /dev/null
@@ -1,4 +0,0 @@
-#!perl
-use strict;
-my $r = shift;
-$r->internal_redirect('/perl/io/redir2.pl');
diff --git a/tags/v1_29/t/net/perl/io/redir2.pl b/tags/v1_29/t/net/perl/io/redir2.pl
deleted file mode 100755
index c20a442..0000000
--- a/tags/v1_29/t/net/perl/io/redir2.pl
+++ /dev/null
@@ -1,5 +0,0 @@
-#!perl
-use strict;
-my $r = shift;
-$r->send_http_header('text/plain');
-print "OK";
diff --git a/tags/v1_29/t/net/perl/io/ssi1.pl b/tags/v1_29/t/net/perl/io/ssi1.pl
deleted file mode 100755
index 47b5959..0000000
--- a/tags/v1_29/t/net/perl/io/ssi1.pl
+++ /dev/null
@@ -1,8 +0,0 @@
-#!perl
-sub SSI::one {
- print "Content-type: text/html\n\n";
-
- print "ok 1\n<br>";
-}
-
-SSI->one;
diff --git a/tags/v1_29/t/net/perl/io/ssi2.pl b/tags/v1_29/t/net/perl/io/ssi2.pl
deleted file mode 100755
index b5d2b14..0000000
--- a/tags/v1_29/t/net/perl/io/ssi2.pl
+++ /dev/null
@@ -1,8 +0,0 @@
-#!perl
-sub SSI::two {
- print "Content-type: text/html\n\n";
-
- print "ok 2\n<br>";
-}
-
-SSI->two;
diff --git a/tags/v1_29/t/net/perl/log.pl b/tags/v1_29/t/net/perl/log.pl
deleted file mode 100755
index 2922c9f..0000000
--- a/tags/v1_29/t/net/perl/log.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-#!perl
-use strict;
-use Apache::testold;
-my $i = 0;
-my $r = shift;
-$r->send_http_header("text/plain");
-
-eval {
- require Apache::Log;
-};
-if($@) {
- print "$@\n";
- print "1..0\n";
- return;
-}
-
-my $rlog = $r->log;
-my $slog = $r->server->log;
-my @methods = qw{
-emerg
-alert
-crit
-error
-warn
-notice
-info
-debug
-};
-my $tests = @methods * 2;
-$tests += 2;
-
-print "1..$tests\n";
-for my $method (@methods)
-{
- if(defined $ENV{USER} and $ENV{USER} eq "dougm") {
- $rlog->$method("Apache->method $method ", "OK");
- $slog->$method("Apache::Server->method $method ", "OK");
- }
- print "method $method OK\n";
- test ++$i, $rlog->can($method);
- test ++$i, $slog->can($method);
-}
-
-my $x = 0;
-$r->log->warn(sub { ++$x; "log __ANON__ OK" });
-test ++$i, $x;
-
-my $zero = 0;
-$r->log->debug(sub { ++$zero; "NOT OK" }); #LogLevel not set this high w/ 'make test'
-test ++$i, $zero == 0;
diff --git a/tags/v1_29/t/net/perl/module.pl b/tags/v1_29/t/net/perl/module.pl
deleted file mode 100755
index 112a3a1..0000000
--- a/tags/v1_29/t/net/perl/module.pl
+++ /dev/null
@@ -1,57 +0,0 @@
-#!perl
-use Apache::testold;
-
-my $r = shift;
-$r->send_http_header('text/plain');
-
-unless(have_module "Apache::Module", '0.10' and
- Apache->module('mod_include.c') and
- Apache->module('mod_access.c'))
-{
- print "1..0\n";
- return;
-}
-
-use strict;
-use Apache::Constants qw(:common :args_how);
-
-print "1..10\n";
-my $i = 0;
-my $top = Apache::Module->top_module;
-
-test ++$i, $top;
-
-my $h = $top->find("mod_perl");
-
-test ++$i, $h;
-
-test ++$i, $h->cmds->find("PerlTaintCheck")->errmsg =~ /-T switch/;
-
-test ++$i,
- $top->find("mod_include")->cmds->find("XBitHack")->args_how == TAKE1;
-
-my $rr = $r->lookup_uri("/perl/perl-status");
-
-test ++$i, $h->logger->($rr) == DECLINED;
-
-test ++$i, $top->find("mod_access")->access_checker->($rr) == OK;
-
-test ++$i, $top->find("http_core")->handlers->content_type;
-
-test ++$i, $top->find("http_core")->handlers->handler->($rr) == NOT_FOUND;
-
-$rr->filename($0);
-
-test ++$i, $top->find("http_core")->handlers->handler->($rr) == OK;
-
-$h = $top->find("no_chance");
-
-test ++$i, not $h;
-
-
-
-
-
-
-
-
diff --git a/tags/v1_29/t/net/perl/noenv/test.pl b/tags/v1_29/t/net/perl/noenv/test.pl
deleted file mode 100755
index 38d0749..0000000
--- a/tags/v1_29/t/net/perl/noenv/test.pl
+++ /dev/null
@@ -1,10 +0,0 @@
-#!perl
-shift->send_http_header("text/plain");
-
-unless($My::config_is_perl) {
- while (my($key,$val) = each %ENV) {
- print "$key=$val\n";
- }
-}
-
-print "TOTAL: ", scalar keys %ENV;
diff --git a/tags/v1_29/t/net/perl/qredirect.pl b/tags/v1_29/t/net/perl/qredirect.pl
deleted file mode 100755
index 0de6d19..0000000
--- a/tags/v1_29/t/net/perl/qredirect.pl
+++ /dev/null
@@ -1,13 +0,0 @@
-#!perl
-use CGI;
-use strict;
-my $q = new CGI;
-
-my $loc = $q->url . "/OK";
-
-if ($ENV{'PATH_INFO'}) {
- print $q->header, "OK";
-} else {
- print $q->redirect(-url => $loc);
-}
-
diff --git a/tags/v1_29/t/net/perl/raw.pl b/tags/v1_29/t/net/perl/raw.pl
deleted file mode 100755
index 7ded251..0000000
--- a/tags/v1_29/t/net/perl/raw.pl
+++ /dev/null
@@ -1,5 +0,0 @@
-#!perl
-
-print "HTTP/1.0 200 OK\n";
-print "Content-type: text/plain\n\n";
-print "OK";
diff --git a/tags/v1_29/t/net/perl/request-cookie.pl b/tags/v1_29/t/net/perl/request-cookie.pl
deleted file mode 100755
index c756b55..0000000
--- a/tags/v1_29/t/net/perl/request-cookie.pl
+++ /dev/null
@@ -1,177 +0,0 @@
-#!perl
-use strict;
-
-use Apache::testold;
-
-eval {
- require Apache::Request;
- require Apache::Cookie;
- require CGI::Cookie;
-};
-
-my $r = shift;
-$r->send_http_header('text/plain');
-
-unless (have_module "Apache::Cookie" and Apache::Request->can('upload')) {
- print "1..0\n";
- print $@ if $@;
- print "$INC{'Apache/Request.pm'}\n";
- return;
-}
-
-my $i = 0;
-my $tests = 33;
-$tests += 7 if $r->headers_in->get("Cookie");
-
-print "1..$tests\n";
-
-my $letter = 'a';
-for my $name (qw(one two three)) {
- my $c = Apache::Cookie->new($r,
- -name => $name,
- -value => ["bar_$name", $letter],
- -expires => '+3M',
- -path => '/'
- );
- my $cc = CGI::Cookie->new(
- -name => $name,
- -value => ["bar_$name", $letter],
- -expires => '+3M',
- -path => '/'
- );
- ++$letter;
- $c->bake;
-
- my $cgi_as_string = $cc->as_string;
- my $as_string = $c->as_string;
- my $header_out = ($r->err_headers_out->get("Set-Cookie"))[-1];
- my @val = $c->value;
- print "VALUE: @val\n";
- for my $v ("string", [@val]) {
- $c->value($v);
- my @arr = $c->value;
- my $n = @arr;
- if (ref $v) {
- test ++$i, $n == 2;
- }
- else {
- test ++$i, $n == 1;
- }
- print " VALUE: @arr ($n)\n";
- $c->value(\@val); #reset
- }
-
- for (1,0) {
- my $secure = $c->secure;
- $c->secure($_);
- print "secure: $secure\n";
- }
-
- print "as_string: `$as_string'\n";
- print "header_out: `$header_out'\n";
- print "cgi cookie: `$cgi_as_string\n";
- test ++$i, cookie_eq($as_string, $header_out);
- test ++$i, cookie_eq($as_string, $cgi_as_string);
-}
-
-my (@Hargs) = (
- "-name" => "key",
- "-values" => {qw(val two)},
- "-domain" => ".cp.net",
- );
-my (@Aargs) = (
- "-name" => "key",
- "-values" => [qw(val two)],
- "-domain" => ".cp.net",
- );
-my (@Sargs) = (
- "-name" => "key",
- "-values" => 'one',
- "-domain" => ".cp.net",
- );
-
-my $done_meth = 0;
-for my $rv (\@Hargs, \@Aargs, \@Sargs) {
- my $c1 = Apache::Cookie->new($r, @$rv);
- my $c2 = CGI::Cookie->new(@$rv);
-
- for ($c1, $c2) {
- $_->expires("+3h");
- }
-
- for my $meth (qw(as_string name domain path expires secure)) {
- my $one = $c1->$meth() || "";
- my $two = $c2->$meth() || "";
- print "Apache::Cookie: $meth => $one\n";
- print "CGI::Cookie: $meth => $two\n";
- test ++$i, cookie_eq($one, $two);
- }
-}
-
-if(my $string = $r->headers_in->get('Cookie')) {
- print $string, $/;
- my %done = ();
-
- print "SCALAR context (as_string method):\n";
-
- print " Apache::Cookie:\n";
- my $hv = Apache::Cookie->new($r)->parse($string);
- for (sort keys %$hv) {
- print " $_ => ", $hv->{$_}->as_string, $/;
- $done{$_} = $hv->{$_}->as_string;
- }
-
- print " CGI::Cookie:\n";
- $hv = CGI::Cookie->parse($string);
- for (sort keys %$hv) {
- print " $_ => ", $hv->{$_}->as_string, $/;
- test ++$i, cookie_eq($done{$_}, $hv->{$_}->as_string);
- }
-
- %done = ();
-
- print "ARRAY context (value method):\n";
- print " Apache::Cookie:\n";
- my %hv = Apache::Cookie->new($r)->parse($string);
- my %fetch = Apache::Cookie->fetch;
- test ++$i, keys %hv == keys %fetch;
-
- for (sort keys %hv) {
- $done{$_} = join ", ", $hv{$_}->value;
- print " $_ => $done{$_}\n";
- }
- print " CGI::Cookie:\n";
- %hv = CGI::Cookie->parse($string);
- for (sort keys %hv) {
- my $val = join ", ", $hv{$_}->value;
- test ++$i, cookie_eq($done{$_}, $val);
- print " $_ => $val\n";
- }
-}
-else {
- print "NO Cookie set";
-}
-
-{
- my $cgi_exp = CGI::expires('-1d', 'cookie');
- my $cookie_exp = Apache::Cookie->expires('-1d');
- print "cookie: $cookie_exp\ncgi: $cgi_exp\n";
- test ++$i, cookie_eq($cookie_exp, $cgi_exp);
-}
-{
- my $cgi_exp = CGI::expires('-1d', 'http');
- my $apr_exp = Apache::Request->expires('-1d');
- print "apr: $apr_exp\ncgi: $cgi_exp\n";
- test ++$i, cookie_eq($apr_exp, $cgi_exp);
-}
-
-test ++$i, 1;
-
-sub cookie_eq {
- my($one, $two) = @_;
- unless ($one eq $two) {
- print STDERR "cookie mismatch:\n",
- "`$one'\n", " vs.\n", "`$two'\n";
- }
- ($one && $two) || (!$one && !$two);
-}
diff --git a/tags/v1_29/t/net/perl/request-param.pl b/tags/v1_29/t/net/perl/request-param.pl
deleted file mode 100755
index cdc4001..0000000
--- a/tags/v1_29/t/net/perl/request-param.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-#!perl
-use strict;
-use Apache::testold;
-
-my $r = shift;
-$r->send_http_header('text/plain');
-
-eval {
- require Apache::Request;
-};
-
-unless (have_module "Apache::Request" and Apache::Request->can('upload')) {
- print "1..0\n";
- print $@ if $@;
- print "$INC{'Apache/Request.pm'}\n";
- return;
-}
-
-my $apr = Apache::Request->new($r);
-
-for ($apr->param) {
- my(@v) = $apr->param($_);
- print "param $_ => ", join ",", @v;
- print $/;
-}
-
diff --git a/tags/v1_29/t/net/perl/request-upload.pl b/tags/v1_29/t/net/perl/request-upload.pl
deleted file mode 100755
index 50839b9..0000000
--- a/tags/v1_29/t/net/perl/request-upload.pl
+++ /dev/null
@@ -1,110 +0,0 @@
-#!perl
-use strict;
-use Apache::testold;
-
-my $r = shift;
-$r->send_http_header('text/plain');
-
-eval {
- require Apache::Request;
-};
-
-unless (have_module "Apache::Request" and Apache::Request->can('upload')) {
- print "1..0\n";
- print $@ if $@;
- print "$INC{'Apache/Request.pm'}\n";
- return;
-}
-
-my $apr = Apache::Request->new($r);
-
-for ($apr->param) {
- my(@v) = $apr->param($_);
- print "param $_ => @v\n";
-}
-
-for (my $upload = $apr->upload; $upload; $upload = $upload->next) {
- my $fh = $upload->fh;
- my $filename = $upload->filename;
- my $name = $upload->name;
- my $type = $upload->type;
- next unless $filename;
-
- print "$name $filename ($type)";
- if ($fh and $name) {
- no strict;
- if (my $no = fileno($filename)) {
- print " fileno => $no";
- }
- }
- print "\n";
- close $fh;
-}
-
-my $first = $apr->upload->name;
-my $first_filename = $apr->upload->filename;
-my $first_fh = $apr->upload->fh;
-if ($first_fh) {
- while (<$first_fh>) { }
-}
-close $first_fh;
-
-for my $upload ($apr->upload) {
- my $fh = $upload->fh;
- my $filename = $upload->filename;
- my $name = $upload->name;
- next unless $filename;
-
- my($lines, $bytes);
- $lines = $bytes = 0;
-
- {
- no strict;
- if (fileno($filename)) {
- $fh = *$filename{IO};
- print "COMPAT: $fh\n";
- }
- }
- use File::Basename;
- local *OUT;
- if (my $dir = $apr->header_in("X-Upload-Tmp")) {
- if (-d $dir) {
- Apache->untaint($dir);
- my $file = basename $filename;
- open OUT, ">$dir/$file" or die $!;
- }
- }
- while(<$fh>) {
- ++$lines;
- $bytes += length;
- print OUT $_ if fileno OUT;
- }
- close OUT if fileno OUT;
- close $fh;
-
- my $info = $upload->info;
- while (my($k,$v) = each %$info) {
- print "INFO: $k => $v\n";
- }
- unless ($name eq $first) {
- print "-" x 40, $/;
- my $info = $apr->upload($first)->info;
- print "Lookup `$first':[$info]\n";
- while (my($k,$v) = each %$info) {
- print "INFO: $k => $v\n";
- }
- my $type = $apr->upload($first)->info("content-type");
- unless ($type) {
- die "upload->info is broken";
- }
- print "TYPE: $type\n";
- print "-" x 40, $/;
- }
- my $wanted = $upload->size;
- unless ($bytes == $wanted) {
- die "wanted $wanted bytes, got $bytes bytes";
- }
- print "Server: Lines: $lines\n";
- print "$filename bytes=$bytes,wanted=$wanted\n";
-}
-
diff --git a/tags/v1_29/t/net/perl/rwrite.pl b/tags/v1_29/t/net/perl/rwrite.pl
deleted file mode 100755
index 18c234b..0000000
--- a/tags/v1_29/t/net/perl/rwrite.pl
+++ /dev/null
@@ -1,15 +0,0 @@
-#!perl
-my $r = shift;
-$r->send_http_header("text/plain");
-
-use strict;
-my $string = "";
-
-for ('A'..'Z') {
- $string .= $_ x 1000;
-}
-
-print $string;
-
-print "\nlength=", length($string) if $r->args;
-
diff --git a/tags/v1_29/t/net/perl/server_error.pl b/tags/v1_29/t/net/perl/server_error.pl
deleted file mode 100755
index 1884763..0000000
--- a/tags/v1_29/t/net/perl/server_error.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-#!perl
-my $r = shift;
-
-$r->send_http_header("text/plain");
-
-my $err = $@{$r->prev->uri};
-
-my $note = $r->prev->notes('error-notes') || 'NONE';
-
-print "ServerError: $err\n";
-
-if ($note eq $err) {
- print "error-notes is also set";
-}
-else {
- print "error-notes is different: $note";
-}
-
-print "\n";
-print 'dump of %@:', "\n";
-print map { "$_ = $@{$_}\n" } keys %{'@'};
-
diff --git a/tags/v1_29/t/net/perl/ssi.pl b/tags/v1_29/t/net/perl/ssi.pl
deleted file mode 100755
index 0c4a072..0000000
--- a/tags/v1_29/t/net/perl/ssi.pl
+++ /dev/null
@@ -1,7 +0,0 @@
-#!perl
-my($r, @args) = @_;
-
-for (@args) {
- print "$_\n";
-}
-
diff --git a/tags/v1_29/t/net/perl/sym.pl b/tags/v1_29/t/net/perl/sym.pl
deleted file mode 100755
index c277801..0000000
--- a/tags/v1_29/t/net/perl/sym.pl
+++ /dev/null
@@ -1,38 +0,0 @@
-#!perl
-eval {
- require Apache::Symbol;
-};
-
-@ISA = qw(Apache::Symbol);
-
-sub shaken {1}
-
-sub sturred {0}
-
-shaken not sturred or die;
-
-sub satan () {666} #constant subs were a nightmare to quiet down!
-
-my $r = shift;
-my $num = $r->args;
-
-$r->send_http_header("text/plain");
-print "1..2\n" if $num == 1;
-print "ok $num\n";
-
-delete $Apache::Registry->{+__PACKAGE__};
-
-# XXX: in perl 5.8.0+ the above delete happens to nuke the XSUB
-# of the imported __PACKAGE__ .'::exit'; which affects all other
-# namespaces which refer to this function in the same process.
-# e.g. it breaks internal/http-get and internal/http-post
-# which fail to call exit(),
-# /perl/perl-status/Apache::ROOT::perl::test::exit/FUNCTION?noh_peek
-# reveals that the XSUB entry becomes 0x0 after running modules/symbol
-# the following hack fixes that problem, by forcing a reload of
-# Apache.pm
-{
- local $SIG{__WARN__} = sub { };
- delete $INC{'Apache.pm'};
- require Apache;
-}
diff --git a/tags/v1_29/t/net/perl/taint.pl b/tags/v1_29/t/net/perl/taint.pl
deleted file mode 100755
index 5f32cd9..0000000
--- a/tags/v1_29/t/net/perl/taint.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/local/bin/perl -w
-
-use Apache ();
-use strict;
-
-my $r = Apache->request;
-local $ENV{PATH} = "/bin";
-
-$r->content_type("text/plain");
-$r->send_http_header;
-
-#with perl 5.003_96 and hpux10.10, trapping an "...insecure dependency..."
-#more than once during the same perl_call_sv core dumps
-#we get by with one at a time for now.
-
-my $sub = $r->args;
-$sub =~ s/\W+//g;
-
-my $tests = {
- args => sub {
- eval { system $r->args };
- die "TaintCheck failed, I can `system \$r->args'" unless $@;
- #warn "TRAPPED: `system \$r->args' '$@'\n";
- },
- env => sub {
- eval { system $ENV{SERVER_SOFTWARE} };
- die "TaintCheck failed, I can `system $ENV{SERVER_SOFTWARE}'"
- unless $@;
- #warn "TRAPPED: `system \$ENV{SERVER_SOFTWARE}' '$@'\n";
- },
- header_in => sub {
- eval { system $r->header_in('User-Agent') };
- die "TaintCheck failed, I can `system \$r->header_in('User-Agent')'"
- unless $@;
- #warn "TRAPPED: `system \$r->header_in('User-Agent')' '$@'\n";
- },
- content => sub {
- my $content = $r->content;
-
- eval { system $content };
- die "TaintCheck failed, I can `system $content'" unless $@;
- #warn "TRAPPED: `system \$r->content' '$@'\n";
- },
-};
-
-&{ $tests->{$sub} };
-
-$r->print("OK");
-
-
-
-
-
-
diff --git a/tags/v1_29/t/net/perl/test b/tags/v1_29/t/net/perl/test
deleted file mode 100755
index 64f487c..0000000
--- a/tags/v1_29/t/net/perl/test
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/usr/local/bin/perl -Tw
-
-use Apache ();
-use strict;
-use vars qw($Scalar @Array %Hash); #for testing perl-status
-use vars qw($filename);
-use Config;
-use Apache::testold qw($USE_THREAD);
-
-not $filename or die "Apache::Registry scoping is broken!\n";
-
-#make sure this untrip works
-if($USE_THREAD) {
- warn "must fix \$/ for threaded Perl\n";
-}
-else {
- $/ eq "\n" or die "\$/ was not reset!\n";
- $/ = "";
-}
-
-@Array == 0 or die "END block was not run for $0\n";
-keys %Hash == 0 or die "__ANON__ registered cleanup failed!\n";
-if(defined $Scalar) {
- $Scalar == 0 or die "register_cleanup is broken!\n";
-}
-
-@Array = qw(one two three);
-%Hash = qw(one 1 two 2 three 3);
-$Scalar = 1;
-
-my $r = Apache->request;
-local $ENV{PATH} = "/bin";
-use vars qw($is_xs);
-$is_xs = ($r->uri =~ /_xs/);
-
-sub reset_scalar {
- $Scalar = 0;
- #print STDERR "registered cleanup, resetting \$Scalar\n";
- return 0;
-}
-
-$r->post_connection(sub {
- my $r = shift;
- unless(Apache::testold::WIN32()) { #XXX
- my $loc = $r->uri;
- $loc =~ /test/i or die "post_connection can't see \$r->uri! ($loc)\n";
- }
- #$r->warn("post connection handler called for ", $r->uri);
- return 0;
-});
-
-$r->post_connection(\&reset_scalar);
-
-$r->post_connection(sub {
- #print STDERR "__ANON__ called\n";
- %Hash = ();
- return 0;
-});
-
-#$r->warn("sequence number: " . $r->seqno);
-
-if($Apache::TestSIG) {
- require Apache::SIG;
- Apache::SIG->set;
-}
-
-#$r->content_type("text/plain");
-$r->header_out("X-Perl-Script" => "test");
-$r->send_http_header("text/plain");
-
-my(@args);
-$r->print("KeyForPerlSetVar = ", $r->dir_config('KeyForPerlSetVar'), "\n");
-
-if($Apache::TestSIG) {
- sleep(30);
- #now hit the browser "stop" button now, error_log should say:
- #Client hit STOP or Netscrape bit it!
- #Process $$ going to Apache::exit with status=$s
-}
-
-my $scalar_args = $r->args;
-print "SCALAR_ARGS=$scalar_args\n" if defined $scalar_args;
-
-if (@args = $r->args) {
- $r->print(
- "ARGS: ",
- join(", ", map { $_ = qq{"$_"} } @args),
- "\n\n");
-} else {
- $r->print("No command line arguments passed to script\n\n");
-}
-
-my($key,$val);
-while (($key,$val) = each %ENV) {
- $r->print("$key=$val\n");
-}
-
-$r->print("TOTAL: ", scalar keys %ENV);
-unless ($Apache::__T) {
- die "\$Apache::__T not set!";
-}
-if ($ENV{CONTENT_LENGTH}) {
- #$len = $ENV{CONTENT_LENGTH};
- my $content = $r->content;
- my $r_content_will_not_block_when_called_twice = $r->content;
- eval { system $content };
- die "TaintCheck failed, I can `system \$content' ($content:$ENV{CONTENT_LENGTH})" unless $@;
- #warn "TRAPPED: `system \$r->content' '$@'\n";
-
- $r->print("\nContent\n-------\n$content");
- if(my $post = $r->subprocess_env("POST_DATA")) {
- print "\nPOST_DATA=`$post'\n";
- }
-}
-
-print "\n";
-if(defined &Apache::system and \&system == \&Apache::system) {
- system qq{$Config::Config{perlpath} -le 'print "Apache::system ok"'};
-}
-
-#even though we exit() here, END block below is still called
-test_exit(); # unless $ENV{CONTENT_LENGTH};
-
-sub test_exit {
- if ($USE_THREAD or $is_xs) {
- warn "XXX: need to fix exit in t/net/header.t w/ threads\n";
- }
- else {
- exit;
- die "shouldn't get this far!\n";
- }
-}
-
-END {
- #warn "END block called for `test' ($0)\n";
- @Array = ();
-}
diff --git a/tags/v1_29/t/net/perl/throw_error.pl b/tags/v1_29/t/net/perl/throw_error.pl
deleted file mode 100755
index c188e0d..0000000
--- a/tags/v1_29/t/net/perl/throw_error.pl
+++ /dev/null
@@ -1,9 +0,0 @@
-#!perl
-my $r = shift;
-
-$r->custom_response(500, "/perl/server_error.pl");
-
-my $qs = $r->args;
-
-die "$qs\n";
-
diff --git a/tags/v1_29/t/net/perl/tie_table.pl b/tags/v1_29/t/net/perl/tie_table.pl
deleted file mode 100755
index 8e0c41c..0000000
--- a/tags/v1_29/t/net/perl/tie_table.pl
+++ /dev/null
@@ -1,136 +0,0 @@
-#!perl
-use Apache::testold;
-
-use strict;
-my $r = shift;
-
-$r->send_http_header("text/plain");
-
-unless(have_module "Apache::Table") {
- print "1..0\n";
- return;
-}
-
-my $i = 0;
-my $tests = 32;
-print "1..$tests\n";
-
-my $headers_in = $r->headers_in;
-my $table = tied %$headers_in;
-
-test ++$i, UNIVERSAL::isa($headers_in, 'HASH');
-test ++$i, $table->isa('Apache::Table');
-test ++$i, $table->get('User-Agent');
-test ++$i, $r->headers_in->get('User-Agent');
-test ++$i, $headers_in->{'User-Agent'};
-test ++$i, $table->get('User-Agent') eq $headers_in->{'User-Agent'};
-$table->merge(Accept => "application/x-perl");
-test ++$i, $table->get("Accept") =~ /x-perl/;
-
-test ++$i, not $table->get("NoChance");
-test ++$i, not $headers_in->{"NoChance"};
-test ++$i, keys %$headers_in > 0;
-
-my %save = %$headers_in;
-
-delete $headers_in->{'User-Agent'};
-test ++$i, not $table->get('User-Agent');
-
-%$headers_in = ();
-
-test ++$i, scalar keys %$headers_in == 0;
-
-%$headers_in = %save;
-
-my %my_hash = (two => 2, three => 3);
-@{ $r->notes }{ keys %my_hash } = (values %my_hash);
-
-for (keys %my_hash) {
- test ++$i, scalar $r->notes->get($_);
-}
-$r->notes->add(three => "tre");
-my(@notes) = $r->notes->get("three");
-print "\@notes = @notes\n";
-test ++$i, @notes == 2;
-
-use vars qw(%Seen);
-
-sub print_header {
- my($k,$v) = @_;
- print "DO: $k => $v\n";
- $Seen{$k}++;
- 1;
-}
-
-%Seen = ();
-$r->notes->do(\&print_header);
-test ++$i, $Seen{three} == 2;
-test ++$i, $Seen{two};
-
-%Seen = ();
-$r->notes->do(\&print_header, qw(three));
-test ++$i, not exists $Seen{two};
-
-sub my_as_string {
- my $r = shift;
- my @retval = ();
- push @retval, $r->the_request;
-
- my $str_header = sub {
- my($k, $v) = @_;
- push @retval, "$k: $v";
- 1;
- };
-
- $r->headers_in->do($str_header);
- push @retval, "";
-
- push @retval, join(" ", $r->protocol, $r->status_line);
- for my $meth (qw(headers_out err_headers_out)) {
- $r->$meth()->do($str_header);
- }
- push @retval, "", "";
- join "\n", grep { defined $_ } @retval;
-}
-
-use Benchmark;
-if(my_as_string($r) eq $r->as_string) {
- print "as_string match\n";
-}
-else {
- print "as_string MIS-match\n";
- print "-" x 20, $/;
- print my_as_string($r);
- print "-" x 20, $/;
- print $r->as_string;
- print "-" x 20, $/;
-}
-#timethese(1_000, {
-# Perl => sub {my $my_as_string = my_as_string($r)},
-# C => sub {my $as_string = $r->as_string;},
-#});
-
-for my $meth (qw{
- headers_in headers_out err_headers_out notes dir_config subprocess_env
- })
-{
- my $hash_ref = $r->$meth();
- my $tab = tied %$hash_ref;
-
- print "$meth:\n";
- while(my($k,$v) = each %$hash_ref) {
- print "$k = $v\n";
- }
-
- print "TOTAL: ", scalar keys %$hash_ref, "\n\n";
-
- test ++$i, UNIVERSAL::isa($hash_ref, 'HASH');
- test ++$i, $tab->isa('Apache::Table');
-}
-
-my $tabobj = Apache::Table->new($r);
-test ++$i, $tabobj;
-
-$tabobj->{'a'} = 1;
-
-test ++$i, $tabobj->get('a');
diff --git a/tags/v1_29/t/net/perl/uri.pl b/tags/v1_29/t/net/perl/uri.pl
deleted file mode 100755
index d9db281..0000000
--- a/tags/v1_29/t/net/perl/uri.pl
+++ /dev/null
@@ -1,47 +0,0 @@
-#!perl
-use strict;
-use Apache::testold;
-$|++;
-my $i = 0;
-
-my $r = shift;
-$r->send_http_header('text/plain');
-
-eval {
- require Apache::URI;
-};
-if($@) {
- print "$@\n";
- print "1..0\n";
- return;
-}
-
-my (@methods) = qw{
-scheme
-hostinfo
-user
-password
-hostname
-path
-rpath
-query
-fragment
-port
-unparse
-};
-
-my $tests = (@methods * 2) * 2;
-print "1..$tests\n";
-my $test_uri = "http://perl.apache.org:80/dist/apache-modlist.html";
-
-for (1,2) {
- for my $uri ($r->parsed_uri, Apache::URI->parse($r, $test_uri)) {
- print "URI=", $uri->unparse, "\n";
- for my $meth (@methods) {
- my $val = $uri->$meth();
- test ++$i, $val || 1;
- $val ||= "";
- print "$meth = `$val'\n";
- }
- }
-}
diff --git a/tags/v1_29/t/net/perl/util.pl b/tags/v1_29/t/net/perl/util.pl
deleted file mode 100755
index 49cba28..0000000
--- a/tags/v1_29/t/net/perl/util.pl
+++ /dev/null
@@ -1,210 +0,0 @@
-#!perl
-use strict;
-use Apache::testold;
-$|++;
-my $i = 0;
-my $tests = 9;
-
-my $r = shift;
-$r->send_http_header('text/plain');
-
-eval {
- require Apache::Util;
- require HTML::Entities;
- require URI::Escape;
- require HTTP::Date;
-};
-if($@) {
- print "$@\n";
- print "1..0\n";
- return;
-}
-
-my $test_date_format = 0;
-my $test_time_parsedate = 0;
-
-eval {
- require Date::Format;
-};
-
-unless($@) {
- $test_date_format = 2;
- $tests += $test_date_format;
-}
-$@ = '';
-
-eval {
- require Time::ParseDate;
-};
-
-unless($@) {
- $test_time_parsedate = 1;
- $tests += $test_time_parsedate;
-}
-$@ = '';
-
-print "1..$tests\n";
-
-for ("10321", "100666") {
- my $size = Apache::Util::size_string($_);
- test ++$i, $size;
- #print "$_ => $size\n";
-}
-
-my $html = <<EOF;
-<html>
-<head>
-<title>Testing Escape</title>
-</head>
-<body>
-"ok"
-&how
-</body>
-</html>
-EOF
-
-my $txt = "No html tags in here at all";
-my $etxt = Apache::Util::escape_html($txt);
-test ++$i, $txt eq $etxt;
-
-my $esc = Apache::Util::escape_html($html);
-#print $esc;
-
-my $esc_2 = HTML::Entities::encode($html);
-
-#print $esc_2;
-test ++$i, $esc eq $esc_2;
-use Benchmark;
-
-=pod
-timethese(1000, {
- C => sub { my $esc = Apache::Util::escape_html($html) },
- Perl => sub { my $esc = HTML::Entities::encode($html) },
-});
-=cut
-
-my $uri = "http://www.apache.org/docs/mod/mod_proxy.html?has some spaces";
-
-my $C = Apache::Util::escape_uri($uri);
-my $Perl = URI::Escape::uri_escape($uri);
-
-print "C = $C\n";
-print "Perl = $Perl\n";
-
-#test ++$i, lc($C) eq lc($Perl);
-test ++$i, length($C) && length($Perl);
-
-=pod
-timethese(10000, {
- C => sub { my $esc = Apache::Util::escape_uri($uri) },
- Perl => sub { my $esc = URI::Escape::uri_escape($uri) },
-});
-=cut
-
- {
- my $str = "aa%20dd%2epl";
- my $expected = "aa dd.pl";
- my $received = Apache::unescape_url($str);
- test ++$i, $received eq $expected;
- print "expected: $expected\n";
- print "received: $received\n";
- }
-
- {
- my $str = undef;
- my $expected = "";
- local $^W = 0;
- my $received = Apache::unescape_url($str);
- test ++$i, $received eq $expected;
- print "expected: $expected\n";
- print "received: $received\n";
- }
-
-$C = Apache::Util::ht_time();
-$Perl = HTTP::Date::time2str();
-my $builtin = scalar gmtime;
-
-print "C = $C\n";
-print "Perl = $Perl\n";
-print "builtin = $builtin\n";
-
-#test ++$i, lc($C) eq lc($Perl);
-test ++$i, length($C) && length($Perl);
-
-=pod
-use Benchmark;
-timethese(10000, {
- C => sub { my $d = Apache::Util::ht_time() },
- Perl => sub { my $d = HTTP::Date::time2str() },
- Perl_builtin => sub { my $d = scalar gmtime },
-});
-=cut
-
-my @formats = ("%d %b %Y %T %Z", "%a, %d %B %Y");
-
-if($test_date_format) {
- print "Testing Date::Format\n";
- for my $fmt (@formats) {
- my $c = Apache::Util::ht_time(time, $fmt, 0);
- my $p = Date::Format::time2str($fmt, time);
- print "C=$c\nPerl=$p\n";
- #test ++$i, $c eq $p;
- test ++$i, length($c) && length($p);
- }
-}
-=pod
-timethese(10000, {
- C => sub {
- for my $fmt (@formats) {
- my $c = Apache::Util::ht_time(time, $fmt, 0);
- }
- },
- Perl => sub {
- for my $fmt (@formats) {
- my $p = Date::Format::time2str($fmt, time);
- }
- },
-});
-=cut
-=pod
-Benchmark: timing 10000 iterations of C, Perl...
- C: 3 secs ( 2.64 usr 0.05 sys = 2.69 cpu)
- Perl: 21 secs (20.57 usr 0.14 sys = 20.71 cpu)
-=cut
-
-my $date_str = "Sat, 18 Jul 1998 08:38:00 GMT";
-
-test ++$i, Apache::Util::parsedate($date_str);
-
-if($test_time_parsedate) {
- my $c = Apache::Util::parsedate($date_str);
- print "C says: ", scalar(localtime $c), "\n";
-
- my $p = Time::ParseDate::parsedate($date_str);
- print "Perl says: ", scalar(localtime $p), "\n";
- my $htt = Apache::Util::ht_time($c, $formats[-1], 0);
- print "HTT=$htt\n";
- test ++$i,
- Apache::Util::ht_time($c, $formats[-1], 0) eq
- Apache::Util::ht_time($p, $formats[-1], 0)
-}
-
-=pod
-timethese(10000, {
- C => sub {
- my $c = Apache::Util::parsedate($date_str);
- },
- Perl => sub {
- my $p = Time::ParseDate::parsedate($date_str);
- },
-});
-=cut
-=pod
-Benchmark: timing 10000 iterations of C, Perl...
- C: 1 secs ( 0.42 usr 0.00 sys = 0.42 cpu)
- Perl: 17 secs (16.76 usr 0.07 sys = 16.83 cpu)
-=cut
-
-#my $hash = "aX9eP53k4DGfU";
-#test ++$i, Apache::Util::validate_password("dougm", $hash);
-#test ++$i, ! Apache::Util::validate_password("mguod", $hash);
diff --git a/tags/v1_29/t/report.PL b/tags/v1_29/t/report.PL
deleted file mode 100644
index b897148..0000000
--- a/tags/v1_29/t/report.PL
+++ /dev/null
@@ -1,26 +0,0 @@
-
-use ExtUtils::MakeMaker;
-use Mail::Send ();
-use Config;
-
-use ExtUtils::testlib;
-use lib qw(../blib/lib ../blib/arch);
-use Apache::src;
-
-my $src = Apache::src->new;
-my $ap_v = $src->httpd_version;
-my $ap_mmn = $src->module_magic_number;
-
-my $mp_version = MM->parse_version(-e "lib/mod_perl.pm" ?
- "lib/mod_perl.pm" : "../lib/mod_perl.pm");
-
-my $msg = Mail::Send->new(
- To => 'modperl-cvs@perl.apache.org',
- Subject => 'mod_perl test report');
-
-my $fh = $msg->open;
-$fh->print("mod_perl VERSION: $mp_version\n",
- "Apache version: $ap_v\n",
- "Apache MMN: $ap_mmn\n\n",
- join('', <>), "\n", Config::myconfig());
-$fh->close;