in reply to Re: Loading all files in a dir with use via for loop
in thread Loading all files in a dir with use via for loop

Oops, the dangers of cut-n-paste and typing without thinking ...

You don't need the eval, in fact. Ignore that, as require works fine on a variable. The code I pasted was taken from code that needs to catch an attempt to load a non-existent module (and should be wrapped in an if statement)

If you know the modules are present, just use the bare 'require $plugin'.

Steve Collyer

  • Comment on Re^2: Loading all files in a dir with use via for loop