DBI package problem?

[email protected]
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.