> > * 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!

Try looking into the way mod_perl hooks into the apache configuration. This
may work for setting site wide constants globals depending on how you use
them.  You can then set different values for virtual hosts or even allow
directives to be set in '.htaccess' files.

> > * 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?

There really is no reason to cleanup the globals since they are still
referenced and in memory.  Perhaps you can consider an interface around your
code which can handle the cleanup and such of any variables.

You could also set a 'cleanup' handler to 'unload' the module from the
process when it is completed or even 'undef' specific variables.  That way
you can clear out the namespace and then other scripts calling the same
named module but from a different path can actually load it.



Reply via email to