On Mon, 2005-06-20 at 16:45 -0600, Aaron Scott wrote: > I can duplicate it with the following simple example: > > -- mod_perl.conf > > PerlRequire conf/startup.pl > > <Location /loc > > SetHandler perl-script > PerlResponseHandler MyHandler > </Location> > > > -- startup.pl > > use SomeDir::MyPackage; > > > > -- /path/to/SomeDir/MyPackage.pm > > package SomePackage; > > sub foo { return 1; } > > 1; > > > -- /path/to/MyHandler.pm > > require AnotherPackage; > > > -- /path/to/SomeDir/AnotherPackage.pm > > package AnotherPackage; > > use SomePackage; > > 1; > > --- > > The end result is that %INC has entries: > > SomeDir/MyPackage.pm => /path/to/SomeDir/MyPackage.pm, > MyPackage.pm => /path/to/SomeDir/MyPackage.pm > > and my log file has > > Subroutine foo redefined at /path/to/SomeDir/SomePackage.pm line 3
This example is kind of broken, but I'm guessing you meant to say "use MyPackage" rather than "use SomePackage"? And maybe "package SomePackage;" was supposed to say "package SomeDir::MyPackage"? The only way I can imagine this happening is if you put '.' in your @INC in addition to '/path/to' and are this calling the same file by two different names. Of course that will redefine your subs. Sorry if I'm misunderstanding, but this doesn't look like a mod_perl issue to me. - Perrin