in reply to Re: DBI detector?
in thread DBI detector?

Why did you switch from eval "use DBI" to eval "require DBI"? Both occur at run-time here (since the eval is executed at run-time here), but require doesn't import the symbols that use would import.

Replies are listed 'Best First'.
Re^3: DBI detector?
by davidrw (Prior) on Apr 04, 2006 at 00:30 UTC
    mostly cause require docs use the eval "require DBI" form as an example, and so i was pretty confident that would work w/o trying it, and the critical piece for OP was to remove the load-time 'use' call .. i also vauguely remember having problems once doing a eval "use Foo" once but really can't remember what (possibly {probably??} totally unrelated .. was a load order issue maybe??) .. so, in summary, no real good reason :)
      Maybe you had problems with eval { use Foo; }. That won't work because the block of eval BLOCK is compiled when the eval is *compiled*. eval "use Foo;" is different because the expression in eval EXPR is compiled when the eval is *executed*.