On Tue, 31 Jul 2001, Kyle Oppenheim wrote:

> 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).

I've ran into this problem with Apache::Reload a couple of times myself.

Isn't there a way that Apache::Reload can be made to work transparently
(in the spirit of making programs "Do The Right Thing (tm)")?  Perhaps by
overloading the "use" and "require" functions to convert pathnames to be
fully qualified before inserting them in %INC?

(I think this would also help with same-named mod_perl scripts from
different VirtualHosts in the same instance of Apache interfering with
each others' execution?)

Reply via email to