Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Modperl::PerlRun Reload modules

by mkirank (Chaplain)
on Aug 03, 2009 at 22:08 UTC ( #785570=perlquestion: print w/ replies, xml ) Need Help??
mkirank has asked for the wisdom of the Perl Monks concerning the following question:

I am working on migrating some legacy code from cgi to run under Modperl::Perlrun. Perlrun reloads the cgi scripts for each requests but the perl modules are still cached. We ran into an issue wherein there were some modules that created closures and since these modules were cached we could not run them under modperl::perlrun.

In the long run we would like to clean up these modules , for now we want them to run under Perlrun without making any change to the modules

I looked around to see if there was a way to reload modules on each request but did not come across any way to do this.

I looked at the way Apache::Reload reloads modules and came up with a way that seems to be reload the module each time .

# In httpd.conf PerlCleanupHandler "sub { delete $INC{'Dirty.pm'}; ModPerl::Util +::unload_package('Dirty'); require 'Dirty.pm'; }"
Am I missing something here or Is there a better way to reload the required modules on each request under PerlRun

Thanks

Comment on Modperl::PerlRun Reload modules
Download Code
Re: Modperl::PerlRun Reload modules
by Anonymous Monk on Aug 04, 2009 at 04:36 UTC
    In the long run we would like to clean up these modules , for now we want them to run under Perlrun without making any change to the modules

    Not gonna happen.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://785570]
Approved by broomduster
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2014-08-20 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (105 votes), past polls