it should be dbi:SQLite not Sqlite
Thanks 2012/4/17 rochelle hsu <[email protected]>: > 写了一段dbix::class的代码,但运行后报错,代码如下: > t.pl > ------------------------------------------------------------------------------- > #!/usr/bin/perl > > use strict; > use warnings; > use Data::Dumper; > use lib 'lib'; > use MyApp::Schem; > > > my $dbi_dsn = > 'dbi:Sqlite:dbname=/Users/xu/projects/opm/DBdesign/opm_new.db'; > my $schema = MyApp::Schem->connect($dbi_dsn,'','',); > > my $users_rs =$schema->resultset('Event'); > > #print Dumper $users_rs; > > my $user = $users_rs->find(1); > print Dumper $user; > #$user->set_column('title' => 'helloworld'); > #$user->update; > > exit; > > > -------------------------------- > 运行以后输出: > xumatoiMac:dbdesign xu$ t.pl > Can't locate object method "_rebless" via package > "DBIx::Class::Storage::DBI::Sqlite" at > /Library/Perl/5.12/DBIx/Class/Storage/DBI.pm line 1153. > > 请大家帮忙看看有啥问题。 > > 2012/4/17 langq 235 <[email protected]> >> >> 特像写简历。。。 >> >> -- >> 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 >> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 >> 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 >> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。 > > > -- > 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 > 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 > 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 > 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。 -- Fayland Lam // http://www.fayland.org/ -- 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
