Hola
What is the preferred way of allowing a driver to use either
DBI::PurePerl or DBI?
Module::Build does not support alternative requirements
(one-or-the-other), but it does allow:
=================================
requires => {
'DBI::PurePerl' => 0.0,
},
recommends => {
'DBI' => 0.0,
},
=================================
In practice this results in circa 70% of smoke testers running the
module with DBI installed.
The remaining 30% however, fails with this error:
=================================
# Failed test 'use DBI;'
# at t/00-load.t line 4.
# Tried to use 'DBI'.
# Error: Can't locate DBI.pm in @INC (@INC contains:
[...snip...]) at (eval 4) line 2.
# BEGIN failed--compilation aborted at (eval 4) line 2.
=================================
I could easily change the "use DBI" line into a conditional "require
DBI::PurePerl" during BEGIN, but this does not fix the root of the
problem, namely that the PurePerl version of DBI never gets installed.
Being able to install DBI::PurePerl is unfortunately kind of critical
to being able to use it in any way whatsoever..
Any good ideas?