sub _auto_increment_value { my $self = shift; my $dbh = $self->db_Main; # the DBI will provide a standard attribute soon, meanwhile... my $id = $dbh->{mysql_insertid} # mysql || eval { $dbh->func('last_insert_rowid') }; # SQLite $self->_croak("Can't get last insert id") unless defined $id; return $id; }