in reply to Re: Detecting modules in use?
in thread Detecting modules in use?

Sounds awesome! (downloading it as I write this)

But what kind of an effect would this have on apps that load DBI multiple times? Would they all just be "skipped"? Ie:
eval { use DBI; require 'intranet.pl'; };
and having the code mentioned in my first post inside intranet.pl... I would have two or more 'use DBI' calls consecutively. What kind of penalty (if any) would I suffer from coding this way?

Replies are listed 'Best First'.
RE: RE: Re: Detecting modules in use?
by lhoward (Vicar) on May 29, 2000 at 08:01 UTC
    If you're perl CGI already has a "use Foo;" in it there is no penalty (or even a noticeable effect) from having the module pre-loaded in the mod_perl config.

    With a cache of DB handles provided by Apache::DBI you would still probably notice a big performance increase even if your authentication sunroutine has its own DBI connect/disconnect calls. I've several times had to write program that had multiple DBI connections open and never had a problem with any adverse effects from it.