> > > BEGIN {
> > > delete $INC{'/foo/bar/query.pl'} if exists
$INC{'/foo/bar/query.pl'};
> > > require '/foo/bar/query.pl';
> > > }
> >
> > Mark, your suggestion doesn't work because of BEGIN.
>
> Ooops, gotta go to sleep. Your suggestion, Mark, will work :) but only in
> Registry/PerlRun which executes BEGIN on every request.
It only needs to do the require once per script, so if you put this in each
script it will be fine. Also, I don't think Registry runs BEGIN blocks
every time. Can't remember about PerlRun.
> BTW, here is shorter version of your suggestion:
>
> BEGIN { do '/foo/bar/query.pl'; }
That's what I used when porting someone's old perl4-ish code to PerlRun.
Both of these quick fixes waste memory though.
- Perrin