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:
BEGIN {
delete $INC{'/foo/bar/query.pl'} if exists $INC{'/foo/bar/query.pl'};
require '/foo/bar/query.pl';
}
Cheers,
Mark
On Wednesday, June 20, 2001, at 10:04 AM, 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
>
> So my question is why this bazaar behavior. If I change the query.pl
> to a
> module and use it in each of the pages it is fine. I just find this
> behavior
> rather funny. If anyone has any insight please update me.
>
> Thanks,
> Scott Purcell
>