On Thu, 23 Aug 2001, Jeremy Howard wrote:
> Stas Bekman wrote:
> > On Thu, 23 Aug 2001, Jeremy Howard wrote:
> >
> > > Stas Bekman wrote:
> > > > Something forces the reload of your files. I'd suggest putting
> something
> > > > like:
> > > >
> > > > use Carp;
> > > > cluck("I was loaded");
> > > >
> > > > in one of the files
> > > > run the server in single server mode (httpd -X)
> > > > and check the trace on the second reload.
> > > >
> > > Nice idea. You might also try 'warn "@INC"' in one of your modules to
> see
> > > what the include path looks like. You might have a path appearing twice
> in
> > > @INC.
> >
> > Hmm, let's say I do have some path twice. What gives? It's %INC that
> > matters here and not @INC. Or do you mean something else?
> >
> If a duplicate path appears in @INC, then wouldn't a module get potentially
> included twice? Particularly if it had something funny happening in a BEGIN
> block? Which could lead to the 'sub redefined' warnings Matt was complaining
> about...
perldoc -f require
...
sub require {
my($filename) = @_;
return 1 if $INC{$filename};
^^^^^^^^^
...
if the file is in %INC and you don't mangle with it, require() immediately
returns. So you can have the same path 10 times and the file will be
loaded only once. In any case @INC has little to do with %INC.
> Course this could all be rubbish--corrections welcomed (I get this warning
> myself and I don't use Apache::Reload, StatINC, Apache::Registry, etc; it's
> never bothered me enough to really look into it though... This is on latest
> stable mod_perl and Apache)
>
>
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://localhost/ http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/