Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > DBI install failed

Thread Tools

DBI install failed

Posts: n/a
Hi all,

Apologies for the long posting, but the details are important (I
think )...

I'm trying to install the DBI module via cpan and it all goes fine apart
from one minor test. To me there seems to be a problem with the test,
but before I file it as a bug would you confirm or deny my thoughts?

The test is no. 228 in t/10examp and the output is:

ok 224 - The object isa DBI::st
ok 225
ok 226 # skip # dump_results test skipped: unable to
open /homes/chris/tmp/dumpcsr.tst: Permission d
ok 227 # skip # dump_results test skipped: unable to
open /homes/chris/tmp/dumpcsr.tst: Permission d
not ok 228 - Remove /homes/chris/tmp/dumpcsr.tst
ok 229 - Actually gone

The code snippet which generates the error is in this block:

# dump_results;
my $sth = $dbh->prepare($std_sql);

isa_ok($sth, "DBI::st");

if ($haveFileSpec && length(File::Spec->updir)) {
} else {

my $dump_dir = ($ENV{TMP} ||
my $dump_file = ($haveFileSpec) ?

File::Spec->catfile($dump_dir, 'dumpcsr.tst')
($dump_file) = ($dump_file =~ m/^(.*)$/); # untaint

skip "# dump_results test skipped: unable to open
$dump_file: $!\n", 2 unless (open(
DUMP_RESULTS, ">$dump_file"));
ok($sth->dump_results("10", "\n", ",\t",
ok(-s $dump_file > 0);

is( unlink( $dump_file ), 1, "Remove $dump_file" ); <-- ERROR
ok( !-e $dump_file, "Actually gone" );


It seems that the code fails to create the dump_file which is 'ok', but
then when it tries to delete it and fails that is 'nok'. My issues are:

1. If the failure of the file create is ok then it shouldn't try to
delete it.
2. My $HOME/tmp permissions are 700 so that's the cause of the problem.
The test should really check for this.
3. This is such a minor error that the installation DBI shouldn't fail
because of it.

Has anyone else come across this or is this particular to my setup?
Again TIA

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DBI Mysql storing DBI:binary, trouble with character 26 Jerome Hauss Ruby 0 10-13-2004 03:04 PM
DBI and DBI::Oracle packages configuration ulloa Perl 1 07-22-2004 05:52 PM
dbi install failed thomas eric Ruby 4 12-14-2003 10:38 PM
DBI problem : How can I load quickly one huge table with DBI ??. Tim Haynes Perl Misc 3 09-13-2003 03:43 AM
Mason, DBI, and DBI::Pg Asby Perl Misc 0 07-24-2003 09:04 PM