Kathryn Cassidy wrote:
> Now the module will need to use the DBI module in order to connect to
> the database, but the scripts that it will be called from will also
> usually use DBI.  Does this mean that the whole DBI module will be
> imported twice for each script which uses this module?  Or does perl
> only load a module if it's not already been imported?

The latter. See `perldoc -f use` and `perldoc -f require`. 'use' builds on
'require', and 'require' checks to see whether a module has already been
loaded. So you should get the overhead of loading and parsing DBI.pm only
once, though DBI->import gets called multiple times: once for each 'use'
(but that shouldn't be a problem).

Cheers,
Philip

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to