[CDBI] t/15-accessor.t and DBD::SQLite

Nathan Speed <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Hello,

I am getting a failing test when I try to install Class::DBI through 
CPAN. The test is normally skipped unless DBD::SQLite is installed, 
but I wanted to use Class::DBI with SQLite. I get essentially the 
same results on a Fedora Core 6 Linux box and a Mac OS X laptop. 
The test that fails is t/15-accessor.t. I am including a verbose 
transcript. Any help would be appreciated!

Thanks,
Nathan

Transcript:
#################################################

Alfred:/private/var/root/.cpan/build/Class-DBI-v3.0.16 root# 
make test TEST_FILES=t/15-accessor.t TEST_VERBOSE=1
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" 
"-e" "test_harness(1, 'blib/lib', 'blib/arch')" t/15-accessor.t
t/15-accessor....1..55
not ok 1 - DBD::SQLite::st fetchrow_array warning: not an error(0) 
at dbdimp.c line 504 [for Statement "PRAGMA table_info(Movies)"] 
at /Library/Perl/5.8.6/DBIx/ContextualFetch.pm line 88.
# 

#   Failed test 'DBD::SQLite::st fetchrow_array warning: not an error
(0) at dbdimp.c line 504 [for Statement "PRAGMA table_info
(Movies)"] at /Library/Perl/5.8.6/DBIx/ContextualFetch.pm line 88.
# '
#   at t/15-accessor.t line 11.
#                   'DBD::SQLite::st fetchrow_array warning: not an error
(0) at dbdimp.c line 504 [for Statement "PRAGMA table_info
(Movies)"] at /Library/Perl/5.8.6/DBIx/ContextualFetch.pm line 88.
# '
#     doesn't match '(?-xism:clashes with built-in method)'
ok 2 - Column 'sheep' in Film clashes with built-in method at t/
15-accessor.t line 13
# 
not ok 3 - DBD::SQLite::st fetchrow_array warning: not an error(0) 
at dbdimp.c line 504 [for Statement "PRAGMA table_info(Actor)"] at 
/Library/Perl/5.8.6/DBIx/ContextualFetch.pm line 88.
# 

#   Failed test 'DBD::SQLite::st fetchrow_array warning: not an error
(0) at dbdimp.c line 504 [for Statement "PRAGMA table_info(Actor)"] 
at /Library/Perl/5.8.6/DBIx/ContextualFetch.pm line 88.
# '
#   at t/15-accessor.t line 11.
#                   'DBD::SQLite::st fetchrow_array warning: not an error
(0) at dbdimp.c line 504 [for Statement "PRAGMA table_info(Actor)"] 
at /Library/Perl/5.8.6/DBIx/ContextualFetch.pm line 88.
# '
#     doesn't match '(?-xism:clashes with built-in method)'
ok 4 - Modified accessor - with column name
ok 5 - The object isa Film
ok 6 - No errors
prepare_cached(INSERT INTO Movies (title, director, rating, 
numexplodingsheep)
VALUES (?, ?, ?, ?)
) statement handle DBIx::ContextualFetch::st=HASH(0x191409c) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 7 - Modified accessor - with accessor
ok 8 - The object isa Film
ok 9 - No errors
ok 10 - Can search with modified accessor
prepare_cached(INSERT INTO Movies (title, director, rating, 
numexplodingsheep)
VALUES (?, ?, ?, ?)
) statement handle DBIx::ContextualFetch::st=HASH(0x191409c) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 11 - Modified mutator - with mutator
ok 12 - The object isa Film
ok 13 - No errors
prepare_cached(INSERT INTO Movies (title, director, rating, 
numexplodingsheep)
VALUES (?, ?, ?, ?)
) statement handle DBIx::ContextualFetch::st=HASH(0x191409c) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 14 - Modified mutator - with column name
ok 15 - The object isa Film
ok 16 - No errors
prepare_cached(INSERT INTO Movies (title, director, rating, 
numexplodingsheep)
VALUES (?, ?, ?, ?)
) statement handle DBIx::ContextualFetch::st=HASH(0x191409c) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 17 - Modified mutator - with accessor
ok 18 - The object isa Film
ok 19 - No errors
prepare_cached(INSERT INTO Movies (title, director, rating, 
numexplodingsheep)
VALUES (?, ?, ?, ?)
) statement handle DBIx::ContextualFetch::st=HASH(0x191409c) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 20 - no hasa film
ok 21 - hasa movie
ok 22 - The object isa Film
ok 23 -  - Bad Taste
ok 24 - No errors
prepare_cached(INSERT INTO Movies (title, director, rating, 
numexplodingsheep)
VALUES (?, ?, ?, ?)
) statement handle DBIx::ContextualFetch::st=HASH(0x191409c) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 25 - Can't locate object method "film" via package "Actor" at t/
15-accessor.t line 111.
# 
ok 26 - 'main' cannot alter the value of 'film' on objects of class 
'Actor' at t/15-accessor.t line 114
# 
ok 27 - Set movie through hasa
ok 28 - hasa movie
ok 29 - The object isa Film
ok 30 -  - Another Film
ok 31 - No problem
ok 32 - nonpersistent is a column
ok 33 -  - but it's not real
ok 34 - Title set OK
ok 35 - As is non persistent value
ok 36 - Re-retrieve film
ok 37 - Title still OK
ok 38 - Non persistent value gone
ok 39 - Can set it
ok 40 - And it's there again
ok 41 - Commit the film
ok 42 - And it's still there
ok 43 - Actor has no specific essential columns
ok 44 - nonpersistent is a column
ok 45 -  - but it's not real
ok 46 - no problems retrieving actors
ok 47 - The object isa Actor
prepare_cached(INSERT INTO Movies (title)
VALUES (?)
) statement handle DBIx::ContextualFetch::st=HASH(0x192a1f8) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
prepare_cached(INSERT INTO Movies (title)
VALUES (?)
) statement handle DBIx::ContextualFetch::st=HASH(0x192a1f8) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 48 - Can update Naked
ok 49 - Make Naked read only
ok 50 - Can't update Naked any more
prepare_cached(UPDATE Movies
SET    rating = ?
WHERE  title=?
) statement handle DBIx::ContextualFetch::st=HASH(0x1930d0c) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 51 - But can still update Secrets and Lies
prepare_cached(INSERT INTO Movies (title)
VALUES (?)
) statement handle DBIx::ContextualFetch::st=HASH(0x192a1f8) 
still Active at /Library/Perl/5.8.6/Ima/DBI.pm line 381
ok 52 - And can still insert new films isa Film
ok 53 - Make all Films read only
ok 54 - Still can't update Naked
ok 55 - And can't update S&L any more
ok 56 - And can't delete 4 Days in July
ok 57 - Or insert new films
# Looks like you planned 55 tests but ran 2 extra.
# Looks like you failed 2 tests of 57 run.
dubious
        Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1, 3, 56-57
        Failed 4/55 tests, 92.73% okay
Failed Test     Stat Wstat Total Fail  Failed  List of Failed
--------------------------------------------------------
-----------------------
t/15-accessor.t    2   512    55    4   7.27%  1 3 56-57
Failed 1/1 test scripts, 0.00% okay. 0/55 subtests failed, 100.00% 
okay.
make: *** [test_dynamic] Error 2
Alfred:/private/var/root/.cpan/build/Class-DBI-v3.0.16 root#
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.