in reply to Re^2: Using arbitrary packages
in thread Using arbitrary packages

Perhaps you should use
do $filename;
and have actual real Perl in the file that looks like
use Module1; use Module2; function1(); function2();
it will run faster. No point in inventing your own mini perl parser. Especially if in the future you decide you need to start adding arguments to your functions etc.