in reply to Re^2: "use" vs "require" vs "do"
in thread "use" vs "require"
Exactly. require will mysteriously fail if two modules need to use the file. It's a good habit to use do instead. You never know what someone will do in the future.
There's another reason. Using do over require conveys more information to the reader. Since modules must not be loaded using do, it's safe to assume something loaded using do is not a module. Using require wouldn't be as clear.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: "use" vs "require" vs "do"
by Anonymous Monk on Jan 02, 2012 at 00:21 UTC |