in reply to Re: Loading a module at runtime...
in thread Loading a module at runtime...

I've figured it out, though the solution doesn't make sense according to my understanding. Here is what now works:
   eval "require $module; import $module";
   eval "$module->run()";
What's odd is that the class::method() syntax is usually used for class method invocation, whereas $object_ref->method() is used after you've already instantiated the class/module.
In my case above, I haven't instantiated $module at all. If $module is Foo::Bar, then, after interpolation, it looks like Foo::Bar->run()
Oh, well. It's odd (to me, at least), but it works. Michael
  • Comment on SOLVED: Re: Loading a module at runtime...