in reply to better ways than eval to dynamic load a module
This doesn't answer the important part of your question, but if you want to get rid of the eval, then you could use UNIVERSAL::require to do that. It will make your code look a little bit nicer and more readable without that eval in there.
Of course the eval is still done, it is just hidden behind a module. Also, UNIVERSAL::require does not do any validation on the module name, so you will still need to be careful about what you pass in as a module name.
So really it won't help you much besides removing the eval from your code ;)
- Cees
|
|---|