Greetings,
require will only happen once per perl process and since mod_perl
is essentially a single perl process, the file is only require'd
for the first request. You can get around this by deleting the file from
the %INC
hash which keeps track of which files you have loaded. Something like:
> I have a question about require when using mod-perl.
The full story is at
http://theoryx5.uwinnipeg.ca/guide/porting/Name_collisions_with_Modules_and.
html
It sounds like you're having trouble because your .pl files are not real
modules but rather subs that get added into the current package s
On Wed, 20 Jun 2001, Purcell, Scott wrote:
> Hello,
> I have a question about require when using mod-perl. I produced four simple
> .pl files.
> main.pl, one.pl two.pl three.pl
>
> >From the main.pl you can link to either one two or three.pl. Pretty simple.
>
> The problem begins when I put a req
On Wed, 20 Jun 2001, Mark Doyle wrote:
> Greetings,
>
> require will only happen once per perl process and since mod_perl
> is essentially a single perl process, the file is only require'd
> for the first request. You can get around this by deleting the file from
> the %INC
> hash which keeps tra
On Thu, 21 Jun 2001, Stas Bekman wrote:
> On Wed, 20 Jun 2001, Mark Doyle wrote:
>
> > Greetings,
> >
> > require will only happen once per perl process and since mod_perl
> > is essentially a single perl process, the file is only require'd
> > for the first request. You can get around this by de
> > > 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/PerlR
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
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