in reply to How do I curtail the noise

Don't load DBD::ODBC twice. On Windows this can happen inadverently by having two statements like:

use DBD::Odbc; use dBd::ODBC;

or , in the case of DBI, having two connection strings that are not uppercase:

dbi:ODBC:...

Replies are listed 'Best First'.
Re^2: How do I curtail the noise
by talexb (Chancellor) on Jul 14, 2010 at 14:33 UTC

    This isn't something I've looked into, but doesn't Perl have some mechanism to prevent loading the same module twice? I know I've seen something like this in C #include files -- one of the first lines is an #ifdef that checks to see if this file has been included already, and if so, skips the entire file.

    As a corollary, why would a developer want to load a module twice?

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      Perl uses %INC to keep track of require'd files. On case-insensitive file systems, you can load the same file under more than one name. For example:

      use Strict;

      loads strict.pm but never calls its import method.

        And is it useful to be able to have a strict.pm?

        I note that putting

        use Carp; use carp;
        in a module isn't flagged by perlcritic. Should this be an error, either of style or of syntax?

        Alex / talexb / Toronto

        "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds