I hate to belabor this point, but I don't want people to get the wrong idea:

> > 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).

That's what this accomplishes.  It only runs once, being inside of a BEGIN
block.  Using do() instead of require() skips the %INC check, so you don't
have to delete anything from %INC this way.  Of course, do() doesn't check
to see if your module returned true, but they are basically equivalent.
TMTOWTDI.

- Perrin

Reply via email to