Не удается установить DBIx :: Class :: Loader для создания DBIC модели Catalyst

Я хочу создать модель DBIC для проекта Catalyst с помощью этой команды: myapp_create.pl model SomeDB DBIC dbi:SQLite:/tmp/my.db

Эта команда не работает, так как у меня нет модуля "Catalyst :: Helper :: Model :: DBIC". Чтобы установить его, мне нужно установить DBIx :: Class :: Loader

#   Failed test 'use Catalyst::Helper::Model::DBIC;'
#   at t/01use.t line 5.
#     Tried to use 'Catalyst::Helper::Model::DBIC'.
#     Error:  Can't locate DBIx/Class/Loader.pm in @INC

. Поэтому, когда я пытаюсь установить DBIx :: Class :: Loader, я получаю сообщение об ошибке:

Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01use.t ............ 1/3 IMPORTANT: DBIx::Class::DB is DEPRECATED AND *WILL* BE REMOVED. DO NOT USE.
t/01use.t ............ ok   
t/02pod.t ............ skipped: set TEST_POD to enable this test
t/03podcoverage.t .... skipped: Test::Pod::Coverage 1.04 required
t/10sqlite_common.t .. IMPORTANT: DBIx::Class::DB is DEPRECATED AND *WILL* BE REMOVED. DO NOT USE.
loader_test9 has no primary key at /home/michael/.cpan/build/DBIx-Class-Loader-0.21-VH7K9u/blib/lib/DBIx/Class/Loader.pm line 110.
t/10sqlite_common.t .. 1/26 DBIx::Class::ResultSetProxy::find(): find() expects either a column/value hashref, or a list of values corresponding to the columns of the specified unique constraint 'primary' at t/dbixcl_common_tests.pm line 73
# Looks like you planned 26 tests but ran 5.
# Looks like your test exited with 2 just after 5.
t/10sqlite_common.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 21/26 subtests 
t/11mysql_common.t ... skipped: You need to set the MYSQL_NAME, MYSQL_USER and MYSQL_PASS environment variables
t/12pg_common.t ...... skipped: You need to set the PG_NAME, PG_USER and PG_PASS environment variables
t/13db2_common.t ..... skipped: You need to set the DB2_NAME, DB2_USER and DB2_PASS environment variables

Test Summary Report
-------------------
t/10sqlite_common.t (Wstat: 512 Tests: 5 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 26 tests but ran 5.
Files=7, Tests=8,  5 wallclock secs ( 0.05 usr  0.01 sys +  0.73 cusr  0.10 csys =  0.89 CPU)
Result: FAIL
Failed 1/7 test programs. 0/8 subtests failed.
make: *** [test_dynamic] Error 255
  BLBLACK/DBIx-Class-Loader-0.21.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports BLBLACK/DBIx-Class-Loader-0.21.tar.gz
Running make install
  make test had returned bad status, won't install without force

Кто-нибудь может мне помочь?

0
задан 8 March 2013 в 06:39

1 ответ

Нет необходимости использовать старый подход (используя script/myapp_create.pl model DBIC DBIC dbi:SQLite:db.db) для создания DBIC модели Catalyst. Правильный путь - использовать эту команду: script/myapp_create.pl model DBIC DBIC:Schema dbi:SQLite:db.db

0
ответ дан 8 March 2013 в 06:39

Другие вопросы по тегам:

Похожие вопросы: