我遵循了Rose::DB::Object教程关于CPAN并设置三个包。
package My::DB::Object;
use My::DB;
use base qw(Rose::DB::Object);
sub init_db { My::DB->new }
package My::DB;
use base qw(Rose::DB);
...
package Motorcycle;
use base My::DB::Object ;
__PACKAGE__->meta->setup
(
...
);
__PACKAGE__->meta->make_manager_class( motorcycles );
在应用程序中:
package main;
use Motorcycle;
use Mojolicious::Lite;
编译失败,出现以下错误:
My/DB/Object did not return a true value <eval 2> line 2…
致以问候和感谢。