Hi all,

Getting my feet wet with mod_perl 2 and I'm having trouble reliably testing programs
due to the fact that files/modules seem to be reloading only when Apache deems suitable.

What I'm looking for is a way of having Apache completely reload every component of a particular
program when a change is written to disk. Not just the modules - also the program files calling the modules.
A sort of "refresh all" if you will, without having to restart the web server for every simple change.
For example in this simple set-up:
index.pl -> program called on from web
testmod.pm -> module loaded by index.pl containing various subroutines and some configuration variables which have been exported to index.pl

If I write a change to testmod.pm it's seemingly ignored for an undeterminable period.
Using Apache2::Reload however, testmod.pm will be reloaded. Unfortunately, the configuration variables already exported to index.pl are not updated, probably because Apache sees index.pl as being unchanged.

When updating non-mod_perl systems I'm used to making arbitrary changes and seeing the results immediately, and it would make development a lot simpler to have this comfort of "what you see is the current state of the program",
instead of some half in-memory/on disk version when making these incidental changes.


Any suggestions?

In reply to Reload all files in mod_perl testing environment by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.