| Previous · Next | |
| User | Message |
|
fishingfan
|
Date: 9/19/2006 6:10 am · Subject: Stop & Start · Rating: 1
Is there a way of getting the WebGUI to pick up new asset code without having to stop/start the wre ? Currently I am changing a bit of code, then stop / start webgui to make it pick it up the change. Or is this the price of mod_perl on a dev machine ? Cheers Chris |
| Back to Top |
Rate [ | ]
|
|
crythias
|
Date: 9/19/2006 7:55 am · Subject: Re: Stop & Start · Rating: -3
well... there is Apache2::Reload, though I don't know what the performance hit will be. I'd suggest it not remain in production. -- |
| Back to Top |
Rate [ | ]
|
|
crythias
|
Date: 9/19/2006 7:58 am · Subject: Re: Stop & Start · Rating: -8
Actually, if you use the PerlSetVar ReloadTouchFile /tmp/reload_modules Option, you could leave it in and probably not take the big hit of constantly monitoring :). -- |
| Back to Top |
Rate [ | ]
|
|
fishingfan
|
Date: 9/19/2006 10:50 am · Subject: Re: Stop & Start · Rating: 11
Hmmm This looks good. Not sure how to get it working yet. (am using the windows wre on a laptop for this) Installed the Apache2:Reload via ppm Added the following statements to httpd.modperl.conf PerlModule Apache2::Reload after the existing line PerlRequire "c:/data/WebGUI/sbin/preload.perl" (line 179). Added use Apache2:Reload to my Asset/Wobject. Changed the following in preload.perl #my $use = "use ".$package." ()"; after seeing the info on this page But it still does not seem to pick up the changed code. Any ideas as to what I may of missed ? Cheers Chris |
| Back to Top |
Rate [ | ]
|
|
xdanger
|
Date: 9/20/2006 2:33 pm · Subject: Re: Stop & Start · Rating: 5
There was a discussion about this on the old developer list: https://mail.plainblack.com:8443/Lists/webguidev-old/Message/3313.html?Language= |
| Back to Top |
Rate [ | ]
|
|
fishingfan
|
Date: 9/22/2006 10:22 am · Subject: Re: Stop & Start · Rating: -8
Thanks matink and xdanger that's exactly what I was looking for. On the windows wre v1.0 I did the following to get the Apache2::Reload to work for a development machine. I changed the www.example.com.modperl file (C:\data\wre\etc\www.example.com.modperl) to look like below Basically it comments out the PerlInitHandler Webgui and adds the two lines with Apache2::Reload in them. Then restart your wre and it works! <VirtualHost *:81> One oddity that did occur in the bit of code am using have the following error catching code that causes an error when using the Reload thingy on the reload of a changed module - not a prob as I can comment out when developing anyway. Complains in the apache error log of a Global symbol "%session" requires explicit package error. Here's the bit of code it hates with Apache2::Reload working (otherwise it's been fine) if($session{env}{MOD_PERL}) { I guess the $session variable is not available until you restart the wre again.
Chris |
| Back to Top |
Rate [ | ]
|
|
martink
|
Date: 9/20/2006 12:08 pm · Subject: Re: Stop & Start · Rating: -2
You can set up the wre as dev instance. This will include Apache2::Reload in the httpd.conf, which automatically refreshes change perl modules. If you installed the wre as a dev box however, this module is not enabled. You can still do that of course. See http://search.cpan.org/~pgollucci/mod_perl-2.0.2/docs/api/Apache2/Reload.pod. But keep in mind that this will slow down your system, and that it should not be used on a production machine. Martin fishinginwessex@hotmail.com wrote: > fishingfan wrote: > > Is there a way of getting the WebGUI to pick up new asset code without > having to stop/start the wre ? > > Currently I am changing a bit of code, then stop / start webgui to > make it pick it up the change. Or is this the price of mod_perl on a > dev machine ? > > Cheers > > Chris > > CA-Dev.co.uk <http://www.ca-dev.co.uk/> > > > > http://www.plainblack.com/webgui/dev/discuss/stop--start > > Unsubscribe > <http://www.plainblack.com/webgui/dev/discuss?func=unsubscribe> > > ------------------------------------------------------------------------ > > > > |
| Back to Top |
Rate [ | ]
|