I am baffled by both of these, and I don't (usually) baffle that easily.
First, the background:

- Latest Catalyst, C::E::Apache, and all related modules
- Using SQLite from within DBIC for model storage

My application runs fine from the test-server scripts that
catalyst.plauto-generated. When I moved it to Apache (
1.3.37) + mod_perl (1.30), initially I just installed the various components
into Perl's default site_perl structure. The application loaded fine, but
would not connect to the SQLite database. I tried having it in the same dir
as the YAML config file, and I tried putting in a specific place and
changing the setting in the config to have an absolute path. I also
experimented with modes (up to and including 666) and user/group
combinations (both on the ownership of the file and the running httpd
processes). Nothing I've tried gets it to open the DB.

The second problem came when I tried to move the application to a dedicated
directory (this is a small app for my company, and they're more likely to
want it to live in its own world as opposed to being dropped into
site_perl). Then things really went wacky. After adding the apropos
directory to the search-path in a <Perl> block, attempting to start the
server yielded this mess:

Subroutine Bylines::Model::DB::class redefined at
/usr/lib/perl5/site_perl/5.8.5/DBIx/Class/Schema.pm line 415.
Subroutine Bylines::Model::DB::source redefined at
/usr/lib/perl5/site_perl/5.8.5/DBIx/Class/Schema.pm line 415.
Subroutine Bylines::Model::DB::resultset redefined at
/usr/lib/perl5/site_perl/5.8.5/DBIx/Class/Schema.pm line 415.
Subroutine Bylines::Model::DB::Sources::ACCEPT_CONTEXT redefined at
/usr/lib/perl5/site_perl/5.8.5/Catalyst/Model/DBIC/Schema.pm line 301.
Subroutine Bylines::Model::DB::Users::ACCEPT_CONTEXT redefined at
/usr/lib/perl5/site_perl/5.8.5/Catalyst/Model/DBIC/Schema.pm line 301.
Subroutine Bylines::Model::DB::Statii::ACCEPT_CONTEXT redefined at
/usr/lib/perl5/site_perl/5.8.5/Catalyst/Model/DBIC/Schema.pm line 301.
Syntax error on line 259 of /usr/local/apache/conf/httpd.conf:
Can't locate Bylines/Model/DB/Users.pm in @INC (@INC contains: ...

(No need to show the list of @INC contents, it's a typical perl 5.8.X set of
paths)

I have one model defined, Bylines::Model::DB. It's an empty sub-class of
Catalyst::Model::DBIC::Schema. In the configuration, I have defined the
schema_class setting for Model::DB to be "Bylines::DB". Bylines/DB.pm is a
sub-class of DBIx::Class::Schema, and loads three classes:
Bylines::DB::{Sources,Statii,Users}. In the -Debug output that Catalyst
produces, I see that it has correctly mapped these classes to the model:

.-----------------------------------------------------------------+----------.
| Class                                                           | Type
|
+-----------------------------------------------------------------+----------+
| Bylines::Controller::Admin                                      | instance
|
| Bylines::Controller::Ajax                                       | instance
|
| Bylines::Controller::Edit                                       | instance
|
| Bylines::Controller::Review                                     | instance
|
| Bylines::Controller::Root                                       | instance
|
| Bylines::Model::DB                                              | instance
|
| Bylines::Model::DB::Sources                                     | class
|
| Bylines::Model::DB::Statii                                      | class
|
| Bylines::Model::DB::Users                                       | class
|
| Bylines::View::TT                                               | instance
|
'-----------------------------------------------------------------+----------'

However, it seems to be then trying to explicitly load
Bylines::Model::DB::Users after that. If I remove Users from the mix, I get
the same error message with regards to Statii.

Any help/suggestions/ideas most welcomed.

Randy
--
Randy J. Ray / [EMAIL PROTECTED]
Campbell, CA
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to