On Wed, Jan 11, 2006 at 11:35:43AM +1030, Jillian Vogel wrote:
> Hello,
>
> I had some trouble running the tests provided for DBD::Oracle, because we have
> many datastores under a single installation, which means I need to be able to
> customize the datastore string used in connect(). Because DBI uses an
> environment variable for this, DBI_DSN, it's preferable that the tests default
> to this behavior as well.
>
> Attached is my patch; please let me know if there's any problems with it?
Thanks for the patch.
I'm not comfortable just using $ENV{DBI_DSN} since in some places it may
be set to a non-Oracle database.
So how about compromise: add a t/test_utils.pl file that includes a function
(say oracle_test_dsn()) that returns $ENV{ORACLE_DSN} if set, else
$ENV{DBI_DSN} if set AND matches /^dbi:Oracle/i, else 'dbi:Oracle:'.
Then require t/test_utils.pl and use oracle_test_dsn() in each test script.
Please base the patch on 1.17 release candidate 1:
http://www.data-plan.com/public/DBD-Oracle-1.17.tar.gz
(I'm close to posting release candidate 2 but your patch should still
apply without problems.)
Thanks again Jill.
Tim.