On Tue 12-Feb-2002 at 04:02:47PM -0500, Perrin Harkins wrote: > > A list of things I've noticed: > > > > * If you have two *different* modules which have the same name, then > > either one, or the other is loaded in memory, never both. This is > > dead annoying. I think Perl standard modules + CPAN modules should be > > shared, other modules which are specific to a given script should not. > > This is how perl works. You are not allowed to have two different modules > with the same name loaded in the same interpreter. If you can't deal with > that, maybe you should consider using an environment like Mason or Embperl > which allow a page-based approach closer to PHP, rather than using perl's > package namespace.
I know that this is how perl works... in the context of mod_perl though, in some cases it'd be less hassle to be able to have persistent perl processes isolated per script or per host... Anyway if mod_perl 2.0 allows a pool of perls on a per-host basis as you said, then it'd be a great plus! > > * Global variables should be reinitialized on each request. Or at least > > if we want them to be persistent we do not want them to be shared with > > different scripts on different virtual hosts! > Global variables are variables without scope. They are not cleaned up by > definition. If you want variables that go out of scope, use lexicals. If > you have legacy code that depends on mod_cgi behavior to work, use > Apache::PerlRun which clears globals on each request. Apache::PerlRun is far too slow (I don't wanna recompile 18.000 lines of Perl code on each request, thanks :-)). Global variables are useful to store objects that can be accessed anywhere. The only way out is to manually undef everything on each request... I suppose it's not so bad, but I'm just a lazy bastard thus I need to complain :-) > > * Perl garbage collector should be smarter (okay, that may not be a > > mod_perl issue). C geeks out there, ain't it possible to compile a > > version of Perl with a better GC? > > Doug has talked about doing something with this in mod_perl 2 to help clean > up memory taken for lexicals, but it's not definite. And yes, this is > really a Perl issue, not a mod_perl one. Yeah Perl not cleaning cyclic references is a pain. And WeakRef is a horrible hack :-) Cheers, -- IT'S TIME FOR A DIFFERENT KIND OF WEB ================================================================ Jean-Michel Hiver - Software Director [EMAIL PROTECTED] +44 (0)114 221 4968 ================================================================ VISIT HTTP://WWW.MKDOC.COM