Jabber::Reload - reload modules
Reload is a helper module to reload modules that have changed during run time.
it is a bit of a copy of Apache::Reload, but not nearly as sophisticated, it just check the time stamp on the file of a module that is registerd, whacks the INC entry for it and then reloads over the top.
in the main of your program:
use Jabber::Reload; Jabber::Reload::register(q|Some::Module|);
.... later during the loop
if ( Jabber::Reload::haveModule(q|Some::Module|) ){ Jabber::Reload::reload(q|Some::Module|); } else { Jabber::Reload::loadModule(q|Some::Module|); }
also - to ensure that modules loaded and registered by Reload are properly available in the current scope, when using JabberReload::loadModule(), you must put the load in a BEGIN {} block like so:
use Reload; BEGIN { Jabber::Reload::loadModule("TTest"); };
so that you can still address methods like this: TTest::handler;
as opposed to having to do this: TTest->handler;
Piers Harding - after a lot of plagarism
To install Jabber::mod_perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jabber::mod_perl
CPAN shell
perl -MCPAN -e shell install Jabber::mod_perl
For more information on module installation, please visit the detailed CPAN module installation guide.