Subject: | undefined $dbc |
I'm getting this error:
Can't call method "prepare" on an undefined value at
/home/dwestbrook/CPAN/lib/perl5/site_perl/5.6.1/Class/DBI/AutoIncrement.pm
line 58.
It's because this call in Class::DBI::AutoIncrement::Descriptor->next()
isn't getting anything (why not, i dunno):
my @handles = Class::DBI::AutoIncrement->db_handles(); #
Class::DBI::AutoIncrement should inherit from Class::DBI
Test script:
##########################
use strict;
use warnings;
package Test::DB;
use base qw(Class::DBI::AutoIncrement Class::DBI);
__PACKAGE__->connection("DBI:CSV:f_dir=/tmp;csv_eol=\n");
__PACKAGE__->table('cc');
__PACKAGE__->columns(Primary => qw/ my_id /);
__PACKAGE__->columns(Essential => qw/ first_name last_name / );
__PACKAGE__->autoincrement('my_id');
package main;
Test::DB->create({first_name=>'d', last_name=>'w'});
##########################
Data file (/tmp/cc):
my_id,first_name,last_name
1,d,w
2,d,w
##########################
I'm using:
Class::DBI::AutoIncrement 0.03
Class::DBI 0.96
DBD::CSV 0.22
DBD::File 0.34
SQL::Statement 1.15
This is perl, v5.6.1 built for i386-linux
Linux example.com 2.4.21-32.0.1.EL #1 Wed May 25 16:02:04 CDT 2005 i686
unknown
thanks,
--david