brendon.oliver at redsheriff.com
Thu Jul 3 20:21:21 CDT 2003
I have a few perl modules which are loaded up when apache starts (ie. in
httpd.conf: PerlScript /path/to/startup.pl where startup.pl "use"s a number
Now, a couple of these modules have BEGIN blocks which query some postgresql
database tables, then using the query results, dynamically create subroutines
(and constants) by manipulating the perl symbol table. This all works fine -
these subs are visible to all other modules which need them, and are shared
across all httpd processes.
If the contents of table X changes later on, I could re-execute the code from
the BEGIN block which would recreate the dynamically-generated subroutines.
So there's the query: am I right in presuming that the re-loaded subs would
only be visible in the httpd process in which this executes? I expect that
because the other httpd processes were forked by apache _after_ the modules
were loaded, the only way to get this table change recognised by all
processes would be to restart apache?
Thanks & regards,
Getting the job done is no excuse for not following the rules.
Following the rules will not get the job done.
11:06:36 up 7 days, 2:45, 6 users, load average: 2.00, 1.81, 1.66
More information about the Melbourne-pm