[tony@kasei.com - Fri Aug 22 13:37:40 2003]:
Show quoted text> On Thu, Aug 21, 2003 at 07:46:01AM -0400, Guest via RT wrote:
> > Under the following conditions has_many give a compilation error
> (object method _essential not found in Class:DBI::Querry line 114)
> > to produce the error, create a file p1.pm
> > package p1;
> > use base 'Class::DBI';
> > p1->has_many('m' => 'main');
> > 1;
> > then run the following line
> > perl -wle ' use p1; use base q/Class::DBI/; main->columns(All =>
> "m"); '
>
> I'm not sure why this is a bug.
>
> You're trying to link p1 with main, but main isn't a subclass of
> Class::DBI, so of course it's not going to work ...
>
> It could conceivably give a better error message, but I'm assuming
> there's a reason why you're reporting this?
>
> Tony
>
main is a subclass of Class::DBI.
the problem is the order of the declaration. main uses p1, before
declaring it base class. this causes the compilation to fail.
It does not need to be considered a bug. But in that case it should be
in the documentation. It needs specific care if there are circular
has_many references.