Hi!

On Fri, Feb 27, 2004 at 09:35:11AM +0000, Mark Maunder wrote:

> In a perl handler, I'm doing a stat on a module file, and if the file
> has been modified, I'm reloading the module by slurping the file into a
> scalar and eval'ing it. The module has a few subs and global vars that
> have defaults set on initialization. I have about 20 modules I'm doing
> this with (all subclasses of a parent generic module). I'm assuming the
> subs will be overwritten in the module namespace, and global vars
> re-initialized with their default values. 
> All instances of objects created from these modules/classes are
> destroyed at the end of each request, and this reload happens at the
> beginning of a request before objects are instantiated. 
> 
> Anything wrong with doing this? It seems a little too easy! :)

It might even be easier:
use Apache::Reload;


-- 
-> Austrian Perl Workshop - 20th-22nd May - http://vienna.pm.org/ <-

#!/usr/bin/perl                               http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to