Piers Harding


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;


.... later during the loop

 if ( Jabber::Reload::haveModule(q|Some::Module|) ){
 } else {

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