Fri Aug 22 10:37:59 PDT 2003
Hello again,
Here is the result of those edits on this system. And I'm more than willing to continue working this if you would like - but had to back it out as you'll see below.
Adolph Torres [EMAIL PROTECTED] -------------------------------------------------------------------------------
#-> Snip of new edit to RegistryCooker.pm:
{ # run the code and preserve warnings setup when it's done no warnings; my $r_iv=$$r;#people do things... eval{$cv->($r,@_)}; unless(ref($r) eq 'SCALAR' && $$r==$r_iv){ warn "dude, your just killed \$r!($self->{FILENAME})\n"; $$r=$r_iv;#restore the IV slot ModPerl::Global::special_list_call(END => $package); }
were you manually adjusting the code? You lost the closing brace. Just save this patch as a file /tmp/patch and then apply it with
cd modperl-2.0/Modperl-Registry patch -p0 < /tmp/patch
Index: lib/ModPerl/RegistryCooker.pm =================================================================== RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v retrieving revision 1.35 diff -u -r1.35 RegistryCooker.pm --- lib/ModPerl/RegistryCooker.pm 23 Mar 2003 04:52:24 -0000 1.35 +++ lib/ModPerl/RegistryCooker.pm 22 Aug 2003 07:30:27 -0000 @@ -181,7 +181,14 @@
{ # run the code and preserve warnings setup when it's done no warnings; + + my $r_iv = $$r; # people do things... eval { $cv->($r, @_) }; + unless (ref($r) eq 'SCALAR' && $$r == $r_iv) { + warn "dude, you just killed \$r! ($self->{FILENAME})\n"; + $$r = $r_iv; # restore the IV slot + } + ModPerl::Global::special_list_call(END => $package); }
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]