Hello again,

I see Perrin's picked up on this thread too, so some of my replies
might be superfluous now but I didn't want to just abandon it.

On Fri, 13 Feb 2004, Morbus Iff wrote:

>  >Code handlers, get rid of globals and closures, run 'httpd -X'.
> 
> Could you tell me more what you mean by "code handlers"?

I meant write code as handlers.  Apache::Registry _is_ a handler.

http://perl.apache.org/docs/1.0/guide/config.html

  <Location /foo>
      SetHandler perl-script
      PerlHandler My::Module
   </Location>

> If I "undef" certain things at the end of scripts (like
> undef $settings, undef $final_template, undef $data), would
> that help?

It depends if they're causing the problems in the first place.
Half the time the problem is you don't know what the problem is.

> Are those three variables considered globals to mod_perl
> (they're lexical to index.cgi::main)?

There are two considerations: globals and persistence.  Globals are
genreally a Bad Thing in any programming.  Under mod_perl, the added
confusion of persistence (which is a kind of good-news-bad-news thing)
can compound problems with any carelessly initialized variables.  Best
to pass variables around as parameters and/or use methods if you can.
I'm not personally a big fan of Perl's object-oriented features but a
great deal of mod_perl code is written that way.

> As for -X, wouldn't that merely confirm children caching?
> What would I learn from confirming or denying the behavior
> under -X?

You won't learn anything from it if you don't do it.

73,
Ged.


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to