in reply to Require in modules...?
Anyway, that's to say that you can usually use require wherever you want.
Now, it's probably better to use use instead, since use directives are processed earlier, and all you have to do to convert "data_defs.pl" to a useable module is to to rename it to "data_defs.pm" (that name is contrary to conventions but it'll work all the same).
None of this has anything to do with OO - it's just a code loading mechanism - and also, you probably should not use Switch, since it can really mess up your code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Require in modules...?
by ikegami (Patriarch) on May 10, 2009 at 03:06 UTC |