>-----Original Message-----
>From: Kyle Oppenheim
>To: [EMAIL PROTECTED]
>Sent: 7/31/01 10:01 PM
>Subject: RE: Apache::Reload???

>Apache::Reload works by performing a stat on every file in %INC and
>calling
>require for all the files that changed.  It's quite possible that some
>of
>the files in %INC are using relative paths (often '.' is in @INC).  So,
>Perl
>was able to load the file originally because the initial 'use' or
>'require'
>was after Apache changed to your directory.  However, when
>Apache::Reload
>goes to look for the file, it can't find it because the current
>directory is
>different (most likely the ServerRoot).

actually, I don't think that is true in the latest version of Apache::Reload

for (@INC) {
  $mtime = (stat "$_/$file")[9];
  last if defined($mtime) && $mtime;
}

which should work with any packages that are real files and not package
declarations within other packages I would think.

>Apache::Reload: Can't locate MyModule.pm for every module I have added 
>Apache::Reload to. 

I actually got bitten by this just today when I realized that root directory
that starts my @INC was set to 700.  perhaps there is a permissions problem
in there - don't forget that Apache runs as nobody so nobody has to actually
be able to stat() the file (just to point out the obvious ;)

HTH

--Geoff

Reply via email to