You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Nick Tonkin <ni...@tonkinresolutions.com> on 2003/03/12 17:09:15 UTC
[mp2] Apache::compat loading when not told to?
Hey all,
I just installed Apache::Status on my 2.0 server. I was disappointed to
find that Apache::compat was loaded (along with _all_ the Apache modules).
I thought it might be some code of mine so I started stripping httpd.conf
and startup.pl. They are almost empty but Apache::compat still loads. Any
clues?
==============
nick@world /home/debug/www/_conf>grep -v ^# startup.pl
use Apache2 ();
use Apache::Status;
1;
==============
nick@world /home/debug/www/_conf>grep -v ^# httpd.conf
ServerRoot /home/debug/apache
PidFile /home/debug/www/_logs/httpd.pid
User nobody
Group #-1
Listen 8080
LoadModule perl_module modules/mod_perl.so
PerlRequire /home/debug/www/_conf/startup.pl
<Location /perl-status>
SetHandler perl-script
PerlHandler Apache::Status
order deny,allow
deny from all
allow from 192.168.0.
</Location>
==============
nick@world ~>lwp-request -sd http://localhost:8080/perl-status?Apache::compat
200 OK
==============
Thanks,
- nick
--
~~~~~~~~~~~~~~~~~~~~
Nick Tonkin {|8^)>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] Apache::compat loading when not told to?
Posted by Stas Bekman <st...@stason.org>.
Nick Tonkin wrote:
> On Wed, 12 Mar 2003, Nick Tonkin wrote:
>
> Answering my own question:
>
>
>>Hey all,
>>
>>I just installed Apache::Status on my 2.0 server. I was disappointed to
>>find that Apache::compat was loaded (along with _all_ the Apache modules).
>>
>>I thought it might be some code of mine so I started stripping httpd.conf
>>and startup.pl. They are almost empty but Apache::compat still loads. Any
>>clues?
>
>
> Apache::Status does:
> if (eval {require Apache::Request}) {
> $newQ ||= sub { Apache::Request->new(@_) };
> }
> elsif (eval {require CGI}) {
> $newQ ||= sub { CGI->new; };
> }
> else {
> die "Need CGI.pm or Apache::Request to operate";
> }
>
> And CGI IIRC uses Apache::compat until Stas' patch is applied.
You could use Perl to help you figure out who was loading the module. e.g.:
perl -le '*CORE::GLOBAL::require = sub { warn "require $_[0]\n";
CORE::require(@_)}; require CGI'
require Carp.pm
require CGI/Util.pm
require constant.pm
require overload.pm
require 5.004
(of course needs to be run under mod_perl ;)
Perl is so much fun!
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] Apache::compat loading when not told to?
Posted by Nick Tonkin <ni...@tonkinresolutions.com>.
On Wed, 12 Mar 2003, Nick Tonkin wrote:
Answering my own question:
>
> Hey all,
>
> I just installed Apache::Status on my 2.0 server. I was disappointed to
> find that Apache::compat was loaded (along with _all_ the Apache modules).
>
> I thought it might be some code of mine so I started stripping httpd.conf
> and startup.pl. They are almost empty but Apache::compat still loads. Any
> clues?
Apache::Status does:
if (eval {require Apache::Request}) {
$newQ ||= sub { Apache::Request->new(@_) };
}
elsif (eval {require CGI}) {
$newQ ||= sub { CGI->new; };
}
else {
die "Need CGI.pm or Apache::Request to operate";
}
And CGI IIRC uses Apache::compat until Stas' patch is applied.
- nick
--
~~~~~~~~~~~~~~~~~~~~
Nick Tonkin {|8^)>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org