in reply to Inheritance and Container Classes and use/require
Well, multiple use and require aren't a problem... from perldoc -f require: "Note that the file will not be included twice under the same specified name. " So long as you use the same name, it isn't a problem. (Using different names would probably only come up with symlinks and suchlike.) Also, in general, evaling code that's mostly sub definitions isn't normaly a problem.
If you want to have the effect of "use Foo;" at runtime, use "require Foo; Foo::import;", as perldoc -f use says.
Thanks,
James Mastros,
Just Another Perl Scribe
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Inheritance and Container Classes and use/require
by merlyn (Sage) on Jan 03, 2002 at 02:59 UTC |