Greetings,

On Wednesday, June 20, 2001, at 12:45 PM, Stas Bekman wrote:

> Ooops, gotta go to sleep. Your suggestion, Mark, will work :) but only 
> in
> Registry/PerlRun which executes BEGIN on every request.
>
> Sorry about my previous post :(
>
> But if you delete and reload the file on every request it defeats the
> purpose of using mod_perl to some degree, depending on how many files 
> you
> force to reload and how big they are.
>
> BTW, here is shorter version of your suggestion:
>
> BEGIN { do '/foo/bar/query.pl'; }

Sorry, I guess I should have been more explicit. I don't want to
require in the file on every request, but rather only allow the
same file to be require'd multiple times (to install the same sub
routines into different packages).  This is needed because we have
modularized some of our XML handlers for SUBS-style parsing in
XML::Parser and we need create multiple subclasses of XML::Parser
that share the same modularized components. The packages that
subclass XML::Parser are read in only once in the startup.pl file.
The last require leaves the files in the %INC hash, so it isn't
subsequently read in on every request (so 'do' isn't quite the
same).

Cheers,
Mark

Reply via email to