in reply to eval "require $module" vs. Module::Load::load($module)
If you consult perldoc -f require you will see that require will behav +e differently when given a bareword or a string. In the case of a string, require assumes you are wanting to load a fil +e. But in the case of a bareword, it assumes you mean a module. This gives nasty overhead when you are trying to dynamically require m +odules at runtime, since you will need to change the module notation +(Acme::Comment) to a file notation fitting the particular platform yo +u are on.
Actually I have no clue if that's right, but it sounds like it answers your question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: eval "require $module" vs. Module::Load::load($module)
by Corion (Patriarch) on Aug 17, 2007 at 14:21 UTC | |
|
Re^2: eval "require $module" vs. Module::Load::load($module)
by djerius (Beadle) on Aug 17, 2007 at 14:30 UTC |