stas 2003/11/03 15:38:33
Modified: t/response/TestPerl hash_attack.pm Log: one more sanity check: define a new symbol (sub) after the attack has caused a re-hash, check that mod_perl finds that symbol (fixup2) in the stash Revision Changes Path 1.2 +7 -0 modperl-2.0/t/response/TestPerl/hash_attack.pm Index: hash_attack.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestPerl/hash_attack.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -u -r1.1 -r1.2 --- hash_attack.pm 3 Nov 2003 09:29:50 -0000 1.1 +++ hash_attack.pm 3 Nov 2003 23:38:33 -0000 1.2 @@ -40,10 +40,17 @@ no strict 'refs'; my @attack_keys = attack(\%{__PACKAGE__ . "::"}) if $] >= 5.008002; + # define a new symbol (sub) after the attack has caused a re-hash + # check that mod_perl finds that symbol (fixup2) in the stash + no warnings 'redefine'; + eval qq[sub fixup2 { return Apache::OK; }]; + $r->push_handlers(PerlFixupHandler => \&fixup2); + return Apache::DECLINED; } sub fixup { return Apache::OK; } + sub handler { my $r = shift; $r->print("ok");