Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Bruce Tennant
Ugh! Not use to lists that reply to author.

Okay to resay what I sent to Geoffrey.

using the -I switch in the config file works, unlike the PerlSetEnv PERL5LIBGeoffrey Young [EMAIL PROTECTED] wrote:

 Here's my perl.conf (sourced by httpd.conf) start LoadModule perl_module modules/mod_perl.so PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myffon second thought, tryPerlSwitches -I/home/bruce/public_html/ffball/myfforPerlSwitches -Mlib=/home/bruce/public_html/ffball/myffinstead of PERL5LIB--Geoffwww.bluewolverine.com
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Apache::Reload and INC path partialy working

2003-08-14 Thread Bruce Tennant

I'm trying to do some development work with mod_perl and find restarting the server a pain. So I setup Apache::Reload, but it doesn't seem to want to see my local devel directory all the time.Here's my settingsApache/2.0.40mod_perl-1.99_7Linux 2.4.20-8 (RedHat9 I think)Here's my perl.conf (sourced by httpd.conf)startLoadModule perl_module modules/mod_perl.soPerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myffPerlSetVar INC /home/bruce/public_html/ffball/myffPerlModule Apache2PerlModule Apache::ReloadPerlInitHandler Apache::ReloadPerlSetVar ReloadDebug On# PerlSetVar ReloadModules "FFMgr::*"# This will allow execution of mod_perl to compile your scripts to# subroutines which it will execute directly, avoiding the costly# compile process for most requests.#Alias /perl /var/www/perlDirectory
 /var/www/perl SetHandler perl-script PerlHandler ModPerl::Registry::handler PerlOptions +ParseHeaders Options +ExecCGI/DirectoryDirectory /home/bruce/public_html FilesMatch "\.(pl|pm|cgi)$" SetHandler perl-script PerlHandler ModPerl::Registry::handler PerlOptions +ParseHeaders Options +ExecCGI /FilesMatch/Directoryend---The PerlSetVar INC line was a futile test.Here's the problem. It seems that the reload module is finding the local modules okay as it shows up in the error_log as checking the mtime. But when they do change, it dies when it tries to reload them and says they aren't in the @INC path.So it's like it is half working.Has anyone else seen
 this problem and have a possible fix?Thanks-Brucewww.bluewolverine.com
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Geoffrey Young


Bruce Tennant wrote:
I'm trying to do some development work with mod_perl and find
restarting the server a pain.  So I setup Apache::Reload, but it
doesn't seem to want to see my local devel directory all the time.
Here's my settings
Apache/2.0.40
mod_perl-1.99_7
please upgrade to the latest CVS version and try again - 1.99_07 is very old.


Linux 2.4.20-8 (RedHat9 I think)

Here's my perl.conf (sourced by httpd.conf)
start
LoadModule perl_module modules/mod_perl.so

PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myff

Here's the problem.  It seems that the reload module is finding the
local modules okay as it shows up in the error_log as checking the
mtime.  But when they do change, it dies when it tries to reload
them and says they aren't in the @INC path.
ok.  can you show us @INC before and after the reload attempt?  I'm curious 
as to whether PERL5LIB is being properly added to @INC for the request time 
interpreters.

also, does it fail if you reload modules that are not in @INC?  for 
instance, try touching CGI.pm or something in your site_lib and watch the 
debug messages.

So it's like it is half working.

Has anyone ! else seen this problem and have a possible fix?
we'll find a fix if we can isolate and reproduce the problem, don't worry :)

--Geoff



Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Geoffrey Young

Here's my perl.conf (sourced by httpd.conf)
start
LoadModule perl_module modules/mod_perl.so

PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myff
on second thought, try

PerlSwitches -I/home/bruce/public_html/ffball/myff

or

PerlSwitches -Mlib=/home/bruce/public_html/ffball/myff

instead of PERL5LIB

--Geoff




Fwd: Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Bruce Tennant
Forwarding message as I didn't realize I was missing the list.
Geoffrey Young [EMAIL PROTECTED] wrote:

Date: Tue, 12 Aug 2003 14:18:37 -0400From: Geoffrey Young <[EMAIL PROTECTED]>To: Bruce Tennant <[EMAIL PROTECTED]>Subject: Re: Apache::Reload and INC path partialy workingok, I'll take a look at this.please repost to the list, though, so others can help and your results are recorded.and no, there is no rpm package for the latest CVS version that I know about - you'll need to compile it yourself (which is easy, don't worry :)--GeoffBruce Tennant wrote: The INC is correct (it has the new path in it).  But if I touch a file in the added directory, it detects the file as  being changed (uses proper INC), but seems to not find it when it is  trying to reload it (sees base INC).  I tried another thing, use a startup.pl file, it seems to work 90% of  the time.
 Sometimes when a file is changed or reloaded, one of the sub  httpd process will say it knows nothing about the reloaded module. But  I can work w/this as a hitting reload on the browser fixes this.  Here's the INC when no module is changed: /home/bruce/public_html/ffball/myff  /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache2  /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0  /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi  /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl  /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi  /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .  Here's the INC after I touched Apache/DBI.pm in site_perl and it was  reloaded (seen in log)  /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache2  /usr/lib/perl5/5.8.0/i386-linux-thread-multi
 /usr/lib/perl5/5.8.0  /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi  /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl  /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi  /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl  /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .  It would seem it dropped the perl5lib line.  Oh also, if I remove the "use lib" line in my top file, none of my local  modules will load. I though the PERL5LIB was suppose to add to the base  INC and make it so you didn't need to use "use lib". Maybe this is the  root of the problem.  But as I mentioned, if using a startup script w/PerlRequire, the reloads  seem to work.  Do you know if there's a new rpm package for mod-perl (RH9)?  */Geoffrey Young <[EMAIL PROTECTED]>/* wrote:  
  Bruce Tennant wrote:  I'm trying to do some development work with mod_perl and find  restarting the server a pain. So I setup Apache::Reload, but it  doesn't seem to want to see my local devel directory all the time.   Here's my settings  Apache/2.0.40  mod_perl-1.99_7  please upgrade to the latest CVS version and try again - 1.99_07 is very old.Linux 2.4.20-8 (RedHat9 I think)Here's my perl.conf (sourced by httpd.conf)  start   LoadModule perl_module modules/mod_perl.so   PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myffHere's the problem. It seems that the reload module is finding the  local modules okay as it shows up in the error_log as checking the 
 mtime. But when th! ey do change, it dies when it tries to reload  them and says they aren't in the @INC path.  ok. can you show us @INC before and after the reload attempt? I'm curious as to whether PERL5LIB is being properly added to @INC for the request time interpreters.  also, does it fail if you reload modules that are not in @INC? for instance, try touching CGI.pm or something in your site_lib and watch the debug messages.So it's like it is half working.   Has anyone ! else seen this problem and have a possible fix?  we'll find a fix if we can isolate and reproduce the problem, don't worry :)  --Geoffwww.bluewolverine.com   Do you Yahoo!?
 Yahoo! SiteBuilder  - Free,  easy-to-use web site design softwarewww.bluewolverine.com
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Ron Savage
Hi Folks

Fascinating to see this on a non-Windows box.

Reloading modules after they have been editied, eg httpd like so:

PerlModule Apache::Reload
PerlInitHandler Apache::Reload
PerlSetVar ReloadAll Off
PerlSetVar ReloadModules CGI CGI::Application ... Sweep::*

works about 99% of the time under Win2K and XP. I've been assuming
it's a Windows thing. Perhaps the problem lies deeper?

Server Version: Apache/2.0.46 (Win32) mod_perl/1.99_10-dev
Perl/v5.8.0
--
Ron Savage, [EMAIL PROTECTED] on 14/08/2003. Room EF 312
Deakin University, 221 Burwood Highway, Burwood, VIC 3125, Australia
Phone: +61-3-9251 7067, Fax: +61-3-9251 7604
http://www.deakin.edu.au/~rons