Beau E. Cox wrote: > Hi - > > I thought I had a grip on this, but... > > Most of my reading (Camel, perldocs, etc) suggest that > 'require Foo::Bar' should be used instead of 'use Foo::Bar' within > modules. I am in the process of building a series of > modules for a project and am having problems with > 'require'; does whoever uses a module that requires Foo::Bar > have to use Foo::Bar (I think so)? So that means changing > the test scripts, etc. > > Is it 'bad' to just say 'use Foo::Bar' in the modules that > need it? Will I get multiple copies if I do that? From a > lazy programmer's viewpoint, saying 'use' is the way to go... > > Can someone help enligthen me?
Hi Beau. 'use Module' everywhere necessary is exactly what you should do. 'require Module' essentially does 'do "Module.pm"', but only if the file has not already been included. 'use Module' operates at compile time. It does 'require Module' and then calls Module::import to fetch the identifiers that Module exports. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]