cvs commit: modperl-2.0/ModPerl-Registry/lib/ModPerl PerlRun.pm Registry.pm RegistryBB.pm
stas2002/08/14 07:27:03 Modified:ModPerl-Registry/lib/ModPerl PerlRun.pm Registry.pm RegistryBB.pm Log: use the base pragma instead of ISA Revision ChangesPath 1.2 +1 -2 modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm Index: PerlRun.pm === RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/PerlRun.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PerlRun.pm9 Oct 2001 12:47:38 - 1.1 +++ PerlRun.pm14 Aug 2002 14:27:03 - 1.2 -8,8 +8,7 our $VERSION = '1.99'; -use ModPerl::RegistryCooker; -@ModPerl::PerlRun::ISA = qw(ModPerl::RegistryCooker); +use base qw(ModPerl::RegistryCooker); # META: prototyping ($$) segfaults on request sub handler { 1.3 +1 -2 modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm Index: Registry.pm === RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/Registry.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Registry.pm 22 May 2002 05:41:48 - 1.2 +++ Registry.pm 14 Aug 2002 14:27:03 - 1.3 -8,8 +8,7 our $VERSION = '1.99'; -use ModPerl::RegistryCooker; -@ModPerl::Registry::ISA = qw(ModPerl::RegistryCooker); +use base qw(ModPerl::RegistryCooker); sub handler { my $class = (_ = 2) ? shift : __PACKAGE__; 1.3 +1 -2 modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryBB.pm Index: RegistryBB.pm === RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryBB.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RegistryBB.pm 22 May 2002 05:41:48 - 1.2 +++ RegistryBB.pm 14 Aug 2002 14:27:03 - 1.3 -8,8 +8,7 our $VERSION = '1.99'; -use ModPerl::RegistryCooker; -@ModPerl::RegistryBB::ISA = qw(ModPerl::RegistryCooker); +use base qw(ModPerl::RegistryCooker); # META: prototyping ($$) segfaults on request sub handler {
cvs commit: modperl-2.0/ModPerl-Registry/t basic.t
stas2002/08/14 07:27:45 Modified:ModPerl-Registry/t basic.t Log: reformat the code according to the spec Revision ChangesPath 1.6 +24 -24modperl-2.0/ModPerl-Registry/t/basic.t Index: basic.t === RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/basic.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- basic.t 22 May 2002 05:40:48 - 1.5 +++ basic.t 14 Aug 2002 14:27:45 - 1.6 -6,11 +6,11 use Apache::TestRequest qw(GET_BODY HEAD); -my %modules = -(registry= 'ModPerl::Registry', - registry_bb = 'ModPerl::RegistryBB', - perlrun = 'ModPerl::PerlRun', -); +my %modules = ( +registry= 'ModPerl::Registry', +registry_bb = 'ModPerl::RegistryBB', +perlrun = 'ModPerl::PerlRun', +); my aliases = sort keys %modules; -21,10 +21,10 my $url = /$alias/basic.pl; ok t_cmp( - ok, - GET_BODY($url), - $modules{$alias} basic cgi test, -); +ok, +GET_BODY($url), +$modules{$alias} basic cgi test, +); } # test non-executable bit -32,10 +32,10 my $url = /$alias/not_executable.pl; ok t_cmp( - 403 Forbidden, - HEAD($url)-status_line(), - $modules{$alias} non-executable file, -); +403 Forbidden, +HEAD($url)-status_line(), +$modules{$alias} non-executable file, +); } # test environment pre-set -43,22 +43,22 my $url = /$alias/env.pl?foo=bar; ok t_cmp( - foo=bar, - GET_BODY($url), - $modules{$alias} mod_cgi-like environment pre-set, -); +foo=bar, +GET_BODY($url), +$modules{$alias} mod_cgi-like environment pre-set, +); } -# chdir is not safe yet! -# -# require (actually chdir test) +# XXX: chdir is not safe yet! + +## require (actually chdir test) #for my $alias (aliases) { #my $url = /$alias/require.pl; #ok t_cmp( -# it works, -# GET_BODY($url), -# $modules{$alias} mod_cgi-like environment pre-set, -#); +#it works, +#GET_BODY($url), +#$modules{$alias} mod_cgi-like environment pre-set, +#); #}
cvs commit: modperl-2.0/ModPerl-Registry/lib/ModPerl RegistryCooker.pm
stas2002/08/14 07:38:07 Modified:ModPerl-Registry/lib/ModPerl RegistryCooker.pm Log: syncing with 1.0's registry: geoff's patch to set error-notes on error Revision ChangesPath 1.12 +7 -2 modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm Index: RegistryCooker.pm === RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- RegistryCooker.pm 14 Aug 2002 12:52:37 - 1.11 +++ RegistryCooker.pm 14 Aug 2002 14:38:07 - 1.12 -205,7 +205,7 my $r = $o-[REQ]; unless (-r $r-finfo -s _) { -$r-log_error($$: $o-[FILENAME] not found or unable to stat); +xlog_error($r, $$: $o-[FILENAME] not found or unable to stat); return Apache::NOT_FOUND; } -649,7 +649,7 sub error_check { my $o = shift; if ($ and substr($,0,4) ne at ) { - $o-[REQ]-log_error($$: $o-[CLASS]: `$'); + xlog_error($o-[REQ], $$: $o-[CLASS]: `$'); $@{$o-[REQ]-uri} = $; #$ = ''; #XXX fix me, if we don't do this Apache::exit() breaks return Apache::SERVER_ERROR; -688,6 +688,11 $o-[REQ]-log_error($$: $o-[CLASS]: . join '', _); } +sub xlog_error { +my($r, $msg) = _; +$r-log_error($msg); +$r-notes('error-notes', $msg); +} 1; __END__
cvs commit: modperl-2.0/xs/Apache/RequestIO Apache__RequestIO.h
stas2002/08/14 07:54:47 Modified:src/modules/perl modperl_filter.c modperl_log.h t/response/TestAPI aplog.pm xs/Apache/Log Apache__Log.h xs/Apache/RequestIO Apache__RequestIO.h Log: eliminate the use of the deprecated APLOG_NOERRNO macro Revision ChangesPath 1.37 +1 -1 modperl-2.0/src/modules/perl/modperl_filter.c Index: modperl_filter.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- modperl_filter.c 29 Jun 2002 20:38:33 - 1.36 +++ modperl_filter.c 14 Aug 2002 14:54:47 - 1.37 -18,7 +18,7 return APR_SUCCESS; /* XXX: HTTP_MOVED_TEMPORARILY ? */ } else if (status != OK) { -ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, +ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r-server, %s did not send an HTTP header, r-uri); } 1.10 +5 -5 modperl-2.0/src/modules/perl/modperl_log.h Index: modperl_log.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- modperl_log.h 21 Jun 2002 20:30:27 - 1.9 +++ modperl_log.h 14 Aug 2002 14:54:47 - 1.10 -39,19 +39,19 void modperl_trace_level_set(server_rec *s, const char *level); #define modperl_log_warn(s,msg) \ -ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s, %s, msg) +ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, %s, msg) #define modperl_log_error(s,msg) \ -ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s, %s, msg) +ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, %s, msg) #define modperl_log_notice(s,msg) \ -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, %s, msg) +ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, %s, msg) #define modperl_log_debug(s,msg) \ -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, s, %s, msg) +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, %s, msg) #define modperl_log_reason(r,msg,file) \ -ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r-server, \ +ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server, \ access to %s failed for %s, reason: %s, \ file, \ get_remote_host(r-connection, \ 1.9 +1 -1 modperl-2.0/t/response/TestAPI/aplog.pm Index: aplog.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/aplog.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- aplog.pm 4 Jun 2002 13:04:47 - 1.8 +++ aplog.pm 14 Aug 2002 14:54:47 - 1.9 -46,7 +46,7 $s-log_serror(Apache::LOG_MARK, Apache::LOG_DEBUG, APR::ENOTIME, log_serror test 2 ok); -$r-log_rerror(Apache::LOG_MARK, Apache::LOG_DEBUG|Apache::LOG_NOERRNO, +$r-log_rerror(Apache::LOG_MARK, Apache::LOG_DEBUG, APR::ENOTIME, log_rerror test ok); $r-log_error('$r-log_error test ok'); 1.11 +2 -2 modperl-2.0/xs/Apache/Log/Apache__Log.h Index: Apache__Log.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/Log/Apache__Log.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Apache__Log.h 19 Jun 2002 05:18:04 - 1.10 +++ Apache__Log.h 14 Aug 2002 14:54:47 - 1.11 -57,10 +57,10 } if (r) { -ap_log_rerror(file, line, APLOG_NOERRNO|level, 0, r, %s, str); +ap_log_rerror(file, line, level, 0, r, %s, str); } else { -ap_log_error(file, line, APLOG_NOERRNO|level, 0, s, %s, str); +ap_log_error(file, line, level, 0, s, %s, str); } if (svstr) { 1.28 +1 -2 modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h Index: Apache__RequestIO.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- Apache__RequestIO.h 30 May 2002 02:33:48 - 1.27 +++ Apache__RequestIO.h 14 Aug 2002 14:54:47 - 1.28 -157,8 +157,7 /* only do this once per-request */ if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)) != OK) { -ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, -
cvs commit: modperl-2.0/lib/Apache Build.pm
stas2002/08/14 19:10:32 Modified:lib/Apache Build.pm Log: make it possible to build mod_perl against the source tree, where apr.h is located in srclib/include/apr/ and not include/ Revision ChangesPath 1.104 +6 -1 modperl-2.0/lib/Apache/Build.pm Index: Build.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- Build.pm 14 Aug 2002 02:33:00 - 1.103 +++ Build.pm 15 Aug 2002 02:10:32 - 1.104 -765,7 +765,12 my $dir = $self-ap_includedir; -my $header = $dir/apr.h; +my $header; +for my $d ($dir, $dir/../srclib/apr/include) { +$header = $d/apr.h; +last if -e $header; +} + open my $fh, $header or do { error Unable to open $header: $!; return undef;