Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Working on a new DBD::SQLite release

by andreas1234567 (Vicar)
on Apr 03, 2009 at 12:04 UTC ( [id://755245]=note: print w/replies, xml ) Need Help??


in reply to Working on a new DBD::SQLite release

(I would like to discuss this issue here before updating the bug on rt.cpan.org)

'make test' fails when DBI_DSN is not DBD::SQLite:

  1. Does it make sense to honor DBI_DSN during make test?
  2. Does it make sense to honor DBI_DSN during make test if it doesn't match /^DBI:SQLite/.
I have my DBI_DSN often set to DBI:DB2:instance_name, which means 'make test' will fail if it is honored. I don't know if DBI_DSN is commonly used.

In case 1. a fix would be simply

$ diff t/lib.pl.cp t/lib.pl 36,37c36 < $test_dsn = $ENV{'DBI_DSN'} < || "DBI:$dbdriver:dbname=$table_dir"; --- > $test_dsn = "DBI:$dbdriver:dbname=$table_dir";
In case 2. a fix could be
$ diff t/lib.pl.cp t/lib.pl 36c36 < $test_dsn = $ENV{'DBI_DSN'} --- > $test_dsn = $ENV{'DBI_DSN'} && $ENV{'DBI_DSN'} =~ m/^DBI:$mdriv +er/
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

Replies are listed 'Best First'.
Re^2: Working on a new DBD::SQLite release
by Corion (Patriarch) on Apr 03, 2009 at 14:32 UTC

    I don't see much reason to honor $ENV{DBI_DSN} at all. Case 2 would at leave others the possibility to change which database tests are run against, but as at least some of the tests are destructive, I consider the potential risk to be far higher than the potential gains in running the SQLite tests. So unless somebody comes up with a convincing argument when $ENV{DBI_DSN} can be of help during testing a (potentially unstable or disastrous) new version of DBD::SQLite, it'll go out. Personally, I'm even in favor of trying :memory: databases instead of using temporary files, because a memory database leaves nothing behind if the test crashes.

    Update: In fact, after looking at the code, that part has already been removed, even though the blamelog doesn't tell me exactly where.

      Yes, it seems to be fixed in trunk.
      --
      No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://755245]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-26 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found