in reply to %INC and eval use

use already skips loading the module if it is in %INC (importing does happen, but IIRC, this specific module doesn't export anything), so why test %INC manually?

See require if it must happen at runtime.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Replies are listed 'Best First'.
Re: Re: %INC and eval use
by bronto (Priest) on Mar 10, 2004 at 16:30 UTC

    To avoid evaling more than once; AFAIK evals are expensive, aren't they?

    Ciao!
    --bronto


    The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
    --John M. Dlugosz

      To avoid evaling more than once; AFAIK evals are expensive, aren't they?

      Yes, but why do you use eval in the first place? require is the runtime module loader.

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }