go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Just to respond on your first question. Yes, it is useful to load all of the modules in a directory. As Aristotle mentioned it is nice if you are working on a plugin system. I have seen this used particularly in IRC bots.
You do NOT do require XML::*, but rather you require all of the files in a program specific directory. Normally once you require all of the modules, you run a setup routine in each file that generates hooks. Then in IRC as an example, when an event occurs all of the associated hooks in your hash are executed. ex. You ask the bot what time it is. Clock module gets the local time of the requestor. if smart *ss module loaded, generate smart *ss responce if normal module loaded, generate normal responce. Another nice benifit is you can dynamicly load and unload the modules without having to shutdown the bot. So you can administer the bot remotly. Zero In reply to Re: Being helpful to a fault?
by Zero_Flop
|
|