my $s = DBIx::Class::Schema::Loader->connect('dbi:sqlite:foo.db'); $s->class($class_name)->table;
但是我怎么能做相反的事情,并从数据库中的表名获取类名?
$schema->sources
my ($class_name) = grep { $s->class($_)->table eq $table } $s->sources;