Except for the extra/missing paren, some redundancy, your code looks fine to me. What's your exact error message? Maybe a DBI *driver* is missing, as opposed to DBI itself.
my $use_dbi = eval ' use DBI; use DBD::mysql; 1 # or undef if the above fails. '; if ($use_dbi) { ... } else { print "NO DBI\n"; } ... do other stuff ...
In reply to Re: DBI detector?
by ikegami
in thread DBI detector?
by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |