And that finally explains why in some of my scripts using the Win32::Lanman
module I have to do a 'require Win32;' instead of a 'use Win32' if I don't
want to get warning messages about conflicting constants.  It's always been
one of those "I got it working, I'll figure out why when I get some extra
time" issues.  I love it when the light bulb finally comes on.

-----Original Message-----
From: Dan Muey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 9:37 AM
To: Rob Dixon; [EMAIL PROTECTED]
Subject: RE: Multiple use of same module question



So I don't have to worry about doing use Module; or 
varitions of it like use Module stuffdealy; more than once causing
performance issues?

Great, thanks that's load off!

Dan

> 
> Hi Dan
> 
> Dan Muey wrote:
> > Here's something I've been wondering....
> >
> > What kind of performance issues are there if you do a 'use' on the 
> > same module in the same script twice or more?
> 
> I posted the following earlier today in response to a question of
> Beau's:
> 
> Rob Dixon wrote:
> > 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]
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to