As they are providing the same method, their input and output must be similar, so why not adding an extra input parameter which can be used as a switch inside the one combined module to differentiate accordingly?
And as you are calling your eval in a while loop, there is good chance that after a few runs through the while loop, you have loaded all your different modules anyhow.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In reply to Re: Dynamic use/require
by CountZero
in thread Dynamic use/require
by Elijah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |