maverick has been working on a "solution" for this for
quite some time now. By "solution" i mean that the ability
to make changes to a mod_perl module and see those changes
without having to restart the webserver is just
one feature of what he is building. The project is called
SiteVoodoo and as soon as he, myself, and
msemich can
find the time we will package the whole kit and kaboodle
up (possibly for CPAN and/or Freshmeat). Unfortunately for
the public, each of us already knows how to create powerful
websites with SiteVoodoo, so we have no flame under our
seats to motivate us to make it user-friendly. ;)
In the meantime, you can get a tar ball of the source code
here.
(And here is an example site that runs on
SiteVoodoo. Note that it uses only a few of SiteVoodoo's
features.) Hopefully maverick will come along and help
explain how module reloading works, but i can tell you that
it is no trivial matter. First, the notion of be able do
such in a production environment is asking for trouble (performance-wise and possibly security-wise), so
Voodoo defines a 'devel' mode (via a configuration file
located in Apache's conf dif) which allows immediate changes
in the code to show up without restarting the web server.
Each of us (mav, semich, and myself) tends to work with at
least two machines, one for development and one for
production. The production machine has a different config
file than the development machine, but the code base for the
two machines is mostly identical (the difference being any
new changes or bug fixes on the devel box).
That's really about all that i can tell you about how
module reloading works in Voodoo (and that was not a lot),
but i can show you how to install Voodoo, and i assure you,
it's really cool stuff! I did grep for
Apache::Reload in Voodoo's source and found no
matches ... methinks
maverick might have re-invented a
wheel. ;)
Oh yeah, almost forgot ... the mod_perl
Developer's Cookbook has been an invaluable addition to my
library. The relevent recipe is 8.1, Recognizing Handler
Changes, and the recommended solution is to use Apache::Reload instead of tampering directly with
%INC.
jeffa
Random Voodoo Features:
- auto reloading modules (in devel mode)
- clean seperation of code and markup (uses HTML::Template)
- manages user sessions (uses Apache::Session)
- easy to write authentication/authorization checks
- view debug info in browser (in devel mode)
- provides persistant database connection (via Apache::DBI)
- unique database abstraction - Voodoo writes code to add,update,delete records from your tables
- built in record searching and pagination for the results
- themeable
- 100% mod_perl
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.