stas 2004/07/15 13:52:39
Modified: . Changes
lib/Apache Status.pm compat.pm
t/htdocs/vhost startup.pl
t/response/TestAPI server_const.pm server_util.pm
xs/Apache/ServerUtil Apache__ServerUtil.h
Log:
A few functions moved namespace from Apache:: to Apache::ServerUtil::
(to make it easier to find the container of the function):
- server_root
- get_server_built
- get_server_version
Revision Changes Path
1.416 +5 -2 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -u -r1.415 -r1.416
--- Changes 15 Jul 2004 20:36:28 -0000 1.415
+++ Changes 15 Jul 2004 20:52:38 -0000 1.416
@@ -12,9 +12,12 @@
=item 1.99_15-dev
-Moved namespace from Apache:: to Apache::ServerUtil:: (to make it
-easier to find the container of the function): [Stas]
+A few functions moved namespace from Apache:: to Apache::ServerUtil::
+(to make it easier to find the container of the function): [Stas]
- exists_config_define
+ - server_root
+ - get_server_built
+ - get_server_version
fix an old outstanding bug in the APR::Table's TIE interface with
each()/values() over tables with multi-values keys. Now the produced
1.26 +1 -1 modperl-2.0/lib/Apache/Status.pm
Index: Status.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Status.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -u -r1.25 -r1.26
--- Status.pm 24 Mar 2004 23:36:48 -0000 1.25
+++ Status.pm 15 Jul 2004 20:52:38 -0000 1.26
@@ -161,7 +161,7 @@
sub header {
my $r = shift;
my $start = scalar localtime $^T;
- my $srv = Apache::get_server_version();
+ my $srv = Apache::ServerUtil::get_server_version();
$r->content_type("text/html");
my $v = $^V ? sprintf "v%vd", $^V : $];
$r->print(<<"EOF");
1.112 +2 -2 modperl-2.0/lib/Apache/compat.pm
Index: compat.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -u -r1.111 -r1.112
--- compat.pm 15 Jul 2004 20:36:29 -0000 1.111
+++ compat.pm 15 Jul 2004 20:52:38 -0000 1.112
@@ -254,7 +254,7 @@
package Apache::Server;
# XXX: is that good enough? see modperl/src/modules/perl/mod_perl.c:367
-our $CWD = Apache::server_root;
+our $CWD = Apache::ServerUtil::server_root;
our $AddPerlVersion = 1;
@@ -352,7 +352,7 @@
#no need to support in 2.0
sub export {}
-sub SERVER_VERSION { Apache::get_server_version() }
+sub SERVER_VERSION { Apache::ServerUtil::get_server_version() }
package Apache::RequestRec;
1.5 +1 -1 modperl-2.0/t/htdocs/vhost/startup.pl
Index: startup.pl
===================================================================
RCS file: /home/cvs/modperl-2.0/t/htdocs/vhost/startup.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -u -r1.4 -r1.5
--- startup.pl 9 Jul 2004 08:01:21 -0000 1.4
+++ startup.pl 15 Jul 2004 20:52:38 -0000 1.5
@@ -12,7 +12,7 @@
# and not the vhost's one. needs to be fixed.
my $s = Apache->server;
-my $vhost_doc_root = catdir Apache::server_root, qw(htdocs vhost);
+my $vhost_doc_root = catdir Apache::ServerUtil::server_root, qw(htdocs vhost);
# testing $s->add_config() in vhost
my $conf = <<"EOC";
1.6 +6 -7 modperl-2.0/t/response/TestAPI/server_const.pm
Index: server_const.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/server_const.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -u -r1.5 -r1.6
--- server_const.pm 8 Jul 2004 05:29:42 -0000 1.5
+++ server_const.pm 15 Jul 2004 20:52:38 -0000 1.6
@@ -28,18 +28,17 @@
# test Apache::Server constant subroutines
- ok t_filepath_cmp(canonpath(Apache::server_root),
+ ok t_filepath_cmp(canonpath(Apache::ServerUtil::server_root),
canonpath($root),
- 'Apache::server_root()');
-
+ 'Apache::ServerUtil::server_root()');
- ok t_cmp(Apache::get_server_built,
+ ok t_cmp(Apache::ServerUtil::get_server_built,
$built,
- 'Apache::get_server_built()');
+ 'Apache::ServerUtil::get_server_built()');
- ok t_cmp(Apache::get_server_version,
+ ok t_cmp(Apache::ServerUtil::get_server_version,
$version,
- 'Apache::get_server_version()');
+ 'Apache::ServerUtil::get_server_version()');
Apache::OK;
}
1.24 +2 -2 modperl-2.0/t/response/TestAPI/server_util.pm
Index: server_util.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/server_util.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -u -r1.23 -r1.24
--- server_util.pm 15 Jul 2004 20:36:29 -0000 1.23
+++ server_util.pm 15 Jul 2004 20:52:38 -0000 1.24
@@ -110,9 +110,9 @@
'Apache::server_root_relative($r->pool)');
# Apache::server_root is also the ServerRoot constant
- ok t_filepath_cmp(canonpath(Apache::server_root),
+ ok t_filepath_cmp(canonpath(Apache::ServerUtil::server_root),
canonpath($r->server_root_relative),
- 'Apache::server_root');
+ 'Apache::ServerUtil::server_root');
{
# absolute paths should resolve to themselves
1.22 +3 -3 modperl-2.0/xs/Apache/ServerUtil/Apache__ServerUtil.h
Index: Apache__ServerUtil.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/Apache/ServerUtil/Apache__ServerUtil.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -u -r1.21 -r1.22
--- Apache__ServerUtil.h 15 Jul 2004 19:31:54 -0000 1.21
+++ Apache__ServerUtil.h 15 Jul 2004 20:52:38 -0000 1.22
@@ -88,12 +88,12 @@
static void mpxs_Apache__ServerUtil_BOOT(pTHX)
{
- newCONSTSUB(PL_defstash, "Apache::server_root",
+ newCONSTSUB(PL_defstash, "Apache::ServerUtil::server_root",
newSVpv(ap_server_root, 0));
- newCONSTSUB(PL_defstash, "Apache::get_server_built",
+ newCONSTSUB(PL_defstash, "Apache::ServerUtil::get_server_built",
newSVpv(ap_get_server_built(), 0));
- newCONSTSUB(PL_defstash, "Apache::get_server_version",
+ newCONSTSUB(PL_defstash, "Apache::ServerUtil::get_server_version",
newSVpv(ap_get_server_version(), 0));
}