optional 'require'

Struan Donald lpm at exo.org.uk
Wed Dec 21 15:25:25 GMT 2005


* at 21/12 15:21 +0000 Dirk Koopman said:
> 
> Therefore I want to test for the presence of DBI and at least one true
> SQL engine. However it is vital that this test is non destructive and
> the app carries on as normal if these are not available.
> 
> I have tried various styles of: eval { require DBI; }; and eval "require
> DBI"; so far without adequate success.
> 
> Can anyone help me?  

Mmmm, that's weird as eval { require DBI; }; works here and it's what
I've always used in the past.

Seems to work on 5.6.1 and 5.8.7 as well.

S


More information about the london.pm mailing list