stas 2004/06/04 22:05:21
Modified: t/filter .cvsignore
todo release
Added: t/filter/TestFilter out_str_eval.pm
Log:
a test that reproduces the problem with $@ and filters. needs to be
resolved
Revision Changes Path
1.1 modperl-2.0/t/filter/TestFilter/out_str_eval.pm
Index: out_str_eval.pm
===================================================================
package TestFilter::out_str_eval;
# at some point there was a problem when eval {} in a non-filter
# handler wasn't functioning when a filter was involved. the $@ value
# was getting lost when t_cmp was doing print of debug values. and a
# new invocation of a filter handler resets the value of [EMAIL PROTECTED]
use strict;
use warnings FATAL => 'all';
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Filter ();
use Apache::Test;
use Apache::TestUtil;
use Apache::Const -compile => qw(OK DECLINED);
# dummy pass_through filter was good enough to trigger the problem
sub handler {
return Apache::DECLINED;
}
sub response {
my $r = shift;
plan $r, tests => 1, todo => [1];
# XXX: see if we can fix filter handlers to restore the original
# $@ when the callback completes
eval { i_do_not_exist_really_i_do_not() };
ok t_cmp(qr/Undefined subroutine/, $@, "some croak");
return Apache::OK;
}
1;
__DATA__
SetHandler modperl
PerlModule TestFilter::out_str_eval
PerlResponseHandler TestFilter::out_str_eval::response
1.5 +1 -0 modperl-2.0/t/filter/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -u -r1.4 -r1.5
--- .cvsignore 20 Jan 2003 23:14:40 -0000 1.4
+++ .cvsignore 5 Jun 2004 05:05:21 -0000 1.5
@@ -1,3 +1,4 @@
out_bbs_basic.t
out_str_api.t
+out_str_eval.t
1.28 +5 -0 modperl-2.0/todo/release
Index: release
===================================================================
RCS file: /home/cvs/modperl-2.0/todo/release,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -u -r1.27 -r1.28
--- release 26 May 2004 02:34:45 -0000 1.27
+++ release 5 Jun 2004 05:05:21 -0000 1.28
@@ -4,6 +4,11 @@
-- see also todo/api_status
+* filters reset $@ generated by eval, see if we can fix that. The TODO
+ test: TestFilter::out_str_eval presents the case
+ The description is here:
+ http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=108639632031457&w=2
+
* on windows $pool->clean, followed by $pool->destroy breaks other tests
See test TestAPR::pool
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=108547894817083&w=2