DBIx::Class::Schema::Loader を使用して Catalyst のモデルを作成しようとしています。結果クラスには、メソッドを追加できる基本クラスが必要です。そのため、MyTable.pm は、DBIx::Class::core (デフォルト) を継承する Base.pm を継承します。
どういうわけか、これを行う方法がわかりません。私の作成スクリプトは以下にあります。誰かが私が間違っていることを教えてもらえますか? スクリプトはモデルを正常に作成しますが、すべての結果セット クラスは DBIx::Class::core から直接継承し、間に Base クラスはありません。
#!/usr/bin/perl
use DBIx::Class::Schema::Loader qw/ make_schema_at /;
#specifically for the entities many-2-many relation
$ENV{DBIC_OVERWRITE_HELPER_METHODS_OK} = 1;
make_schema_at(
'MyApp::Schema',
{
dump_directory => '/tmp',
debug => 1,
overwrite_modifications => 1,
components => ['EncodedColumn'], #encoded password column
use_namespaces => 1,
default_resultset_class => 'Base'
},
[ 'DBI:mysql:database=mydb;host=localhost;port=3306','rob', '******' ],
);