Is there something wrong with the combination of cdbi 0.96 and Apache 1.xx?

[prev] [thread] [next] [Date index for 2005/02/14]

From: Alexander K
Subject: Is there something wrong with the combination of cdbi 0.96 and Apache 1.xx?
Date: 15:23 on 14 Feb 2005
I don't understand.

I've got the following file (Domain/DBI.pm) which I
attempt to preload in Apache with the directive:
PerlModule Domain::DBI

Here goes the file:
---------------
package Domain::DBI;
use base 'Class::DBI';
__PACKAGE__->set_db('Main', 'dbi:mysql:vshops',
'webserver', '5h&1d@p');
__PACKAGE__->autoupdate(1);

package Domain::Option;
use base 'Domain::DBI';
__PACKAGE__->table('tblOptions');
__PACKAGE__->columns(All => qw/optionid property
value/);
__PACKAGE__->has_a(property => 'Domain::Property');

package Domain::Property;
use base 'Domain::DBI';
__PACKAGE__->table('tblProperties');
__PACKAGE__->columns(All => qw/property product
name/);
#__PACKAGE__->has_a(product => 'Domain::Product');
__PACKAGE__->has_many(options => 'Domain::Option');


1;
---------------

When I have cdbi 0.95 installed on my 2 debian (woody)
machines, all is well and Apache can start normally. I
can also 'use' this module from a stand-alone perl
program fine.

When I have cdbi 0.96 installed on my 2 debian (woody)
machines, I can 'use' this module from a stand-alone
perl program, but Apache will not run.

Here is what Apache gives me in error.log when it
tries to start, with cdbi 0.96 installed:

----
options method already exists in Domain::Property
 at /usr/share/perl5/Class/DBI/Relationship/HasMany.pm
line 13
Syntax error on line 1068 of
/etc/apache-perl/httpd.conf:
Can't use an undefined value as a HASH reference at
/usr/share/perl5/Class/DBI/Relationship/HasMany.pm
line 51.
Compilation failed in require at (eval 140) line 3.
----

This IS a serious problem. Because it's virtually
impossible (or very hard) to keep class-dbi 0.95 if
you want to move on to Debian sarge (the next version
of Debian). And I have moved there, and I am stuck
with cdbi 0.96 (which has the exact same effects on
Debian Woody).

Why is cdbi 0.96 giving me such a hard time?

P.S. I have reinstalled the OS from scratch many
times, and with different versions, and I get the same
results every time.

An idea?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Is there something wrong with the combination of cdbi 0.96 and Apache 1.xx?
Alexander K 15:23 on 14 Feb 2005

Generated at 10:23 on 16 Feb 2005 by mariachi v0.52