My solution uses file::find to go out and search for modules, then create a new instance of them.
The literal idea is to be able to create new modules to do different tasks, so you can bounce the server, and it will pick up the new modules automatically. Each module has the same method names, so the main object doesnt have to be aware of any extra method names..
Anyways, back to the main point, the code snippet i settled on puts a new instance of an obects into $self, based on a variable passed to the method.
I'm not sure why this would be a maintaince nightmare as merlyn suggested, as the code is self explanitory and the "unknown" modules are in a central repository - perhaps i've missed the point somewhere along the way...
In reply to Re: dynamically creating variables named after the contents of an array
by Ryszard
in thread dynamically creating variables named after the contents of an array
by gnu@perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |