my $foo = MyDB::Foo->find_or_create({ name => 'name', uri => 'hello', }); #### package MyDB::Foo; use base MyDB; __PACKAGE__->table('foo'); __PACKAGE__->columns( ALL => ('foo_id','name','uri') ); 1; #### MyDB::Foo can't SELECT FROM foo WHERE name = ? AND uri = ? : DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM foo WHERE name = 'name' AND uri = 'hello'' at line 2 [for Statement "SELECT FROM foo WHERE name = ? AND uri = ? " with ParamValues: 0='name', 1='hello'] at C:/Perl/site/lib/DBIx/ContextualFetch.pm line 52. at C:/Perl/site/lib/Class/DBI/Search/Basic.pm line 169 #### CREATE TABLE foo ( foo_id INTEGER PRIMARY KEY AUTO_INCREMENT, name TEXT, uri TEXT );