Hi Kee,

Resposta a sua mensagem de quinta-feira, 16 de maio de 2002:

Kee> ...I supposed I could make my object initializer do what his do
Kee> (cache the pointer and return it on new calls), but do so on a 
Kee> per-site basis.

The database handler (the DBI->connect object) should not be
initialized in the parent process and shared amongst the child
process. But I think my solution may feet your needs since the handler
is just initialed once per process and shared for all pages in a
site, the call like $obj->dbh just returns a copy of it really fast.

I have some modules for html, authentication and so on, that are
shared for all projects. For each site (project) I have a custom
module that uses all the other common modules, this way I have a
"private" namespace for each site and the functionality of all the
toolkit.

These custom modules are very simple and in fact should just provide
the namespace and load the necessary modules, adding just the new
methods needed for a particular project.

You should avoid using globals in your shared code, put everything
on the object itself. This way you can safely share your code between
different sites.

Regards,

Luiz Fernando B. Ribeiro
Engenho Solu��es para a Internet
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to