Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Mason subroutine not relefecting changes

by Paladin (Priest)
on Mar 13, 2007 at 22:41 UTC ( #604701=note: print w/ replies, xml ) Need Help??


in reply to Mason subroutine not relefecting changes

IIRC, it's not Mason causing the problem, but mod_perl, which caches the Perl to make things run faster. In my limited experience with Mason/mod_perl, what I do in this kind of case is just restart Apache, which clears the cache. There may be a better way, but I know this one works.


Comment on Re: Mason subroutine not relefecting changes
Re^2: Mason subroutine not relefecting changes
by Anonymous Monk on Mar 13, 2007 at 22:48 UTC
    Thanks for your response. However, this subroutine is part of a shopping cart and will be called numerous times. I can't keep restarting/reloading Apache. Is there a better way?
      You only have to restart after updates of the code. If you can't do that you shouldn't deploy work in progress to a production server.

      Anyway, depending on your version of mod_perl; for mod_perl 1.X you can use Apache::StatInc which will reload modules if they've been changed (this can mess up stuff if you have cached data/dependencies, but for simple modules it should work).

      For mod_perl 2.X (and apparently also, 1.X) you can use Apache::Reload / Apache2::Reload , which does more or less the same.

      updated: fixed link to apache::reload

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2015-07-02 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls