[CDBI] Changing Your Column Accessor Method Names

Derek Basch dbasch at yahoo.com
Mon Jun 19 21:17:10 BST 2006


I am gettting this error message:

Column 'id' in Database::Tql::Custdb clashes with built-in method at
class_dbi_test.pl line 26

and can't quite figure out how to fix it. I see there are several
solutions listed in the wiki:


But they don't seem to do anything. Am I doing this (below) all wrong?

use strict;
use warnings;
use MysqlClientConfiguration;

package Database::Tql::DBI;
use base 'Class::DBI';

#sub id {
#   my $self = shift;
    # Back to normal Class::DBI
#    return $self->_id_accessor(@_);

sub accessor_name {
  my ($class, $column) = @_;
  return "user_id" if $column eq "id";
  return $column;



Derek Basch 

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the ClassDBI mailing list