Eric J. Hansen wrote:
After looking at this further, it turns out that Perrin's suggested
code *does* work, but only in the PerlResponseHandler or earlier
stages.  And unfortunately, I mis-stated the original problem...  which is
that I am trying to retrieve that pnotes object (Class::DBI instance)
in _PerlCleanupHandler_ (not PerlResponseHandler as originally stated).

When I try to retrieve this Class::DBI object from the Cleanup Handler,
the pnotes values are totally gone.  However, regular scalers that I've
put in 'notes' are still there. Perhaps pnotes has (by design) already
been cleaned up prior to the PerlCleanupHandler stage?

Right, here is the fix:


Index: src/modules/perl/modperl_config.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
retrieving revision 1.71
diff -u -r1.71 modperl_config.c
--- src/modules/perl/modperl_config.c   23 Oct 2003 18:34:51 -0000      1.71
+++ src/modules/perl/modperl_config.c   20 Dec 2003 02:46:41 -0000
@@ -288,12 +288,12 @@
     apr_status_t retval;
     MP_dRCFG;

+    retval = modperl_callback_per_dir(MP_CLEANUP_HANDLER, r, MP_HOOK_RUN_ALL);
+
     if (rcfg->pnotes) {
         SvREFCNT_dec(rcfg->pnotes);
         rcfg->pnotes = Nullhv;
     }
-
-    retval = modperl_callback_per_dir(MP_CLEANUP_HANDLER, r, MP_HOOK_RUN_ALL);

     /* undo changes to %ENV caused by +SetupEnv, perl-script, or
      * $r->subprocess_env, so the values won't persist  */

__________________________________________________________________
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


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to