You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2001/08/01 19:03:19 UTC
cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
dougm 01/08/01 10:03:19
Modified: t/response/TestApache cgihandler.pm
Log:
workaround for modules/cgi #3 failure
Revision Changes Path
1.5 +4 -1 modperl-2.0/t/response/TestApache/cgihandler.pm
Index: cgihandler.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestApache/cgihandler.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cgihandler.pm 2001/06/08 01:04:56 1.4
+++ cgihandler.pm 2001/08/01 17:03:19 1.5
@@ -15,7 +15,10 @@
if ($r->method_number == Apache::M_POST) {
my $ct = $r->headers_in->get('content-length');
my $buff;
- read STDIN, $buff, $ct;
+#XXX: working around a bug in ithreads Perl
+#that would cause modules/cgi #3 to fail
+# read STDIN, $buff, $ct;
+ read 'STDIN', $buff, $ct;
print $buff;
}
else {
Re: cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 2 Aug 2001, Stas Bekman wrote:
> Is it because the current version of CGI.pm doesn't support mod_perl 2.x
yes.
> and will have to a special handling of mod_perl 2.x?
umm, no, it just needs Apache::compat loaded. but really, see the comment
in Apache::compat:
#1.xx compat layer
#some of this will stay as-is
#some will be implemented proper later on
anyhow, CGI.pm shouldn't need any special casing for mod_perl. maybe
something that folks interested can help fix for CGI.pm 3.x.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
Posted by Stas Bekman <st...@stason.org>.
On Wed, 1 Aug 2001, Doug MacEachern wrote:
> On Thu, 2 Aug 2001, Stas Bekman wrote:
>
> > so why would this test(s) fail, then?
>
> because you moved the require of CGI to happen before the
> t/response/TestModules/cgi.pm test required Apache::compat.
>
> > I don't think it was exercising 1.x compat, or was it?
>
> anything that uses CGI.pm is excercising 1.x compat.
Is it because the current version of CGI.pm doesn't support mod_perl 2.x
and will have to a special handling of mod_perl 2.x?
> > it just 'use Apache::compat ();' and then tests for $CGI::MOD_PERL. We
> > could make sure that CGI.pm is reloaded via do()?
>
> we know Apache::compat has to be loaded before CGI.pm, so we just do
> that in the test setup.
>
> > Why TestModules/cgi.pm need the Apache::compat part? I thought
> > TestApache/compat was exercising it.
>
> because CGI.pm needs Apache::compat.
>
> > What's the conclusion then?
> >
> > - Put this issue on hold, resolve later
> > - provide MP_APACHE_COMPAT option
> > - merely document it
> >
> > I suppose that it's possible that someone will want to enable
> > Apache::compat for some specific vhs and not the whole server.
>
> just document for now, add a todo for MP_APACHE_COMPAT option.
done
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 2 Aug 2001, Stas Bekman wrote:
> so why would this test(s) fail, then?
because you moved the require of CGI to happen before the
t/response/TestModules/cgi.pm test required Apache::compat.
> I don't think it was exercising 1.x compat, or was it?
anything that uses CGI.pm is excercising 1.x compat.
> it just 'use Apache::compat ();' and then tests for $CGI::MOD_PERL. We
> could make sure that CGI.pm is reloaded via do()?
we know Apache::compat has to be loaded before CGI.pm, so we just do
that in the test setup.
> Why TestModules/cgi.pm need the Apache::compat part? I thought
> TestApache/compat was exercising it.
because CGI.pm needs Apache::compat.
> What's the conclusion then?
>
> - Put this issue on hold, resolve later
> - provide MP_APACHE_COMPAT option
> - merely document it
>
> I suppose that it's possible that someone will want to enable
> Apache::compat for some specific vhs and not the whole server.
just document for now, add a todo for MP_APACHE_COMPAT option.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
Posted by Stas Bekman <st...@stason.org>.
On Wed, 1 Aug 2001, Doug MacEachern wrote:
> On Thu, 2 Aug 2001, Stas Bekman wrote:
>
> > Now how do we make sure that Apache::compat is loaded before CGI.pm?
> > Should I put a special case logic into the code that does the actual
> > require to load Apache::compat if CGI.pm is loaded? This won't work from
> > <Perl> sections or startup.pl though.
>
> no, Apache::compat is not just for CGI.pm
so why would this test(s) fail, then? I don't think it was exercising 1.x
compat, or was it?
it just 'use Apache::compat ();' and then tests for $CGI::MOD_PERL. We
could make sure that CGI.pm is reloaded via do()?
Why TestModules/cgi.pm need the Apache::compat part? I thought
TestApache/compat was exercising it.
> > Is the only solution is to document this issue? I'd strive to get it done
> > automatically. What would be the performance hit to always load it no
> > matter, whether you need it or not?
>
> it's not gonna happen automatically without performance hit / bloat.
> unless maybe with a Makefile.PL option that tells modperl to always load
> Apache::compat, as in:
> #ifdef MP_APACHE_COMPAT
> modperl_require_module("Apache::compat");
> #endif
>
> in any case, the default for compat mode will be off.
What's the conclusion then?
- Put this issue on hold, resolve later
- provide MP_APACHE_COMPAT option
- merely document it
I suppose that it's possible that someone will want to enable
Apache::compat for some specific vhs and not the whole server.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 2 Aug 2001, Stas Bekman wrote:
> Now how do we make sure that Apache::compat is loaded before CGI.pm?
> Should I put a special case logic into the code that does the actual
> require to load Apache::compat if CGI.pm is loaded? This won't work from
> <Perl> sections or startup.pl though.
no, Apache::compat is not just for CGI.pm
> Is the only solution is to document this issue? I'd strive to get it done
> automatically. What would be the performance hit to always load it no
> matter, whether you need it or not?
it's not gonna happen automatically without performance hit / bloat.
unless maybe with a Makefile.PL option that tells modperl to always load
Apache::compat, as in:
#ifdef MP_APACHE_COMPAT
modperl_require_module("Apache::compat");
#endif
in any case, the default for compat mode will be off.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
Posted by Stas Bekman <st...@stason.org>.
On Wed, 1 Aug 2001, Doug MacEachern wrote:
> On Thu, 2 Aug 2001, Stas Bekman wrote:
>
> > On 1 Aug 2001 dougm@apache.org wrote:
> >
> > > dougm 01/08/01 10:03:19
> > >
> > > Modified: t/response/TestApache cgihandler.pm
> > > Log:
> > > workaround for modules/cgi #3 failure
> >
> > it seems to work :)
>
> cool. that was a needle in the haystack bug.
:)
> > Now, if I load CGI.pm via the newly crafted PerlModule I've a different
> > problem with modules/cgi #5
> >
> > [Thu Aug 02 09:46:17 2001] [error] [client 127.0.0.1] CGI.pm does not
> > think this is mod_perl at
> > /home/stas/apache.org/modperl-2.0-perlmodule/t/response/TestModules/cgi.pm
> > line 17.
>
> probably because Apache::compat needs to be loaded first.
true. this works:
PerlModule Apache::compat CGI
Now how do we make sure that Apache::compat is loaded before CGI.pm?
Should I put a special case logic into the code that does the actual
require to load Apache::compat if CGI.pm is loaded? This won't work from
<Perl> sections or startup.pl though.
Is the only solution is to document this issue? I'd strive to get it done
automatically. What would be the performance hit to always load it no
matter, whether you need it or not?
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 2 Aug 2001, Stas Bekman wrote:
> On 1 Aug 2001 dougm@apache.org wrote:
>
> > dougm 01/08/01 10:03:19
> >
> > Modified: t/response/TestApache cgihandler.pm
> > Log:
> > workaround for modules/cgi #3 failure
>
> it seems to work :)
cool. that was a needle in the haystack bug.
> Now, if I load CGI.pm via the newly crafted PerlModule I've a different
> problem with modules/cgi #5
>
> [Thu Aug 02 09:46:17 2001] [error] [client 127.0.0.1] CGI.pm does not
> think this is mod_perl at
> /home/stas/apache.org/modperl-2.0-perlmodule/t/response/TestModules/cgi.pm
> line 17.
probably because Apache::compat needs to be loaded first.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm
Posted by Stas Bekman <st...@stason.org>.
On 1 Aug 2001 dougm@apache.org wrote:
> dougm 01/08/01 10:03:19
>
> Modified: t/response/TestApache cgihandler.pm
> Log:
> workaround for modules/cgi #3 failure
it seems to work :)
Now, if I load CGI.pm via the newly crafted PerlModule I've a different
problem with modules/cgi #5
[Thu Aug 02 09:46:17 2001] [error] [client 127.0.0.1] CGI.pm does not
think this is mod_perl at
/home/stas/apache.org/modperl-2.0-perlmodule/t/response/TestModules/cgi.pm
line 17.
and get lots of other failures for the same reason.
modules/cgi.............NOK 5Use of uninitialized value in string eq at
modules/cgi.t line 26.
modules/cgi.............dubious
Test returned status 9 (wstat 2304, 0x900)
DIED. FAILED tests 2-6
Failed 5/6 tests, 16.67% okay
modules/cgiupload.......FAILED test 2
Failed 1/2 tests, 50.00% okay
Well, I'll see what's the problem
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org